added Print.asm
added printprompt cleaned up command code
This commit is contained in:
parent
abfde4f5bb
commit
9aed40be6f
5
FSHa.asm
5
FSHa.asm
|
|
@ -15,10 +15,8 @@ Input:
|
||||||
LD C, $00
|
LD C, $00
|
||||||
CALL fshcmdfill
|
CALL fshcmdfill
|
||||||
|
|
||||||
XOR A
|
|
||||||
LD (CurCol), A
|
|
||||||
LD HL, PS1
|
LD HL, PS1
|
||||||
CALL _PutS
|
CALL printprompt
|
||||||
|
|
||||||
LD HL, FshCmd
|
LD HL, FshCmd
|
||||||
LD DE, FshCmdInptSize
|
LD DE, FshCmdInptSize
|
||||||
|
|
@ -59,6 +57,7 @@ FshFlags: .DB %00000000
|
||||||
#include "includes/Byte.asm"
|
#include "includes/Byte.asm"
|
||||||
#include "includes/Char.asm"
|
#include "includes/Char.asm"
|
||||||
#include "includes/Cursor.asm"
|
#include "includes/Cursor.asm"
|
||||||
|
#include "includes/Print.asm"
|
||||||
|
|
||||||
#include "includes/FshCmd.asm"
|
#include "includes/FshCmd.asm"
|
||||||
#include "includes/Err.asm"
|
#include "includes/Err.asm"
|
||||||
|
|
|
||||||
|
|
@ -13,12 +13,8 @@ fshcmdCOPYfArg0:
|
||||||
call cpHLDE
|
call cpHLDE
|
||||||
jr nz, fshcmdCOPYfArg1
|
jr nz, fshcmdCOPYfArg1
|
||||||
fshcmdCOPYfArg0Get:
|
fshcmdCOPYfArg0Get:
|
||||||
ld a, 'G'
|
|
||||||
call _PutC
|
|
||||||
xor a
|
|
||||||
ld (CurCol), a
|
|
||||||
ld hl, fshcmdCOPYfDSource
|
ld hl, fshcmdCOPYfDSource
|
||||||
call _PutS
|
call printprompt
|
||||||
ld hl, fshcmdCOPYfInputBuffer
|
ld hl, fshcmdCOPYfInputBuffer
|
||||||
ld de, 3
|
ld de, 3
|
||||||
call inputnumstr
|
call inputnumstr
|
||||||
|
|
@ -37,10 +33,8 @@ fshcmdCOPYfArg1:
|
||||||
call cpHLDE
|
call cpHLDE
|
||||||
jr nz, fshcmdCOPYfExe
|
jr nz, fshcmdCOPYfExe
|
||||||
fshcmdCOPYfArg1Get:
|
fshcmdCOPYfArg1Get:
|
||||||
xor a
|
|
||||||
ld (CurCol), a
|
|
||||||
ld hl, fshcmdCOPYfDDestination
|
ld hl, fshcmdCOPYfDDestination
|
||||||
call _PutS
|
call printprompt
|
||||||
ld hl, fshcmdCOPYfInputBuffer
|
ld hl, fshcmdCOPYfInputBuffer
|
||||||
ld de, 3
|
ld de, 3
|
||||||
call inputnumstr
|
call inputnumstr
|
||||||
|
|
@ -62,6 +56,6 @@ fshcmdCOPYfExe:
|
||||||
call _NewLine
|
call _NewLine
|
||||||
jp ErrCatch
|
jp ErrCatch
|
||||||
|
|
||||||
fshcmdCOPYfInputBuffer: .db $00, $00, $00, $00, $00, $00
|
fshcmdCOPYfInputBuffer: .db $00, $00, $00, $00
|
||||||
fshcmdCOPYfDSource: .db "Source= ", 0
|
fshcmdCOPYfDSource: .db "Source= ", 0
|
||||||
fshcmdCOPYfDDestination: .db "Destination= ", 0
|
fshcmdCOPYfDDestination: .db "Destination= ", 0
|
||||||
|
|
|
||||||
|
|
@ -13,12 +13,8 @@ fshcmdMOVEfArg0:
|
||||||
call cpHLDE
|
call cpHLDE
|
||||||
jr nz, fshcmdMOVEfArg1
|
jr nz, fshcmdMOVEfArg1
|
||||||
fshcmdMOVEfArg0Get:
|
fshcmdMOVEfArg0Get:
|
||||||
ld a, 'G'
|
|
||||||
call _PutC
|
|
||||||
xor a
|
|
||||||
ld (CurCol), a
|
|
||||||
ld hl, fshcmdMOVEfDSource
|
ld hl, fshcmdMOVEfDSource
|
||||||
call _PutS
|
call printprompt
|
||||||
ld hl, fshcmdMOVEfInputBuffer
|
ld hl, fshcmdMOVEfInputBuffer
|
||||||
ld de, 3
|
ld de, 3
|
||||||
call inputnumstr
|
call inputnumstr
|
||||||
|
|
@ -37,10 +33,8 @@ fshcmdMOVEfArg1:
|
||||||
call cpHLDE
|
call cpHLDE
|
||||||
jr nz, fshcmdMOVEfExe
|
jr nz, fshcmdMOVEfExe
|
||||||
fshcmdMOVEfArg1Get:
|
fshcmdMOVEfArg1Get:
|
||||||
xor a
|
|
||||||
ld (CurCol), a
|
|
||||||
ld hl, fshcmdMOVEfDDestination
|
ld hl, fshcmdMOVEfDDestination
|
||||||
call _PutS
|
call printprompt
|
||||||
ld hl, fshcmdMOVEfInputBuffer
|
ld hl, fshcmdMOVEfInputBuffer
|
||||||
ld de, 3
|
ld de, 3
|
||||||
call inputnumstr
|
call inputnumstr
|
||||||
|
|
|
||||||
|
|
@ -13,12 +13,8 @@ fshcmdSETfArg0:
|
||||||
call cpHLDE
|
call cpHLDE
|
||||||
jr nz, fshcmdSETfArg1
|
jr nz, fshcmdSETfArg1
|
||||||
fshcmdSETfArg0Get:
|
fshcmdSETfArg0Get:
|
||||||
ld a, 'G'
|
|
||||||
call _PutC
|
|
||||||
xor a
|
|
||||||
ld (CurCol), a
|
|
||||||
ld hl, fshcmdSETfDIndex
|
ld hl, fshcmdSETfDIndex
|
||||||
call _PutS
|
call printprompt
|
||||||
ld hl, fshcmdSETfInputBuffer
|
ld hl, fshcmdSETfInputBuffer
|
||||||
ld de, 3
|
ld de, 3
|
||||||
call inputnumstr
|
call inputnumstr
|
||||||
|
|
@ -37,10 +33,8 @@ fshcmdSETfArg1:
|
||||||
call cpHLDE
|
call cpHLDE
|
||||||
jr nz, fshcmdSETfExe
|
jr nz, fshcmdSETfExe
|
||||||
fshcmdSETfArg1Get:
|
fshcmdSETfArg1Get:
|
||||||
xor a
|
|
||||||
ld (CurCol), a
|
|
||||||
ld hl, fshcmdSETfDValue
|
ld hl, fshcmdSETfDValue
|
||||||
call _PutS
|
call printprompt
|
||||||
ld hl, fshcmdSETfInputBuffer
|
ld hl, fshcmdSETfInputBuffer
|
||||||
ld de, 5
|
ld de, 5
|
||||||
call inputnumstr
|
call inputnumstr
|
||||||
|
|
|
||||||
|
|
@ -23,11 +23,11 @@ fshcmdVARSfLoop:
|
||||||
pop bc
|
pop bc
|
||||||
pop hl
|
pop hl
|
||||||
ld c, 0
|
ld c, 0
|
||||||
jr fshcmdVARSfLoopBack
|
jr fshcmdVARSfLoopEnd
|
||||||
fshcmdVARSfLoopU:
|
fshcmdVARSfLoopU:
|
||||||
ld a, '_'
|
ld a, '_'
|
||||||
call _PutC
|
call _PutC
|
||||||
fshcmdVARSfLoopBack:
|
fshcmdVARSfLoopEnd:
|
||||||
inc b
|
inc b
|
||||||
inc de
|
inc de
|
||||||
ld a, b
|
ld a, b
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
;;printprompt
|
||||||
|
;;Sets curcol to 0 and prints prompt
|
||||||
|
;;Inputs:
|
||||||
|
;; HL: Prompt String Location
|
||||||
|
printprompt:
|
||||||
|
push hl
|
||||||
|
xor a
|
||||||
|
ld (CurCol), a
|
||||||
|
call _PutS
|
||||||
|
pop hl
|
||||||
|
ret
|
||||||
Loading…
Reference in New Issue