initial 'T' command adaptation, does not work yet

This commit is contained in:
FeralChild64 authored and FeralChild64 committed 2021-01-26 00:03:07 +01:00
1 parent bceb6bba4e
commit fcd1c7a495
6 files changed
+115 -46

No files matched your search

+42
View File
@@ -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