initial 'T' command adaptation, does not work yet
This commit is contained in:
1 parent
541e84c4bb
commit
8bc074c070
6 files changed
+115
-46
No files matched your search
@@ -26,8 +26,8 @@
|
|||||||
; * Other variables *
|
; * Other variables *
|
||||||
; *******************
|
; *******************
|
||||||
|
|
||||||
!addr Src_Addr_Mode = 13 ; Addr_Mode for 1st address
|
!addr Src_Addr_Mode = 13 ; Addr_Mode for 1st address XXX can this be replaced with Addr_Mode?
|
||||||
!addr Dst_Addr_Mode = 14 ; Addr_Mode for 2nd address
|
!addr Dst_Addr_Mode = 14 ; Addr_Mode for 2nd address XXX is it needed?
|
||||||
|
|
||||||
!addr MODE_80 = 15 ; 80 column / 40 volumn flag
|
!addr MODE_80 = 15 ; 80 column / 40 volumn flag
|
||||||
|
|
||||||
|
|||||||
+7
-40
@@ -199,7 +199,7 @@ Jump_Table:
|
|||||||
!word Mon_JSR ; J XXX to be debugged/adapted
|
!word Mon_JSR ; J XXX to be debugged/adapted
|
||||||
!word Mon_Memory ; M
|
!word Mon_Memory ; M
|
||||||
!word Mon_Register ; R
|
!word Mon_Register ; R
|
||||||
!word Mon_Transfer ; T XXX to be debugged/adapted
|
!word Mon_Transfer ; T XXX to be bugfixed
|
||||||
!word Mon_Exit ; X
|
!word Mon_Exit ; X
|
||||||
!word Mon_DOS ; @
|
!word Mon_DOS ; @
|
||||||
!word Mon_Assemble ; . XXX to be debugged/adapted
|
!word Mon_Assemble ; . XXX to be debugged/adapted
|
||||||
@@ -399,7 +399,7 @@ Fetch:
|
|||||||
PHZ
|
PHZ
|
||||||
TYA
|
TYA
|
||||||
TAZ
|
TAZ
|
||||||
JSR Get_From_Memory
|
JSR Get_From_Memory_LPC
|
||||||
PLZ
|
PLZ
|
||||||
AND #$ff
|
AND #$ff
|
||||||
RTS
|
RTS
|
||||||
@@ -482,10 +482,10 @@ Mon_JSR:
|
|||||||
jmp Main
|
jmp Main
|
||||||
|
|
||||||
; ***********
|
; ***********
|
||||||
Dump_4_Bytes: ; XXX to be adapted
|
Dump_4_Bytes:
|
||||||
; ***********
|
; ***********
|
||||||
|
|
||||||
@loop JSR Get_From_Memory
|
@loop JSR Get_From_Memory_LPC
|
||||||
JSR Print_Hex_Blank
|
JSR Print_Hex_Blank
|
||||||
INZ
|
INZ
|
||||||
TZA
|
TZA
|
||||||
@@ -494,10 +494,10 @@ Dump_4_Bytes: ; XXX to be adapted
|
|||||||
RTS
|
RTS
|
||||||
|
|
||||||
; ***********
|
; ***********
|
||||||
Dump_4_Chars: ; XXX to be adapted
|
Dump_4_Chars:
|
||||||
; ***********
|
; ***********
|
||||||
|
|
||||||
@loop JSR Get_From_Memory
|
@loop JSR Get_From_Memory_LPC
|
||||||
TAY
|
TAY
|
||||||
AND #%01100000
|
AND #%01100000
|
||||||
BNE @laba
|
BNE @laba
|
||||||
@@ -550,39 +550,6 @@ Dump_Row:
|
|||||||
PLZ
|
PLZ
|
||||||
RTS
|
RTS
|
||||||
|
|
||||||
; ***********
|
|
||||||
Mon_Transfer:
|
|
||||||
; ***********
|
|
||||||
|
|
||||||
JSR Get_Param_Range ; Long_PC = source
|
|
||||||
LBCS Mon_Error ; Long_CT = count
|
|
||||||
JSR Get_LAC ; Long_AC = target
|
|
||||||
LBCS Mon_Error
|
|
||||||
|
|
||||||
LDZ #0
|
|
||||||
JSR LAC_Compare_LPC ; target - source
|
|
||||||
BCC @forward
|
|
||||||
|
|
||||||
; source < target: backward transfer
|
|
||||||
|
|
||||||
JSR LAC_Plus_LCT ; Long_AC = end of target
|
|
||||||
|
|
||||||
@lpback LDA [Long_DA],Z ; backward copy
|
|
||||||
STA [Long_AC],Z
|
|
||||||
JSR Dec_LDA
|
|
||||||
JSR Dec_LAC
|
|
||||||
JSR Dec_LCT
|
|
||||||
BPL @lpback
|
|
||||||
JMP Main
|
|
||||||
|
|
||||||
@forward LDA [Long_PC],Z ; forward copy
|
|
||||||
STA [Long_AC],Z
|
|
||||||
JSR Inc_LPC
|
|
||||||
JSR Inc_LAC
|
|
||||||
JSR Dec_LCT
|
|
||||||
BPL @forward
|
|
||||||
JMP Main
|
|
||||||
|
|
||||||
; **********
|
; **********
|
||||||
Mon_Compare:
|
Mon_Compare:
|
||||||
; **********
|
; **********
|
||||||
@@ -2325,7 +2292,7 @@ Mon_Help:
|
|||||||
!pet KEY_ESC,'s',"g",KEY_ESC,'u',"o - g [address]",KEY_RETURN
|
!pet KEY_ESC,'s',"g",KEY_ESC,'u',"o - g [address]",KEY_RETURN
|
||||||
!pet KEY_ESC,'s',"h",KEY_ESC,'u',"unt - h from to (string or bytes)",KEY_RETURN
|
!pet KEY_ESC,'s',"h",KEY_ESC,'u',"unt - h from to (string or bytes)",KEY_RETURN
|
||||||
!pet KEY_ESC,'s',"j",KEY_ESC,'u',"sr - j address",KEY_RETURN
|
!pet KEY_ESC,'s',"j",KEY_ESC,'u',"sr - j address",KEY_RETURN
|
||||||
!pet KEY_ESC,'s',"l",KEY_ESC,'u',"oad - l filename [uniy [address]]",KEY_RETURN
|
!pet KEY_ESC,'s',"l",KEY_ESC,'u',"oad - l filename [unit [address]]",KEY_RETURN
|
||||||
!pet KEY_ESC,'s',"m",KEY_ESC,'u',"emory - m [from [to]]",KEY_RETURN
|
!pet KEY_ESC,'s',"m",KEY_ESC,'u',"emory - m [from [to]]",KEY_RETURN
|
||||||
!pet KEY_ESC,'s',"r",KEY_ESC,'u',"egisters - r",KEY_RETURN
|
!pet KEY_ESC,'s',"r",KEY_ESC,'u',"egisters - r",KEY_RETURN
|
||||||
!pet KEY_ESC,'s',"s",KEY_ESC,'u',"ave - s filename unit from to",KEY_RETURN
|
!pet KEY_ESC,'s',"s",KEY_ESC,'u',"ave - s filename unit from to",KEY_RETURN
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ Mon_Bits:
|
|||||||
|
|
||||||
plx
|
plx
|
||||||
|
|
||||||
jsr Get_From_Memory
|
jsr Get_From_Memory_LPC
|
||||||
jsr Print_Bits
|
jsr Print_Bits
|
||||||
clc
|
clc
|
||||||
tza
|
tza
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ Mon_Fill:
|
|||||||
@loop:
|
@loop:
|
||||||
|
|
||||||
lda Long_AC
|
lda Long_AC
|
||||||
jsr Put_To_Memory
|
jsr Put_To_Memory_LPC
|
||||||
jsr Inc_LPC
|
jsr Inc_LPC
|
||||||
jsr Dec_LCT
|
jsr Dec_LCT
|
||||||
bpl @loop
|
bpl @loop
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
|
||||||
|
; Based on BSM (Bit Shifter's Monitor)
|
||||||
|
|
||||||
|
|
||||||
|
Mon_Transfer:
|
||||||
|
|
||||||
|
jsr Get_Param_Range ; Long_PC = source
|
||||||
|
; Long_CT = count
|
||||||
|
|
||||||
|
jsr Get_Addr_To_LAC ; Long_AC = target
|
||||||
|
+beq Mon_Error
|
||||||
|
|
||||||
|
lda Src_Addr_Mode
|
||||||
|
sta Addr_Mode
|
||||||
|
|
||||||
|
ldz #0
|
||||||
|
jsr LAC_Compare_LPC ; target - source
|
||||||
|
bcc @forward
|
||||||
|
|
||||||
|
; source < target: backward transfer
|
||||||
|
|
||||||
|
jsr LAC_Plus_LCT ; Long_AC = end of target
|
||||||
|
|
||||||
|
@lpback:
|
||||||
|
|
||||||
|
jsr Get_From_Memory_LDA ; backward copy
|
||||||
|
jsr Put_To_Memory_LAC
|
||||||
|
jsr Dec_LDA
|
||||||
|
jsr Dec_LAC
|
||||||
|
jsr Dec_LCT
|
||||||
|
bpl @lpback
|
||||||
|
jmp Main
|
||||||
|
|
||||||
|
@forward:
|
||||||
|
|
||||||
|
jsr Get_From_Memory_LPC ; forward copy
|
||||||
|
jsr Put_To_Memory_LAC
|
||||||
|
jsr Inc_LPC
|
||||||
|
jsr Inc_LAC
|
||||||
|
jsr Dec_LCT
|
||||||
|
bpl @forward
|
||||||
|
jmp Main
|
||||||
@@ -1,8 +1,13 @@
|
|||||||
|
|
||||||
; Monitor helper code - memory read and write
|
; Monitor helper code - memory read and write
|
||||||
|
|
||||||
|
Get_From_Memory_LDA:
|
||||||
|
|
||||||
Get_From_Memory:
|
jsr Exchange_LDA_LPC
|
||||||
|
jsr Get_From_Memory_LPC
|
||||||
|
jmp Exchange_LDA_LPC
|
||||||
|
|
||||||
|
Get_From_Memory_LPC:
|
||||||
|
|
||||||
phx
|
phx
|
||||||
phy
|
phy
|
||||||
@@ -111,7 +116,14 @@ Get_Put_Memory_Prepare_Shadow:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Put_To_Memory:
|
|
||||||
|
Put_To_Memory_LAC:
|
||||||
|
|
||||||
|
jsr Exchange_LAC_LPC
|
||||||
|
jsr Put_To_Memory_LPC
|
||||||
|
jmp Exchange_LAC_LPC
|
||||||
|
|
||||||
|
Put_To_Memory_LPC:
|
||||||
|
|
||||||
phx
|
phx
|
||||||
phy
|
phy
|
||||||
@@ -144,3 +156,51 @@ Put_To_Memory:
|
|||||||
pla
|
pla
|
||||||
jsr monitor_memwrite_helper
|
jsr monitor_memwrite_helper
|
||||||
bra Get_Put_Memory_End
|
bra Get_Put_Memory_End
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Exchange_LDA_LPC:
|
||||||
|
|
||||||
|
phx
|
||||||
|
pha
|
||||||
|
|
||||||
|
ldx #$03
|
||||||
|
|
||||||
|
@loop:
|
||||||
|
|
||||||
|
lda Long_DA,X
|
||||||
|
pha
|
||||||
|
lda Long_PC,X
|
||||||
|
sta Long_DA,X
|
||||||
|
pla
|
||||||
|
sta Long_PC,X
|
||||||
|
|
||||||
|
dex
|
||||||
|
bpl @loop
|
||||||
|
|
||||||
|
pla
|
||||||
|
plx
|
||||||
|
rts
|
||||||
|
|
||||||
|
Exchange_LAC_LPC:
|
||||||
|
|
||||||
|
phx
|
||||||
|
pha
|
||||||
|
|
||||||
|
ldx #$03
|
||||||
|
|
||||||
|
@loop:
|
||||||
|
|
||||||
|
lda Long_AC,X
|
||||||
|
pha
|
||||||
|
lda Long_PC,X
|
||||||
|
sta Long_AC,X
|
||||||
|
pla
|
||||||
|
sta Long_PC,X
|
||||||
|
|
||||||
|
dex
|
||||||
|
bpl @loop
|
||||||
|
|
||||||
|
pla
|
||||||
|
plx
|
||||||
|
rts
|
||||||
Reference in new issue
Block a user