Se mal treba popravt ampak skorej dela

This commit is contained in:
Timon 2025-10-30 15:47:34 +01:00
parent 68665cbb5a
commit 522f886eea

51
ass1/vhod_izhod/echo.asm Normal file
View file

@ -0,0 +1,51 @@
echo START 0
t LDA test
JSUB char
JSUB nl
JSUB string
halt J halt
char STA temp1
STX temp2
WD #1
LDA temp1
LDX temp2
RSUB
nl STA temp1
STX temp2
LDX #1
LDCH n_l
WD #1
LDCH n_l, X
CLEAR X
LDA temp1
LDX temp2
RSUB
string . V A je naslov iz katerega izpisemo nek string
STA temp1
STX temp2
LDX #0
STA strptr
LDB #1
loop CLEAR A
LDCH strptr, X
JSUB char
ADDR B, X
COMP #0
JGT loop
LDA temp1
LDX temp2
RSUB
n_l BYTE 10
test BYTE C'test0'
strptr WORD 0
temp1 RESW 1
temp2 RESW 1