Narjen print.asm in primeri z vaj

This commit is contained in:
Timon 2025-10-30 12:58:15 +01:00
parent a363fd8403
commit 1a6a994e53
4 changed files with 44 additions and 0 deletions

1
ass1/vhod_izhod/AA.dev Normal file
View file

@ -0,0 +1 @@
SIC/XE

13
ass1/vhod_izhod/hello.asm Normal file
View file

@ -0,0 +1,13 @@
hello START 0
CLEAR X
loop LDCH txt, X
WD #1
TIX #txtlen
JLT loop
halt J halt
txt BYTE C'Hello world'
txtend EQU *
txtlen EQU txtend-txt
END hello

15
ass1/vhod_izhod/print.asm Normal file
View file

@ -0,0 +1,15 @@
print START 0
CLEAR X
loop LDCH txt, X
WD #0xAA
TIX #txtlen
JLT loop
halt J halt
txt BYTE C'SIC/XE'
txtend EQU *
txtlen EQU txtend-txt
END print

15
ass1/vhod_izhod/text.asm Normal file
View file

@ -0,0 +1,15 @@
text START 0
LDCH #97
+STCH @screenp
LDA screenp
ADD #1
STA screenp
LDCH #97
+STCH #0xb801
halt J halt
screenp WORD 0xb800
END text