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:
LD HL, FshCmdOP
JP fshcmdroute
JP commandroute
Fin:
JP Input

View File

@ -6,10 +6,23 @@
;;Output:
;; Sets (DE) with command op code
commanddecode:
;add more
call fshcmddecode
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
;; fills command mem with byte a
commandfill:

View File

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