aboutsummaryrefslogtreecommitdiff
path: root/build/assembly
diff options
context:
space:
mode:
Diffstat (limited to 'build/assembly')
-rw-r--r--build/assembly45
1 files changed, 45 insertions, 0 deletions
diff --git a/build/assembly b/build/assembly
new file mode 100644
index 0000000..196c19d
--- /dev/null
+++ b/build/assembly
@@ -0,0 +1,45 @@
+COPY START 1000
+FIRST STL RETADR
+CLOOP JSUB RDREC
+ LDA LENGTH
+ COMP ZERO
+ JEQ ENDFIL
+ JSUB WRREC
+ J CLOOP
+ENDFIL LDA EOF
+ STA BUFFER
+ LDA THREE
+ STA LENGTH
+ JSUB WRREC
+ LDL RETADR
+ RSUB
+EOF BYTE C'EOF'
+THREE WORD 3
+ZERO WORD 0
+RETADR RESW 1
+LENGTH RESW 1
+BUFFER RESB 4096
+RDREC LDX ZERO
+ LDA ZERO
+RLOOP TD INPUT
+ JEQ RLOOP
+ RD INPUT
+ COMP ZERO
+ JEQ EXIT
+ STCH BUFFER,X
+ TIX MAXLEN
+ JLT RLOOP
+EXIT STX LENGTH
+ RSUB
+INPUT BYTE X'F1'
+MAXLEN WORD 4096
+WRREC LDX ZERO
+WLOOP TD OUTPUT
+ JEQ WLOOP
+ LDCH BUFFER,X
+ WD OUTPUT
+ TIX LENGTH
+ JLT WLOOP
+ RSUB
+OUTPUT BYTE X'05'
+ END FIRST \ No newline at end of file