moved fshcmdroute to commandroute

This commit is contained in:
Stephen Toth 2018-06-29 07:35:12 -04:00
parent a201f15e08
commit 593e8fc920
3 changed files with 21 additions and 8 deletions

View File

@ -31,7 +31,7 @@ Decode:
Route: Route:
LD HL, FshCmdOP LD HL, FshCmdOP
JP fshcmdroute JP commandroute
Fin: Fin:
JP Input JP Input

View File

@ -6,10 +6,23 @@
;;Output: ;;Output:
;; Sets (DE) with command op code ;; Sets (DE) with command op code
commanddecode: commanddecode:
;add more
call fshcmddecode call fshcmddecode
ret ret
;;commandroute
;;Routes all commamds.
;;Inputs:
;; HL: Op code mem loc
;;Outputs:
;; Jp to loc for cmd func
;; ult go to Fin
commandroute:
call fshcmdroute
ld hl, FshCmdErrCode
ld (hl), $01
jp Err
; commandfill ; commandfill
;; fills command mem with byte a ;; fills command mem with byte a
commandfill: commandfill:

View File

@ -63,13 +63,14 @@ fshcmddecode:
ret ret
;;fshcmdroute ;;fshcmdroute
;;Routes all commamds. ;;Routes FshCommamds.
;;Inputs: ;;Inputs:
;; HL: Op code mem loc ;; HL: Op code mem loc
;;Outputs: ;;Outputs:
;; Jp to loc for cmd func ;; Jp to loc for cmd func
;; ult go to Fin
fshcmdroute: fshcmdroute:
pop bc ;pop the ret loc from stack into bc
ld de, fshcmdEXITo ld de, fshcmdEXITo
call bytecmp call bytecmp
jp z, fshcmdEXITf jp z, fshcmdEXITf
@ -93,9 +94,8 @@ fshcmdroute:
ld de, fshcmdCLSo ld de, fshcmdCLSo
call bytecmp call bytecmp
jp z, fshcmdCLSf jp z, fshcmdCLSf
ld hl, FshCmdErrCode push bc ;put ret location back on stack
ld (hl), $01 ret
jp Err
#include "includes/FshCommands/FshCommands.inc" #include "includes/FshCommands/FshCommands.inc"