another monitor integration bugfix, added some debug code
This commit is contained in:
1 parent
e3656bf273
commit
cf92df4acd
2 files changed
+111
-5
No files matched your search
@@ -0,0 +1,105 @@
|
||||
|
||||
;
|
||||
; Helper code for debugging the monitor
|
||||
;
|
||||
|
||||
; XXX disable this code once the monitor integration is complete
|
||||
|
||||
|
||||
DBG_print_long_pc:
|
||||
|
||||
php
|
||||
pha
|
||||
phx
|
||||
phy
|
||||
phz
|
||||
|
||||
jsr PRIMM
|
||||
!pet $0D, "long pc : ", 0
|
||||
|
||||
lda Long_PC+3
|
||||
jsr Print_Hex
|
||||
lda Long_PC+2
|
||||
jsr Print_Hex
|
||||
lda Long_PC+1
|
||||
jsr Print_Hex
|
||||
lda Long_PC+0
|
||||
jsr Print_Hex
|
||||
|
||||
jsr PRIMM
|
||||
!pet " addr mode : ", 0
|
||||
|
||||
lda Adr_Mode
|
||||
jsr Print_Hex
|
||||
|
||||
jsr PRIMM
|
||||
!pet " :: ", 0
|
||||
|
||||
plz
|
||||
ply
|
||||
plx
|
||||
pla
|
||||
plp
|
||||
|
||||
rts
|
||||
|
||||
DBG_print_hex:
|
||||
|
||||
php
|
||||
pha
|
||||
phx
|
||||
phy
|
||||
phz
|
||||
|
||||
pha
|
||||
jsr PRIMM
|
||||
!pet $0D, "hex : ", 0
|
||||
pla
|
||||
|
||||
jsr Print_Hex
|
||||
|
||||
plz
|
||||
ply
|
||||
plx
|
||||
pla
|
||||
plp
|
||||
|
||||
rts
|
||||
|
||||
DBG_print_CP1:
|
||||
|
||||
php
|
||||
pha
|
||||
phx
|
||||
phy
|
||||
phz
|
||||
|
||||
jsr PRIMM
|
||||
!pet $0D, "checkpoint 1", 0
|
||||
|
||||
jmp DBG_END
|
||||
|
||||
DBG_print_CP2:
|
||||
|
||||
php
|
||||
pha
|
||||
phx
|
||||
phy
|
||||
phz
|
||||
|
||||
jsr PRIMM
|
||||
!pet $0D, "checkpoint 2", 0
|
||||
|
||||
; FALLTROUGH
|
||||
|
||||
DBG_END:
|
||||
|
||||
plz
|
||||
ply
|
||||
plx
|
||||
pla
|
||||
plp
|
||||
|
||||
rts
|
||||
|
||||
|
||||
@@ -16,13 +16,14 @@ Get_From_Memory:
|
||||
adc Long_PC+0
|
||||
sta Long_TMP+0
|
||||
|
||||
ldx #$02
|
||||
ldx #$01
|
||||
@1:
|
||||
lda Long_PC+1,x
|
||||
lda Long_PC+0,x
|
||||
adc #$00
|
||||
sta Long_TMP+1,x
|
||||
dex
|
||||
bpl @1
|
||||
sta Long_TMP+0,x
|
||||
inx
|
||||
cpx #$04
|
||||
bne @1
|
||||
|
||||
ldz #$00
|
||||
|
||||
|
||||
Reference in new issue
Block a user