another monitor integration bugfix, added some debug code
This commit is contained in:
1 parent
e515a42607
commit
7ad9a91fb4
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
|
adc Long_PC+0
|
||||||
sta Long_TMP+0
|
sta Long_TMP+0
|
||||||
|
|
||||||
ldx #$02
|
ldx #$01
|
||||||
@1:
|
@1:
|
||||||
lda Long_PC+1,x
|
lda Long_PC+0,x
|
||||||
adc #$00
|
adc #$00
|
||||||
sta Long_TMP+1,x
|
sta Long_TMP+0,x
|
||||||
dex
|
inx
|
||||||
bpl @1
|
cpx #$04
|
||||||
|
bne @1
|
||||||
|
|
||||||
ldz #$00
|
ldz #$00
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user