reset fshcmd in input
also made SET use the args instead of just reading them
This commit is contained in:
parent
caf65684c3
commit
2546f299d3
6
FSHa.asm
6
FSHa.asm
|
|
@ -9,17 +9,19 @@ Setup:
|
|||
CALL _homeup ;Put up home
|
||||
CALL _ClrLCDFull ;Clear screen
|
||||
|
||||
LD HL, $FF
|
||||
LD HL, $00
|
||||
CALL fshvarfill
|
||||
|
||||
|
||||
Input:
|
||||
LD HL, $00 ; fill fshcmd with $00
|
||||
CALL fshcmdfill
|
||||
|
||||
XOR A
|
||||
LD (CurCol), A
|
||||
LD HL, PS1
|
||||
CALL _PutS
|
||||
|
||||
;TODO: reset CmdFsh mem
|
||||
LD HL, FshCmd
|
||||
LD DE, 0
|
||||
LD DE, FshCmdInptSize
|
||||
|
|
|
|||
BIN
bin/FSHa.8xp
BIN
bin/FSHa.8xp
Binary file not shown.
|
|
@ -70,4 +70,34 @@ fshcmdroute:
|
|||
|
||||
jp Fin
|
||||
|
||||
; fshcmdfill
|
||||
;; fills fshvars with word
|
||||
;; Inputs:
|
||||
;; HL: 16b
|
||||
fshcmdfill:
|
||||
push hl
|
||||
push de
|
||||
ld d, h
|
||||
ld e, l
|
||||
ld hl, FshCmdArg0
|
||||
ld (hl), e
|
||||
inc hl
|
||||
ld (hl), d
|
||||
inc hl
|
||||
ld (hl), e
|
||||
inc hl
|
||||
ld (hl), d
|
||||
inc hl
|
||||
ld (hl), e
|
||||
inc hl
|
||||
ld (hl), d
|
||||
inc hl
|
||||
ld (hl), e
|
||||
inc hl
|
||||
ld (hl), d
|
||||
pop de
|
||||
pop hl
|
||||
ret
|
||||
|
||||
|
||||
#include "includes/commands.inc"
|
||||
|
|
|
|||
|
|
@ -23,22 +23,20 @@ fshcmdSETfArg0Get:
|
|||
ld de, 3
|
||||
call inputnumstr
|
||||
call strtob
|
||||
ld de, 0
|
||||
ld e, a
|
||||
ld hl, FshCmdArg0
|
||||
ld (hl), a
|
||||
call _NewLine
|
||||
fshcmdSETfArg1:
|
||||
push de
|
||||
ld hl, FshCmdArg1
|
||||
ld de, 0
|
||||
ld e, (hl)
|
||||
inc hl
|
||||
ld d, (hl)
|
||||
ex de, hl
|
||||
ld de, 0
|
||||
call cpHLDE
|
||||
pop de
|
||||
jr nz, fshcmdSETfExe
|
||||
fshcmdSETfArg1Get:
|
||||
push de
|
||||
call _NewLine
|
||||
xor a
|
||||
ld (CurCol), a
|
||||
ld hl, fshcmdSETfDValue
|
||||
|
|
@ -47,10 +45,16 @@ fshcmdSETfArg1Get:
|
|||
ld de, 3
|
||||
call inputnumstr
|
||||
call strtob
|
||||
pop de
|
||||
ld hl, FshCmdArg1
|
||||
ld (hl), a
|
||||
fshcmdSETfExe:
|
||||
ld hl, FshCmdArg0
|
||||
ld de, 0
|
||||
ld e, (hl)
|
||||
ld hl, FshCmdArg1
|
||||
ld b, (hl)
|
||||
ld hl, 0
|
||||
ld l, a
|
||||
ld l, b
|
||||
call fshvarset
|
||||
call _NewLine
|
||||
jp Fin
|
||||
|
|
|
|||
Loading…
Reference in New Issue