parent
754e522e20
commit
c27bf4645f
BIN
bin/FSHa.8xp
BIN
bin/FSHa.8xp
Binary file not shown.
|
|
@ -24,6 +24,15 @@ fshcmddecode:
|
||||||
call z, bytecpy
|
call z, bytecpy
|
||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
|
push hl
|
||||||
|
push de
|
||||||
|
ld de, fshcmdCOPY
|
||||||
|
call strcmp
|
||||||
|
ld hl, fshcmdCOPYo
|
||||||
|
pop de
|
||||||
|
call z, bytecpy
|
||||||
|
pop hl
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
ld de, fshcmdVARS
|
ld de, fshcmdVARS
|
||||||
|
|
@ -59,7 +68,11 @@ fshcmdroute:
|
||||||
ld de, fshcmdSETo
|
ld de, fshcmdSETo
|
||||||
call bytecmp
|
call bytecmp
|
||||||
jp z, fshcmdSETf
|
jp z, fshcmdSETf
|
||||||
|
|
||||||
|
ld de, fshcmdCOPYo
|
||||||
|
call bytecmp
|
||||||
|
jp z, fshcmdCOPYf
|
||||||
|
|
||||||
ld de, fshcmdVARSo
|
ld de, fshcmdVARSo
|
||||||
call bytecmp
|
call bytecmp
|
||||||
jp z, fshcmdVARSf
|
jp z, fshcmdVARSf
|
||||||
|
|
|
||||||
|
|
@ -77,29 +77,32 @@ fshvarcpy:
|
||||||
ld bc, FshVarsSize / 2 - 1
|
ld bc, FshVarsSize / 2 - 1
|
||||||
call cpBCDE
|
call cpBCDE
|
||||||
pop bc
|
pop bc
|
||||||
jr c, fshvarcpyOOBException
|
|
||||||
|
|
||||||
push bc
|
|
||||||
push de
|
|
||||||
push hl
|
|
||||||
ld bc, FshVarsSize / 2
|
|
||||||
call cpBCDE
|
|
||||||
jr c, fshvarcpyOOBException
|
jr c, fshvarcpyOOBException
|
||||||
ld bc, FshVars
|
push bc
|
||||||
add hl, hl
|
ld bc, FshVarsSize / 2
|
||||||
add hl, bc
|
call cpHLBC
|
||||||
ex de, hl
|
pop bc
|
||||||
add hl, hl
|
jr nc, fshvarcpyOOBException
|
||||||
add hl, bc
|
|
||||||
ld a, (de)
|
push de
|
||||||
ld (hl), a
|
push hl
|
||||||
|
ld bc, FshVarsSize / 2
|
||||||
|
call cpBCDE
|
||||||
|
jr c, fshvarcpyOOBException
|
||||||
|
ld bc, FshVars
|
||||||
|
add hl, hl
|
||||||
|
add hl, bc
|
||||||
|
ex de, hl
|
||||||
|
add hl, hl
|
||||||
|
add hl, bc
|
||||||
|
ld a, (de)
|
||||||
|
ld (hl), a
|
||||||
inc de
|
inc de
|
||||||
inc hl
|
inc hl
|
||||||
ld a, (de)
|
ld a, (de)
|
||||||
ld (hl), a
|
ld (hl), a
|
||||||
pop hl
|
pop hl
|
||||||
pop de
|
pop de
|
||||||
pop bc
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
fshvarcpyOOBException:
|
fshvarcpyOOBException:
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#include "includes/commands/EXIT.asm"
|
#include "includes/commands/EXIT.asm"
|
||||||
#include "includes/commands/SET.asm"
|
#include "includes/commands/SET.asm"
|
||||||
|
#include "includes/commands/COPY.asm"
|
||||||
#include "includes/commands/CLS.asm"
|
#include "includes/commands/CLS.asm"
|
||||||
#include "includes/commands/VARS.asm"
|
#include "includes/commands/VARS.asm"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
fshcmdCOPY: .db "COPY", 0
|
||||||
|
fshcmdCOPYo: .db $02
|
||||||
|
fshcmdCOPYu: .db "Copys a value in FSH memory to another addess", 0
|
||||||
|
fshcmdCOPYf:
|
||||||
|
fshcmdCOPYfArg0:
|
||||||
|
ld hl, FshCmdArg0
|
||||||
|
ld de, 0
|
||||||
|
ld e, (hl)
|
||||||
|
inc hl
|
||||||
|
ld d, (hl)
|
||||||
|
ex de, hl
|
||||||
|
ld de, 0
|
||||||
|
call cpHLDE
|
||||||
|
jr nz, fshcmdCOPYfArg1
|
||||||
|
fshcmdCOPYfArg0Get:
|
||||||
|
ld a, 'G'
|
||||||
|
call _PutC
|
||||||
|
xor a
|
||||||
|
ld (CurCol), a
|
||||||
|
ld hl, fshcmdCOPYfDSource
|
||||||
|
call _PutS
|
||||||
|
ld hl, fshcmdCOPYfInputBuffer
|
||||||
|
ld de, 3
|
||||||
|
call inputnumstr
|
||||||
|
call strtob
|
||||||
|
ld hl, FshCmdArg0
|
||||||
|
ld (hl), a
|
||||||
|
call _NewLine
|
||||||
|
fshcmdCOPYfArg1:
|
||||||
|
ld hl, FshCmdArg1
|
||||||
|
ld de, 0
|
||||||
|
ld e, (hl)
|
||||||
|
inc hl
|
||||||
|
ld d, (hl)
|
||||||
|
ex de, hl
|
||||||
|
ld de, 0
|
||||||
|
call cpHLDE
|
||||||
|
jr nz, fshcmdCOPYfExe
|
||||||
|
fshcmdCOPYfArg1Get:
|
||||||
|
xor a
|
||||||
|
ld (CurCol), a
|
||||||
|
ld hl, fshcmdCOPYfDDestination
|
||||||
|
call _PutS
|
||||||
|
ld hl, fshcmdCOPYfInputBuffer
|
||||||
|
ld de, 3
|
||||||
|
call inputnumstr
|
||||||
|
call strtob
|
||||||
|
ex de, hl
|
||||||
|
ld hl, FshCmdArg1
|
||||||
|
ld (hl), a
|
||||||
|
fshcmdCOPYfExe:
|
||||||
|
ld hl, FshCmdArg0
|
||||||
|
ld de, 0
|
||||||
|
ld e, (hl)
|
||||||
|
ex de, hl
|
||||||
|
push hl
|
||||||
|
ld hl, FshCmdArg1
|
||||||
|
ld de, 0
|
||||||
|
ld e, (hl)
|
||||||
|
pop hl
|
||||||
|
;ld de, $77
|
||||||
|
call fshvarcpy
|
||||||
|
call _NewLine
|
||||||
|
jp ErrCatch
|
||||||
|
|
||||||
|
fshcmdCOPYfInputBuffer: .db $00, $00, $00, $00, $00, $00
|
||||||
|
fshcmdCOPYfDSource: .db "Source= ", 0
|
||||||
|
fshcmdCOPYfDDestination: .db "Destination= ", 0
|
||||||
|
|
@ -66,5 +66,5 @@ fshcmdSETfExe:
|
||||||
jp ErrCatch
|
jp ErrCatch
|
||||||
|
|
||||||
fshcmdSETfInputBuffer: .db $00, $00, $00, $00, $00, $00
|
fshcmdSETfInputBuffer: .db $00, $00, $00, $00, $00, $00
|
||||||
fshcmdSETfDIndex: .db "Index= ", 0
|
fshcmdSETfDIndex: .db "Destination= ", 0
|
||||||
fshcmdSETfDValue: .db "Value= ", 0
|
fshcmdSETfDValue: .db "Value= ", 0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue