Renamed vaja1 to ass1

This commit is contained in:
Timon 2025-10-26 15:17:13 +01:00
parent f74d0d09b8
commit 86af0d53f8
12 changed files with 0 additions and 0 deletions

45
ass1/Aritmetika/arith.asm Normal file
View file

@ -0,0 +1,45 @@
.aritmetika z enostavnim naslavljanjem
aritmetika START 0
program
.Sestejemo x in y
LDA x
ADD y
STA sum
.Odstejemo x in y
LDA x
SUB y
STA diff
.Zmnozimo x in y
LDA x
MUL y
STA prod
.Zdelimo x z y
LDA x
DIV y
STA quot
.Izracunamo ostanek pri deljenju x z y
LDA quot
MUL y
STA temp
LDA x
SUB temp
STA mod
halt J halt
temp RESW 1
sum RESW 1
diff RESW 1
prod RESW 1
quot RESW 1
mod RESW 1
x WORD 10
y WORD 20
END program

View file

View file

View file

View file

@ -0,0 +1,43 @@
a_rel START 0
program
. Sestejemo x in y
LDS x
LDT y
ADDR S, A
ADDR T, A
STA sum
. Odstejemo x in y
LDA S
SUBR T, A
STA diff
. Zmnozimo x in y
LDA S
MULR T, A
STA prod
. Zdelimo x in y
LDA S
DIVR T, A
STA quot
. Ostanek pri deljenju x z y
LDA quot
MULR T, A
SUBR A, 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

View file

@ -0,0 +1,21 @@
***** Section <default> *****
Stats: size=77 blocks=77 symbols=10 literals=0 relocations=0
Blocks
name start size #ins #dir #sto
<default> 00000 0004D 22 4 5
Symbols
name hex dec scope kind type description
a_rel 000000 0 exported relative code label
diff 00003B 59 local relative data label
halt 000035 53 local relative code label
mod 000044 68 local relative data label
prod 000041 65 local relative data label
program 000000 0 local relative code label
quot 00003E 62 local relative data label
sum 000038 56 local relative data label
x 000047 71 local relative data label
y 00004A 74 local relative data label
Literals
label definition
Relocations
address length flag symbol

View file

@ -0,0 +1,44 @@
00000 a_rel START 0
00000 6F2044 program LDS x
00003 772044 LDT y
00006 9040 ADDR S,A
00008 9050 ADDR T,A
0000A 0F202B STA sum
0000D 010000 LDA #0 . Reset A-ja
. Odstejemo x in y
00010 9040 ADDR S,A
00012 9450 SUBR T,A
00014 0F2024 STA diff
00017 010000 LDA #0
. Zmnozimo x in y
0001A 9040 ADDR S,A
0001C 9850 MULR T,A
0001E 0F2020 STA prod
00021 010000 LDA #0
. Zdelimo x in y
00024 9040 ADDR S,A
00026 9C50 DIVR T,A
00028 0F2013 STA quot
. Ostanek pri deljenju x z y
0002B 6B2010 LDB quot
0002E 9853 MULR T,B
00030 9434 SUBR B,S
00032 7F200F STS mod
00035 3F2FFD halt J halt
00038 000000 sum RESW 1
0003B 000000 diff RESW 1
0003E 000000 quot RESW 1
00041 000000 prod RESW 1
00044 000000 mod RESW 1
00047 000014 x WORD 20
0004A 00000A y WORD 10
0004D END program

View file

@ -0,0 +1,5 @@
Ha_rel 00000000004D
T0000001E6F2044772044904090500F202B010000904094500F202401000090409850
T00001E1A0F202001000090409C500F20136B2010985394347F200F3F2FFD
T0000470600001400000A
E000000