My assignment requires me to take a list of numbers and then put them in reverse order using SICXE. My problem comes in where I don't actually know how to check whether the reversing actually happened or not so I can't actually tell if my program is working the way that I want it to. I can read the dump and tell where my original list is but I don't understand where I am supposed to see the reversed list to see if what I did actually worked. I'm not able to actually find the revered list in here. I assume that it is supposed to start at 15F since that is where BETA starts with 10 Reserved words. But since nothing shows up there I assume that means I have done something wrong but I am not actually sure if I am right about this. If I am how should I go about fixing my problem? I will include the .lst file as well as the sic.log file.
.lst file
*********************************************
University of North Florida: SIC/XE assembler
version date 11/12/2002
account: n00832607; Sun Mar 1 22:45:33 2015
*********************************************
ASSEMBLER REPORT
----------------
Loc Object Code Source Code
--- ----------- -----------
001- 00100 START 100
002- 00100 01001E LDA #30
003- 00103 0F2035 STA INDEX1 . ALPHA DECREASING INDEX
004- 00106 010000 LDA #0
005- 00109 0F2032 STA INDEX2 . BETA INCREADING INDEX
006- 0010C 6D0003 LDS #3 . INITALIZE REGISTER S TO 3
007- 0010F 750000 LDT #0 . INITALIZE REGISTER T TO 0
008- 00112 072026 REVLP LDX INDEX1 . INITALIZE INDEX REGISTER
009- 00115 03A029 LDA ALPHA,X . LOAD WORD FROM ALPHA INTO REGISTER A
010- 00118 072023 LDX INDEX2
011- 0011B 0FA041 STA BETA,X . STORE WORD IN BETA
012- 0011E 03201A LDA INDEX1
013- 00121 1D0003 SUB #3
014- 00124 0F2014 STA INDEX1
015- 00127 032014 LDA INDEX2
016- 0012A 190003 ADD #3
017- 0012D 0F200E STA INDEX2
018- 00130 07200B LDX INDEX2
019- 00133 A015 COMPR X,T . COMPARE NEW X INDEX VALUE TO 30
020- 00135 3B2FDA JLT REVLP . LOOP IF INDEX GREATER THAN 30
021- 00138 4F0000 RSUB
022- 0013B INDEX1 RESW 1
023- 0013E INDEX2 RESW 1
024- 00141 00005D ALPHA WORD 93
025- 00144 000032 WORD 50
026- 00147 0000C5 WORD 197
027- 0014A 000037 WORD 55
028- 0014D 000060 WORD 96
029- 00150 000041 WORD 65
030- 00153 00004A WORD 74
031- 00156 00005C WORD 92
032- 00159 00002B WORD 43
033- 0015C 000008 WORD 8
034- 0015F BETA RESW 10
035- 0017D END
sic.log file
SIC SIMULATOR V1.6
File names are:
loader
DEVF1
DEVF2
DEVF3
DEV04
DEV05
DEV06
COMMAND: A(CCEPT file names, R(ENAME 1 or more files
r
loader
DEVF1
Project2.obj
DEVF2
DEVF3
DEV04
DEV05
DEV06
File names are:
loader
Project2.obj
DEVF2
DEVF3
DEV04
DEV05
DEV06
COMMAND: A(CCEPT file names, R(ENAME 1 or more files
a
COMMAND: S(TART, R(UN, E(NTER, D(UMP, H(COUNT, B(KPT, F(ILES, T(RACE, Q(UIT?
s
COMMAND: S(TART, R(UN, E(NTER, D(UMP, H(COUNT, B(KPT, F(ILES, T(RACE, Q(UIT?
r
1000 INSTRUCTIONS EXECUTED
P=00005F
COMMAND: S(TART, R(UN, E(NTER, D(UMP, H(COUNT, B(KPT, F(ILES, T(RACE, Q(UIT?
d r
A=000000 X=000011 L=00003A B=000100
S=FFFFFF T=FFFFFF P=00005F CC=LT
COMMAND: S(TART, R(UN, E(NTER, D(UMP, H(COUNT, B(KPT, F(ILES, T(RACE, Q(UIT?
r
1000 INSTRUCTIONS EXECUTED
P=000029
COMMAND: S(TART, R(UN, E(NTER, D(UMP, H(COUNT, B(KPT, F(ILES, T(RACE, Q(UIT?
d r
A=002C03 X=000028 L=000042 B=000100
S=FFFFFF T=FFFFFF P=000029 CC=EQ
COMMAND: S(TART, R(UN, E(NTER, D(UMP, H(COUNT, B(KPT, F(ILES, T(RACE, Q(UIT?
r
1000 INSTRUCTIONS EXECUTED
P=000048
COMMAND: S(TART, R(UN, E(NTER, D(UMP, H(COUNT, B(KPT, F(ILES, T(RACE, Q(UIT?
d r
A=00113E X=000000 L=00003A B=00013E
S=FFFFFF T=FFFFFF P=000048 CC=EQ
COMMAND: S(TART, R(UN, E(NTER, D(UMP, H(COUNT, B(KPT, F(ILES, T(RACE, Q(UIT?
d
INVALID STARTING ADDRESS
NO ENDING ADDRESS SPECIFIED
COMMAND: S(TART, R(UN, E(NTER, D(UMP, H(COUNT, B(KPT, F(ILES, T(RACE, Q(UIT?
r
1000 INSTRUCTIONS EXECUTED
P=000048
COMMAND: S(TART, R(UN, E(NTER, D(UMP, H(COUNT, B(KPT, F(ILES, T(RACE, Q(UIT?
d r
A=000000 X=00000D L=000042 B=000141
S=FFFFFF T=FFFFFF P=000048 CC=LT
COMMAND: S(TART, R(UN, E(NTER, D(UMP, H(COUNT, B(KPT, F(ILES, T(RACE, Q(UIT?
r
1000 INSTRUCTIONS EXECUTED
P=000029
COMMAND: S(TART, R(UN, E(NTER, D(UMP, H(COUNT, B(KPT, F(ILES, T(RACE, Q(UIT?
d r
A=002600 X=000000 L=000042 B=00017D
S=FFFFFF T=FFFFFF P=000029 CC=LT
COMMAND: S(TART, R(UN, E(NTER, D(UMP, H(COUNT, B(KPT, F(ILES, T(RACE, Q(UIT?
d
INVALID STARTING ADDRESS
NO ENDING ADDRESS SPECIFIED
COMMAND: S(TART, R(UN, E(NTER, D(UMP, H(COUNT, B(KPT, F(ILES, T(RACE, Q(UIT?
d
INVALID STARTING ADDRESS
NO ENDING ADDRESS SPECIFIED
COMMAND: S(TART, R(UN, E(NTER, D(UMP, H(COUNT, B(KPT, F(ILES, T(RACE, Q(UIT?
d
INVALID STARTING ADDRESS
NO ENDING ADDRESS SPECIFIED
COMMAND: S(TART, R(UN, E(NTER, D(UMP, H(COUNT, B(KPT, F(ILES, T(RACE, Q(UIT?
d 100-200
0100 01001E0F 20350100 000F2032 6D000375
0110 00000720 2603A029 0720230F A0410320
0120 1A1D0003 0F201403 20141900 030F200E
0130 07200BA0 153B2FDA 4F0000FF FFFFFFFF
0140 FF00005D 00003200 00C50000 37000060
0150 00004100 004A0000 5C00002B 000008FF
0160 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
0170 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
0180 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
0190 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
01A0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
01B0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
01C0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
01D0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
01E0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
01F0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
0200 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
COMMAND: S(TART, R(UN, E(NTER, D(UMP, H(COUNT, B(KPT, F(ILES, T(RACE, Q(UIT?
q
I started working on this problem again t he next morning and noticed where my errors were. INDEX1 needed to be set to 27 instead of 30 since it starts from 0, not 3. After 10 moves it will end up at 27 instead of 30. Also T should be set to 30. I was correct in my assumption that the reversed list of numbers would begin at the memory address where the 10 Reserved Words for BETA are stored. In this case 15C. I will post the correct .lst and sic.log files along with this. I also offer an explanation of the dump below the sic.log.
.lst
*********************************************
University of North Florida: SIC/XE assembler
version date 11/12/2002
account: n00832607; Mon Mar 2 08:35:05 2015
*********************************************
ASSEMBLER REPORT
----------------
Loc Object Code Source Code
--- ----------- -----------
001- 00100 START 100
002- 00100 01001B LDA #27
003- 00103 0F2032 STA INDEX1
004- 00106 010000 LDA #0
005- 00109 0F202F STA INDEX2
006- 0010C 6D0003 LDS #3 . INITALIZE REGISTER S TO 3
007- 0010F 75001E LDT #30 . INITALIZE REGISTER T TO 30
008- 00112 072023 REVLP LDX INDEX1
009- 00115 03A026 LDA ALPHA,X . LOAD WORD FROM ALPHA INTO REGISTER A
010- 00118 072020 LDX INDEX2
011- 0011B 0FA03E STA BETA,X . STORE WORD IN BETA
012- 0011E 032017 LDA INDEX1
013- 00121 1D0003 SUB #3
014- 00124 0F2011 STA INDEX1
015- 00127 032011 LDA INDEX2
016- 0012A 190003 ADD #3
017- 0012D 0F200B STA INDEX2
018- 00130 A015 COMPR X,T . COMPARE NEW X INDEX VALUE TO 30
019- 00132 3B2FDD JLT REVLP . LOOP IF INDEX GREATER THAN 30
020- 00135 4F0000 RSUB
021- 00138 INDEX1 RESW 1
022- 0013B INDEX2 RESW 1
023- 0013E 00005D ALPHA WORD 93
024- 00141 000032 WORD 50
025- 00144 0000C5 WORD 197
026- 00147 000037 WORD 55
027- 0014A 000060 WORD 96
028- 0014D 000041 WORD 65
029- 00150 00004A WORD 74
030- 00153 00005C WORD 92
031- 00156 00002B WORD 43
032- 00159 000008 WORD 8
033- 0015C BETA RESW 10
034- 0017A END
sic.log
SIC SIMULATOR V1.6
File names are:
loader
DEVF1
DEVF2
DEVF3
DEV04
DEV05
DEV06
COMMAND: A(CCEPT file names, R(ENAME 1 or more files
r
loader
DEVF1
Project2.obj
DEVF2
DEVF3
DEV04
DEV05
DEV06
File names are:
loader
Project2.obj
DEVF2
DEVF3
DEV04
DEV05
DEV06
COMMAND: A(CCEPT file names, R(ENAME 1 or more files
a
COMMAND: S(TART, R(UN, E(NTER, D(UMP, H(COUNT, B(KPT, F(ILES, T(RACE, Q(UIT?
s
COMMAND: S(TART, R(UN, E(NTER, D(UMP, H(COUNT, B(KPT, F(ILES, T(RACE, Q(UIT?
r
1000 INSTRUCTIONS EXECUTED
P=00005C
COMMAND: S(TART, R(UN, E(NTER, D(UMP, H(COUNT, B(KPT, F(ILES, T(RACE, Q(UIT?
r
1000 INSTRUCTIONS EXECUTED
P=00002F
COMMAND: S(TART, R(UN, E(NTER, D(UMP, H(COUNT, B(KPT, F(ILES, T(RACE, Q(UIT?
r
1000 INSTRUCTIONS EXECUTED
P=000056
COMMAND: S(TART, R(UN, E(NTER, D(UMP, H(COUNT, B(KPT, F(ILES, T(RACE, Q(UIT?
r
1000 INSTRUCTIONS EXECUTED
P=00003C
COMMAND: S(TART, R(UN, E(NTER, D(UMP, H(COUNT, B(KPT, F(ILES, T(RACE, Q(UIT?
r
1000 INSTRUCTIONS EXECUTED
P=00012A
COMMAND: S(TART, R(UN, E(NTER, D(UMP, H(COUNT, B(KPT, F(ILES, T(RACE, Q(UIT?
r
ATTEMPT TO READ DEVF1 PAST END OF FILE
P=000053
COMMAND: S(TART, R(UN, E(NTER, D(UMP, H(COUNT, B(KPT, F(ILES, T(RACE, Q(UIT?
d 100-200
0100 01001B0F 20320100 000F202F 6D000375
0110 001E0720 2303A026 0720200F A03E0320
0120 171D0003 0F201103 20111900 030F200B
0130 A0153B2F DD4F0000 FFFFFA00 00210000
0140 5D000032 0000C500 00370000 60000041
0150 00004A00 005C0000 2B000008 00000800
0160 002B0000 5C00004A 00004100 00600000
0170 370000C5 00003200 005D0000 1EFFFFFF
0180 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
0190 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
01A0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
01B0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
01C0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
01D0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
01E0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
01F0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
0200 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
COMMAND: S(TART, R(UN, E(NTER, D(UMP, H(COUNT, B(KPT, F(ILES, T(RACE, Q(UIT?
q
13E - 93
141 - 50
144 - 197
147 - 55
14A - 96
14D - 65
150 - 74
153 - 92
156 - 43
159 - 8
15C - 8
15F - 43
162 - 92
165 - 74
168 - 65
16B - 96
16E - 55
171 - 197
174 - 50
177 - 93
As you can see in the dump 159 is where the last number from the list in ALPHA is. Its object code being 000008. Then directly after that in 15C there is another 000008 which begins the reversed list.