Se mal treba popravt ampak skorej dela
This commit is contained in:
parent
68665cbb5a
commit
522f886eea
1 changed files with 51 additions and 0 deletions
51
ass1/vhod_izhod/echo.asm
Normal file
51
ass1/vhod_izhod/echo.asm
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue