initial commit
This commit is contained in:
commit
4219ee484f
7 changed files with 231 additions and 0 deletions
46
ass1/arithr.asm
Normal file
46
ass1/arithr.asm
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
|
||||
|
||||
arith START 0
|
||||
|
||||
start LDT x
|
||||
LDS y
|
||||
ADDR T, S .shrani vsoto
|
||||
STS sum
|
||||
SUBR T, S .resetiraj S nazaj na y
|
||||
|
||||
SUBR S, T
|
||||
STT diff .shrani razliko
|
||||
ADDR S, T .popravi T
|
||||
|
||||
MULR T, S
|
||||
STS prod .sharni produkt
|
||||
|
||||
LDT x
|
||||
LDS y
|
||||
DIVR S, T
|
||||
STT quot .shrani kvocient
|
||||
|
||||
LDT x
|
||||
LDS y
|
||||
LDB quot
|
||||
MULR S, B
|
||||
SUBR B, T
|
||||
STT mod .shrani modulo
|
||||
|
||||
halt J halt
|
||||
END start
|
||||
|
||||
.podatki
|
||||
x WORD 20
|
||||
y WORD 3
|
||||
|
||||
.rezultati
|
||||
sum RESW 1
|
||||
diff RESW 1
|
||||
prod RESW 1
|
||||
quot RESW 1
|
||||
mod RESW 1
|
||||
|
||||
.za modulo
|
||||
z RESW 1
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue