vaje
This commit is contained in:
parent
3332b2971b
commit
483a16c194
6 changed files with 122 additions and 1 deletions
35
vhod_izhod/hello_world.asm
Normal file
35
vhod_izhod/hello_world.asm
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue