Popravil arithr, da samo enkrat bere x in y

This commit is contained in:
Timon 2025-10-26 14:43:20 +01:00
parent 9bfe70fbde
commit 7b51d2de57
4 changed files with 116 additions and 0 deletions

View file

@ -0,0 +1,46 @@
a_rel START 0
program
. Sestejemo x in y
LDS x
LDT y
ADDR S, A
ADDR T, A
STA sum
LDA #0 . Reset A-ja
. Odstejemo x in y
ADDR S, A
SUBR T, A
STA diff
LDA #0
. Zmnozimo x in y
ADDR S, A
MULR T, A
STA prod
LDA #0
. Zdelimo x in y
ADDR S, A
DIVR T, A
STA quot
. Ostanek pri deljenju x z y
LDB quot
MULR T, B
SUBR B, S
STS mod
halt J halt
sum RESW 1
diff RESW 1
quot RESW 1
prod RESW 1
mod RESW 1
x WORD 20
y WORD 10
END program