spo/arithr.asm
2025-11-16 23:41:47 +01:00

32 lines
292 B
NASM

.Code
ARITH START 0
LDS x
LDT y
ADDR S,T
STT sum
LDT y
SUBR T,S
STS diff
LDS x
MULR S,T
STT prod
LDS x
LDT y
DIVR T,S
STS quot
LDS x
LDA y
MUL quot
SUBR A,S
STS mod
HALT J HALT
.Data
x WORD 42
y WORD 27
sum RESW 1
diff RESW 1
prod RESW 1
quot RESW 1
mod RESW 1
END ARITH