This commit is contained in:
Timon 2025-12-10 18:28:54 +01:00
parent 705c7bcb58
commit d50c62106e
14 changed files with 344 additions and 156 deletions

View file

@ -7,28 +7,29 @@ program
ADDR S, A
ADDR T, A
STA sum
WD #1
. Odstejemo x in y
LDA S
LDA x
SUBR T, A
STA diff
WD #1
. Zmnozimo x in y
LDA S
LDA x
MULR T, A
STA prod
WD #1
. Zdelimo x in y
LDA S
LDA x
DIVR T, A
STA quot
WD #1
. Ostanek pri deljenju x z y
LDA quot
MULR T, A
SUBR A, S
STS mod
#WD 1
halt J halt
sum RESW 1
@ -37,7 +38,7 @@ quot RESW 1
prod RESW 1
mod RESW 1
x WORD 20
y WORD 10
x WORD 15
y WORD 5
END program

View file

@ -1,20 +1,20 @@
***** Section <default> *****
Stats: size=77 blocks=77 symbols=10 literals=0 relocations=0
Stats: size=83 blocks=83 symbols=10 literals=0 relocations=0
Blocks
name start size #ins #dir #sto
<default> 00000 0004D 22 4 5
<default> 00000 00053 23 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
diff 000041 65 local relative data label
halt 00003B 59 local relative code label
mod 00004A 74 local relative data label
prod 000047 71 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
quot 000044 68 local relative data label
sum 00003E 62 local relative data label
x 00004D 77 local relative data label
y 000050 80 local relative data label
Literals
label definition
Relocations

View file

@ -1,44 +1,42 @@
00000 a_rel START 0
00000 6F2044 program LDS x
00003 772044 LDT y
00000 6F204A program LDS x
00003 77204A LDT y
00006 9040 ADDR S,A
00008 9050 ADDR T,A
0000A 0F202B STA sum
0000D 010000 LDA #0 . Reset A-ja
0000A 0F2031 STA sum
0000D DD0001 WD #1
. Odstejemo x in y
00010 9040 ADDR S,A
00012 9450 SUBR T,A
00014 0F2024 STA diff
00017 010000 LDA #0
00010 03203A LDA x
00013 9450 SUBR T,A
00015 0F2029 STA diff
00018 DD0001 WD #1
. Zmnozimo x in y
0001A 9040 ADDR S,A
0001C 9850 MULR T,A
0001E 0F2020 STA prod
00021 010000 LDA #0
0001B 03202F LDA x
0001E 9850 MULR T,A
00020 0F2024 STA prod
00023 DD0001 WD #1
. Zdelimo x in y
00024 9040 ADDR S,A
00026 9C50 DIVR T,A
00028 0F2013 STA quot
00026 032024 LDA x
00029 9C50 DIVR T,A
0002B 0F2016 STA quot
0002E DD0001 WD #1
. Ostanek pri deljenju x z y
0002B 6B2010 LDB quot
0002E 9853 MULR T,B
00030 9434 SUBR B,S
00032 7F200F STS mod
00031 032010 LDA quot
00034 9850 MULR T,A
00036 9404 SUBR A,S
00038 7F200F STS mod
. #WD 1
0003B 3F2FFD halt J halt
00035 3F2FFD halt J halt
0003E 000000 sum RESW 1
00041 000000 diff RESW 1
00044 000000 quot RESW 1
00047 000000 prod RESW 1
0004A 000000 mod RESW 1
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
0004D 00000F x WORD 15
00050 000005 y WORD 5
00047 000014 x WORD 20
0004A 00000A y WORD 10
0004D END program
00053 END program

View file

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

13
ass1/vhod_izhod/cat.log Normal file
View file

@ -0,0 +1,13 @@
***** Section <default> *****
Stats: size=9 blocks=9 symbols=2 literals=0 relocations=0
Blocks
name start size #ins #dir #sto
<default> 00000 00009 3 2 0
Symbols
name hex dec scope kind type description
cat 000000 0 exported relative code label
loop 000000 0 local relative code label
Literals
label definition
Relocations
address length flag symbol

7
ass1/vhod_izhod/cat.lst Normal file
View file

@ -0,0 +1,7 @@
00000 cat START 0
00000 D90000 loop RD #0
00003 DD0001 WD #1
00006 3F2FF7 J loop
00009 END cat