50 lines
716 B
NASM
50 lines
716 B
NASM
;;Commanddecode
|
|
;;Decodes all commands.
|
|
;;Inputs:
|
|
;; HL: Cmd String mem loc
|
|
;; DE: Op code mem loc
|
|
;;Output:
|
|
;; Sets (DE) with command op code
|
|
commanddecode:
|
|
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:
|
|
push hl
|
|
push bc
|
|
push de
|
|
ld b, 0
|
|
ld de, 0
|
|
ld c, a
|
|
ld hl, FshCmd
|
|
commandfillLoop:
|
|
ld (hl), c
|
|
inc hl
|
|
inc b
|
|
inc de
|
|
ld a, b
|
|
cp FshCmdSize
|
|
jr c, commandfillLoop
|
|
pop de
|
|
pop bc
|
|
pop hl
|
|
ret
|
|
|
|
#include "includes/FshCmd.asm"
|