Now what?
Roger Heflin
rah at horizon.hit.net
Tue May 25 18:21:44 GMT 1999
THere is not real easy reason. The good disassemblers assign a Lxxx
type address for a label if part of hte disassembled program access
that data point. Where there are big jumps (big is more than 1 or 2
bytes and less that say 256) that may mean there is a table there.
To really understand things you need to look at how the disassembled
program is accessing things. Also if the program is accessing things
indirectly the disassemblers won't detect it. Indirectly is taking a
starting address and adding something to it (table indexing), or
reading a list of addressses from memory and accessing thos addresses
(the ALDL output code does this). The disassemblers will only detect
the direct access in the instructions.
Looking at the code is really the only way to figure out things. If
you have the ALDL output stream that is a good place to start.
Roger
On Tue, 25 May 1999, Bruce Plecan wrote:
> I have some questions, if you look thru this,
>
> 0000 L0000 = 0x0000
> 0000 L0010 = 0x0010 Why do the numbers "jump", here??
> 0010 L0011 = 0x0011
> 0011 L0012 = 0x0012
> 0012 L0013 = 0x0013
> 0013 L0014 = 0x0014
> 0014 L0015 = 0x0015
> 0015 L0016 = 0x0016
> 0016 L0017 = 0x0017
>
> snip
>
> 0030 L0031 = 0x0031
> 0031 L0033 = 0x0033
> 0033 L0034 = 0x0034
> 0034 L0035 = 0x0035
> 0035 L0036 = 0x0036
> 0036 L0037 = 0x0037
> 0037 L0038 = 0x0038
> 0038 L0039 = 0x0039 What happens here?.
> 0039 L0048 = 0x0048
> 0048 L0058 = 0x0058
> 0058 L0059 = 0x0059
> 0059 L005A = 0x005A
> 005A L005B = 0x005B
> 005B L005D = 0x005D
>
> snip
>
> 5006 L5009 = 0x5009 Why the jump to the 5 "prefix"
> 5009 L500C = 0x500C
> 500C L500F = 0x500F
> 500F L5012 = 0x5012
> 5012 L6000 = 0x6000
>
>
> 8000 .area CODE1 (ABS)
> 8000 .org 0x8000
> 8000
> 8000 .byte 0x08,0x74,0x0A,0xC6,0x59,0x65,0x00,0x00
> 8008 .byte 0x5B,0x00,0x20,0x0F,0x4A,0x4A,0x4A,0x4A
> 8010 .byte 0x4A,0x4A,0x4A,0x4A,0x4A,0x4A,0x44,0x3F
> 8018 .byte 0x39,0x33,0x33,0x4A,0x4A,0x4A,0x4A,0x4A
> 8020 .byte 0x55,0x55,0x55,0x50,0x4A,0x44,0x3F,0x39
> 8028 .byte 0x33,0x33,0x4A,0x4A,0x4A,0x4A,0x55,0x5B
> 8030 .byte 0x61,0x5B,0x55,0x50,0x44,0x3F,0x39,0x33
> 8038 .byte 0x33,0x55,0x55,0x55,0x61,0x66,0x6C,0x66
> 8040 .byte 0x61,0x5B,0x55,0x50,0x44,0x3C,0x33,0x33
> 8048 .byte 0x55,0x55,0x72,0x77,0x7D,0x77,0x72,0x6C
> 8050 .byte 0x66,0x5B,0x55,0x4A,0x41,0x33,0x33,0x55
> 8058 .byte 0x55,0x77,0x7D,0x83,0x7D,0x77,0x72,0x66
> 8060 .byte 0x5B,0x55,0x50,0x44,0x39,0x39,0x55,0x55
> 8068 .byte 0x77,0x7D,0x89,0x7D,0x77,0x72,0x66,0x5B
> 8070 .byte 0x55,0x50,0x4A,0x39,0x39,0x55,0x55,0x77
> 8078 .byte 0x83,0x89,0x83,0x7D,0x72,0x66,0x5B,0x55
> 8080 .byte 0x50,0x4A,0x3C,0x3C,0x55,0x55,0x77,0x83
> 8088 .byte 0x89,0x83,0x7D,0x72,0x6C,0x61,0x5B,0x55
> 8090 .byte 0x50,0x3F,0x3F,0x55,0x55,0x77,0x83,0x89
> 8098 .byte 0x83,0x7D,0x77,0x72,0x66,0x5B,0x55,0x52
> 80A0 .byte 0x41,0x41,0x55,0x55,0x77,0x7D,0x89,0x7D
> 80A8 .byte 0x83,0x7D,0x77,0x6C,0x5E,0x58,0x55,0x44
> 80B0 .byte 0x44,0x55,0x55,0x77,0x7D,0x89,0x89,0x89
> 80B8 .byte 0x83,0x7D,0x72,0x5E,0x5B,0x58,0x44,0x44
> 80C0 .byte 0x55,0x55,0x77,0x7D,0x89,0x89,0x89,0x83
> 80C8 .byte 0x7D,0x72,0x5E,0x5E,0x5E,0x47,0x47,0x55
> 80D0 .byte 0x55,0x77,0x7D,0x89,0x89,0x89,0x83,0x7D
> 80D8 .byte 0x72,0x5E,0x5E,0x5E,0x47,0x47,0x55,0x55
> 80E0 .byte 0x77,0x7D,0x89,0x89,0x89,0x83,0x7D,0x72
> 80E8 .byte 0x61,0x5E,0x5E,0x4A,0x4A,0x55,0x55,0x77
> 80F0 .byte 0x7D,0x89,0x89,0x89,0x83,0x7D,0x72,0x61
> 80F8 .byte 0x61,0x61,0x50,0x50,0x55,0x55,0x77,0x7D
> 8100 .byte 0x89,0x89,0x89,0x83,0x7D,0x72,0x64,0x61
> 8108 .byte 0x61,0x5B,0x58,0x20,0x20,0x07,0x64,0x69
> 8110 .byte 0x69,0x69,0x6F,0x75,0x7A,0x64,0x69,0x69
> 8118 .byte 0x69,0x6F,0x75,0x7A,0x64,0x69,0x69,0x69
> 8120 .byte 0x6F,0x75,0x7A,0x64,0x64,0x64,0x69,0x6C
> 8128 .byte 0x6F,0x72,0x64,0x64,0x64,0x66,0x68,0x69
> 8130 .byte 0x6F,0x64,0x64,0x64,0x64,0x68,0x6C,0x6F
> 8138 .byte 0x64,0x64,0x64,0x64,0x66,0x69,0x6C,0x64
> 8140 .byte 0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64
> 8148 .byte 0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64
> 8150 .byte 0x64,0x64,0x64,0x64,0x61,0x61,0x61,0x5B
> 8158 .byte 0x58,0x55,0x64,0x69,0x69,0x69,0x58,0x55
> 8160 .byte 0x52,0x64
> 8162 L8162: .byte 0xC7
> 8163 L8163: .byte 0x64
> 8164 L8164: .byte 0x64
> 8165 L8165: .byte 0x09,0x4F
> 8167 L8167: .byte 0x05
> 8168 L8168: .byte 0x0C,0xCD
> 816A L816A: .byte 0x05
> 816B L816B: .byte 0x0D
> 816C L816C: .byte 0x00,0x2B
> 816E L816E: .byte 0xFF,0x39
> 8170 L8170: .byte 0xFF,0xEE
>
> snip
>
> 90FC L90FC: pulx What needs to be done with this to make sense of
> it??
> 90FD pulx
> 90FE pula
> 90FF pulb
> 9100 ins
> 9101 rts
> 9102 L9102: pshy
> 9104 pshb
> 9105 pshx
> 9106 suba 0x00,x
> 9108 bcc L910B
> 910A clra
> 910B L910B: subb 0x01,x
> 910D bcc L9110
> 910F clrb
> 9110 L9110: pshx
> 9111 puly
> 9113 psha
> 9114 ldaa #0x10
> 9116 mul
> 9117 pshb
> 9118 tab
> 9119 abx
> 911A pula
> 911B pulb
> 911C psha
> 911D ldaa #0x10
> 911F mul
> 9120 pshb
> 9121 ldab 0x02,y
> 9124 mul
> 9125 abx
> 9126 pshx
> 9127 ldab 0x02,y
> 912A abx
> 912B tsy
> 912D ldd 0x03,x
> 912F sba
> 9130 ldab 0x03,y
> 9133 bcc L913B
> 9135 nega
> 9136 mul
> 9137 adca 0x03,x
> 9139 bra L9141
> 913B L913B: mul
> 913C adca #0x00
> 913E nega
> 913F adda 0x03,x
> 9141 L9141: pulx
> 9142 psha
> 9143 ldd 0x03,x
> 9145 sba
> 9146 ldab 0x03,y
> 9149 bcc L9151
> 914B nega
> 914C mul
> 914D adca 0x03,x
> 914F bra L9157
> 9151 L9151: mul
> 9152 adca #0x00
> 9154 nega
> 9155 adda 0x03,x
> 9157 L9157: pulb
> 9158 psha
> 9159 sba
> 915A ldab 0x02,y
> 915D bcc L9166
> 915F nega
> 9160 mul
> 9161 adca 0x01,y
> 9164 bra L916D
> 9166 L9166: mul
> 9167 adca #0x00
> 9169 nega
> 916A adda 0x01,y
> 916D L916D: ins
> 916E pulx
> 916F pulx
> 9170 pulb
> 9171 puly
> 9173 rts
> 9174 L9174: pshx
> 9175 pshb
> 9176 ldab 0x00,x
> 9178 inx
> 9179 bra L9183
> 917B L917B: sba
> 917C bcc L917F
> 917E clra
> 917F L917F: pshx
> 9180 pshb
> 9181 ldab #0x10
> 9183 L9183: mul
> 9184 pshb
> 9185 tab
> 9186 abx
> 9187 ldd 0x00,x
> 9189 sba
> 918A pulb
> 918B bcc L9193
> 918D nega
> 918E mul
> 918F adca 0x00,x
> 9191 bra L9199
> 9193 L9193: mul
> 9194 adca #0x00
> 9196 nega
> 9197 adda 0x00,x
> 9199 L9199: pulb
> 919A pulx
> 919B rts
> 919C L919C: pshb
> 919D pshx
> 919E pshx
> 919F tsx
> 91A0 suba 0x00,x
> 91A2 bcc L91AB
> 91A4 negb
> 91A5 addb 0x00,x
> 91A7 stab 0x00,x
> 91A9 ldab 0x04,x
> 91AB L91AB: mul
> 91AC stab 0x01,x
> 91AE psha
> 91AF ldd 0x03,x
> 91B1 negb
> 91B2 beq L91B7
> 91B4 mul
> 91B5 adca #0x00
> 91B7 L91B7: tab
> 91B8 pula
> 91B9 addd 0x00,x
> 91BB pulx
> 91BC pulx
> 91BD ins
> 91BE rts
> 91BF E0VECT: pshx
> 91C0 pshb
> 91C1 psha
> 91C2 lsrd
> 91C3 psha
> 91C4 ldy #0x0000
> 91C8 tba
> 91C9 beq L91D9
> 91CB L91CB: ldab 0x00,x
> 91CD aby
> 91CF ldab 0x01,x
> 91D1 aby
> 91D3 ldab #0x02
> 91D5 abx
> 91D6 deca
> 91D7 bne L91CB
> 91D9 L91D9: pshx
> 91DA ldx #0xFF00
> 91DD stx L400B
> 91E0 tsx
> 91E1 dec 0x02,x
> 91E3 pulx
> 91E4 bpl L91CB
> 91E6 ins
> 91E7 pula
> 91E8 pulb
> 91E9 pulx
> 91EA rts
> 91EB ECVECT: ldx #0x4000
> 91EE bclr 0x04,x,#0x04
> 91F1 bra L91F9
>
> snip
>
> FFF4 VECTF4: .word F4VECT OK ??
> FFF6 VECTF6: .word F6VECT
> FFF8 VECTF8: .word F8VECT
> FFFA VECTFA: .word FAVECT
> FFFC VECTFC: .word FCVECT
> FFFE RSTVEC: .word RESET
> 0000 ; .end
>
> Thanks
> Doc Grumpy Sneezy Sleepy Bashful
>
>
More information about the Gmecm
mailing list