Routine labels - easy mode
Easy ways to find some routine labels
The subroutine loop
There are a couple of places to get easy routine labels. The first is at the beginning of the code. Let's have a look:
...
C224 .fill 3291, $FF
CEFF codeStart .org $ceff
CEFF 7E D0 3E jmp reset
CF02 empty2 .fill 254, $FF
D000 02 03 06 07 obdTable .byte $02, $03, $06, $07
D004 16 2F 8A CB .byte $16, $2f, $8a, $cb
D008 44 ED 46 EE .byte $44, $ed, $46, $ee
D00C 40 41 42 40 .byte $40, $41, $42, $40
D010 D3 D4 CF CE .byte $d3, $d4, $cf, $ce
D014 D0 CD 49 D2 .byte $d0, $cd, $49, $d2
D018 40 40 E4 40 .byte $40, $40, $e4, $40
D01C E0 A1 E6 9F .byte $e0, $a1, $e6, $9f
D020 DC DD F1 F3 .byte $dc, $dd, $f1, $f3
D024 FE FD 8B D7 .byte $fe, $fd, $8b, $d7
D028 D8 A7 A8 89 .byte $d8, $a7, $a8, $89
D02C 8D 8E A3 A4 .byte $8d, $8e, $a3, $a4
D030 4B 57 58 59 .byte $4b, $57, $58, $59
D034 5A 5B 9C 9D .byte $5a, $5b, $9c, $9d
D038 4E 4F CC 4C .byte $4e, $4f, $cc, $4c
D03C 4D A2 .byte $4d, $a2
D03E 8E 01 BF reset lds #$01bf
D041 8D 19 bsr L4003
D043 BD D1 7B jsr $d17b
D046 BD DB 20 jsr $db20
D049 BD D9 6C jsr $d96c
D04C BD E1 25 jsr somecode
D04F B6 C0 01 ldaa $c001
D052 97 9C ecuInit staa $9c
...Specifically the reset entry point is of interest
Each of the Jumps-to-SubRoutine (JSR) here are to the various subroutines. As you can see we already gave the last one a name somecode We can simply change that to subroutine4 add the other three as well.
Results in
The labels will now also be before the subroutines later in the code.
The vector table
The second place we can look is at the end of the code, the vector table. This is how the vector table is laid out (as is in the E391 listing file)
Make yours look the same, I think by know you know what to do. ;)
Last updated
Was this helpful?