1 ORG $0020 start of RAM (data)
2 AT1 RMB 2
3 Space RMB 1
4 Length RMB 1
5 Count RMB 1
6 Ptr RMB 2
7 ORG $E000 start of ROM (program)
8 START LDX AT1
9 STX Ptr
10 LDAA Length
11 STAA Count
12 LDAB Space
13 LOOP TST Count
14 BEQ STOP
15 LDX Ptr
16 LDAA 0,X
17 ABX
18 STAA 0,X
19 DEC Count
20 LDX Ptr
21 INX
22 STX Ptr
23 BRA LOOP
24 STOP
1) Show a scenario if a 6-element table is copied from address 007f to 009d (you may arbitrarily enter the values of the 6 elements).
2) Revise the program so the TST Count on line 13 will not be needed. (i.e., the BEQ branch instruction on line 14 will examine the right status of program execution to determine the branch condition.)
3) Revise the program so the “Ptr RMB 2” on line 6 will not be used. Instead, Register X points to the element in Table 1, and Register Y points to the element in Table 2.
Hey All, I'm stumped on this question...For the third one, my specific question has to do with the Tables...Does X point to Space and Y point to Length? I have no clue what table is being referred to...
For the second one, does that mean that i completely remove the TST line along with the rest of the loop at line 23? What does it mean to examine the "right status" of the program?
Any help would be very nice...Thanks.