adapted monitor command 'C'
This commit is contained in:
1 parent
b87830c036
commit
b33a7a2905
4 files changed
+52
-22
No files matched your search
@@ -59,7 +59,8 @@
|
||||
!addr Op_Ix = $2E ; type of constant
|
||||
!addr Op_Len = $2F ; length of operand
|
||||
|
||||
; $30-$63 - free space, unused for now
|
||||
; $30-$62 - free space, unused for now
|
||||
|
||||
!addr Byte_TMP = $63 ; temporary byte
|
||||
!addr Long_TMP = $64 ; temporary pointer, for fetching/storing memory content; has to be the same as Long__TMP in Kernal
|
||||
!addr Mon_Data = $68 ; 40 bytes, buffer for hunt
|
||||
+1
-21
@@ -191,7 +191,7 @@ Jump_Table:
|
||||
|
||||
!word Mon_Assemble ; A XXX to be debugged/adapted
|
||||
!word Mon_Bits ; B
|
||||
!word Mon_Compare ; C XXX to be debugged/adapted
|
||||
!word Mon_Compare ; C
|
||||
!word Mon_Disassemble ; D
|
||||
!word Mon_Fill ; F
|
||||
!word Mon_Go ; G XXX to be debugged/adapted
|
||||
@@ -550,26 +550,6 @@ Dump_Row:
|
||||
PLZ
|
||||
RTS
|
||||
|
||||
; **********
|
||||
Mon_Compare:
|
||||
; **********
|
||||
|
||||
JSR Get_Param_Range ; Long_PC = source
|
||||
LBCS Mon_Error ; Long_CT = count
|
||||
JSR Get_LAC ; Long_AC = target
|
||||
LBCS Mon_Error
|
||||
JSR Print_CR
|
||||
LDZ #0
|
||||
@loop LDA [Long_PC],Z
|
||||
CMP [Long_AC],Z
|
||||
BEQ @laba
|
||||
JSR Print_LPC_Addr
|
||||
@laba JSR Inc_LAC
|
||||
JSR Inc_LPC
|
||||
JSR Dec_LCT
|
||||
BPL @loop
|
||||
JMP Main
|
||||
|
||||
; *******
|
||||
Mon_Hunt:
|
||||
; *******
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
|
||||
; Based on BSM (Bit Shifter's Monitor)
|
||||
|
||||
|
||||
Mon_Compare:
|
||||
|
||||
jsr Get_Param_Range ; Long_PC = source
|
||||
+bcs Mon_Error ; Long_CT = count
|
||||
jsr Get_LAC ; Long_AC = target
|
||||
+bcs Mon_Error
|
||||
|
||||
lda Src_Addr_Mode
|
||||
ora Dst_Addr_Mode
|
||||
sta Src_Addr_Mode
|
||||
|
||||
lda Addr_Mode
|
||||
sta Dst_Addr_Mode
|
||||
|
||||
jsr Print_CR
|
||||
ldz #0
|
||||
|
||||
@loop:
|
||||
|
||||
lda Dst_Addr_Mode
|
||||
sta Addr_Mode
|
||||
jsr Get_From_Memory_LAC
|
||||
sta Byte_TMP
|
||||
|
||||
lda Src_Addr_Mode
|
||||
sta Addr_Mode
|
||||
jsr Get_From_Memory_LPC
|
||||
|
||||
cmp Byte_TMP
|
||||
beq @laba
|
||||
jsr Print_LPC_Addr
|
||||
|
||||
@laba:
|
||||
|
||||
jsr Inc_LAC
|
||||
jsr Inc_LPC
|
||||
jsr Dec_LCT
|
||||
bpl @loop
|
||||
jmp Main
|
||||
@@ -1,6 +1,12 @@
|
||||
|
||||
; Monitor helper code - memory read and write
|
||||
|
||||
Get_From_Memory_LAC:
|
||||
|
||||
jsr Exchange_LAC_LPC
|
||||
jsr Get_From_Memory_LPC
|
||||
jmp Exchange_LAC_LPC
|
||||
|
||||
Get_From_Memory_LDA:
|
||||
|
||||
jsr Exchange_LDA_LPC
|
||||
|
||||
Reference in new issue
Block a user