vaje
This commit is contained in:
parent
3332b2971b
commit
483a16c194
6 changed files with 122 additions and 1 deletions
33
vhod_izhod/cat.asm
Normal file
33
vhod_izhod/cat.asm
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
.code
|
||||
|
||||
cat START 0
|
||||
|
||||
CLEAR X
|
||||
|
||||
read RD #0
|
||||
STCH BUFF, X
|
||||
COMP #10 . \n
|
||||
JEQ cont
|
||||
TIX #bufflen
|
||||
JLT read
|
||||
|
||||
|
||||
cont CLEAR X
|
||||
print LDCH BUFF, X
|
||||
WD #1
|
||||
TIX #bufflen
|
||||
COMP #0
|
||||
JGT print
|
||||
|
||||
halt J halt
|
||||
|
||||
|
||||
.data
|
||||
|
||||
BUFF RESB 128
|
||||
BYTE 0
|
||||
buffend EQU *
|
||||
bufflen EQU buffend - BUFF - 1
|
||||
|
||||
|
||||
END cat
|
||||
Loading…
Add table
Add a link
Reference in a new issue