This commit is contained in:
Jaka Furlan 2025-10-28 18:21:14 +01:00
parent f59c93b770
commit 8906317d1a
6 changed files with 107 additions and 0 deletions

BIN
20.dev Normal file

Binary file not shown.

BIN
AA.dev Normal file

Binary file not shown.

0
AA.dev.txt Normal file
View file

7
ass1/cat.asm Normal file
View file

@ -0,0 +1,7 @@
cat START 0
.beri in pisi
loop RD #0
WD #1
J loop
END loop

83
ass1/echo.asm Normal file
View file

@ -0,0 +1,83 @@
echo START 0
start LDA txt
JSUB char
JSUB nl
JSUB string
halt J halt
.char
char STA regA
STB regB
STT regT
STS regS .shranimo registre
WD 0x1
LDA regA .obnovimo registre
LDB regB
LDT regT
LDS regS
RSUB
.nl
nl STA regA
STB regB
STT regT
STS regS .shranimo registre
LDCH nl
WD 0x1
LDX 1
LDCH newline, X
WD 0x1
LDA regA .obnovimo registre
LDB regB
LDT regT
LDS regS
RSUB
.string
string STA regA
STB regB
STT regT
STS regS .shranimo registre
loop CLEAR X
LDB #1
LDCH regA, X
JSUB char
ADDR X, B
COMP #0
JGT loop
LDA regA .obnovimo registre
LDB regB
LDT regT
LDS regS
RSUB
.txt
txt BYTE C'hi'
BYTE 0
.parametri
param1 RESB 1
param2 RESB 2
.constante
newline BYTE 0x0D
BYTE 0x0A
.registri
regA RESW 1
regB RESW 1
regT RESW 1
regS RESW 1
END start

17
ass1/print.asm Normal file
View file

@ -0,0 +1,17 @@
print START 0
zacetek CLEAR X
loop LDCH txt, X
WD #0xAA
TIX #len .#len, ker je len EQU in ne dejanska lokacija v spominu!!!!!
JLT loop
halt J halt
.constants
txt BYTE C'SIC/XE'
BYTE 0
txtend EQU *
len EQU txtend-txt .definicija konstante EQU, ki ni shranjena v pomnilniku, zato ko jo želimo uporabiti
.rabimo #len
END zacetek