This commit is contained in:
zanostro 2025-11-11 11:03:46 +01:00
parent 3332b2971b
commit 483a16c194
6 changed files with 122 additions and 1 deletions

16
rutine.asm Normal file
View file

@ -0,0 +1,16 @@
.code
rutina START 0
LDCH #95
JSUB print
halt J halt
END rutina
print WD #1
RSUB
.data

33
vhod_izhod/cat.asm Normal file
View 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

11
vhod_izhod/echo.asm Normal file
View file

@ -0,0 +1,11 @@
.code
echo START 0
halt J halt
END echo

View file

@ -0,0 +1,35 @@
.code
hello START 0
loop LDCH text, X
WD #1
TIX #textlen . ker ni pomnilniska lokacija, ampak ker je eq, ker eq je tu kokr define
JLT loop
CLEAR X
LDA #text
STA textprt
loop2 CLEAR A
LDCH @textprt
WD #1
COMP #0
LDA textprt
ADD #1
STA textprt
JGT loop2
halt J halt
END hello
.data
text BYTE C'Hello world!'
BYTE 0
textend EQU * ./ trenutni naslov
textlen EQU textend-text
textprt WORD 0

26
vhod_izhod/print.asm Normal file
View file

@ -0,0 +1,26 @@
.code
print START 0
CLEAR X
loop LDA txt, X
COMP NULL
JEQ halt
WD #AA
halt J halt
.data
txt BYTE C'SIC/XE'
NULL BYTE 0
textend EQU *
textlen EQU textend- text -1
END print

View file

@ -36,7 +36,7 @@ endCOMP LDA bColour,X
LDCH BLACK . clear screen LDCH BLACK . clear screen
+STCH SCREEN,X +STCH SCREEN,X
LDX INDEX LDX INDEX
LDA ballX,X .//calculae new X LDA ballX,X .//calculae new X
LDT bSpeedX,X LDT bSpeedX,X