mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-17 06:08:05 +11:00
recipes/rc2014/eeprom: use BASIC shell
This commit is contained in:
parent
0fb7995166
commit
08392fee60
@ -33,47 +33,56 @@ jp aciaInt
|
|||||||
.equ STDIO_PUTC aciaPutC
|
.equ STDIO_PUTC aciaPutC
|
||||||
.inc "stdio.asm"
|
.inc "stdio.asm"
|
||||||
|
|
||||||
|
.inc "lib/args.asm"
|
||||||
.equ AT28W_RAMSTART STDIO_RAMEND
|
.equ AT28W_RAMSTART STDIO_RAMEND
|
||||||
.inc "at28w/main.asm"
|
.inc "at28w/main.asm"
|
||||||
|
|
||||||
; *** Shell ***
|
; *** BASIC ***
|
||||||
.inc "lib/util.asm"
|
|
||||||
.inc "lib/parse.asm"
|
|
||||||
.inc "lib/args.asm"
|
|
||||||
.inc "lib/stdio.asm"
|
|
||||||
.equ SHELL_RAMSTART AT28W_RAMEND
|
|
||||||
.equ SHELL_EXTRA_CMD_COUNT 5
|
|
||||||
.inc "shell/main.asm"
|
|
||||||
; Extra cmds
|
|
||||||
.dw a28wCmd
|
|
||||||
.dw blkBselCmd, blkSeekCmd, blkLoadCmd, blkSaveCmd
|
|
||||||
|
|
||||||
.inc "shell/blkdev.asm"
|
; RAM space used in different routines for short term processing.
|
||||||
|
.equ SCRATCHPAD_SIZE 0x20
|
||||||
|
.equ SCRATCHPAD AT28W_RAMEND
|
||||||
|
.inc "lib/util.asm"
|
||||||
|
.inc "lib/ari.asm"
|
||||||
|
.inc "lib/parse.asm"
|
||||||
|
.inc "lib/fmt.asm"
|
||||||
|
.equ EXPR_PARSE parseLiteralOrVar
|
||||||
|
.inc "lib/expr.asm"
|
||||||
|
.inc "basic/util.asm"
|
||||||
|
.inc "basic/parse.asm"
|
||||||
|
.inc "basic/tok.asm"
|
||||||
|
.equ VAR_RAMSTART SCRATCHPAD+SCRATCHPAD_SIZE
|
||||||
|
.inc "basic/var.asm"
|
||||||
|
.equ BUF_RAMSTART VAR_RAMEND
|
||||||
|
.inc "basic/buf.asm"
|
||||||
|
.inc "basic/blk.asm"
|
||||||
|
.equ BAS_RAMSTART BUF_RAMEND
|
||||||
|
.inc "basic/main.asm"
|
||||||
|
|
||||||
init:
|
init:
|
||||||
di
|
di
|
||||||
; setup stack
|
; setup stack
|
||||||
ld hl, RAMEND
|
ld sp, RAMEND
|
||||||
ld sp, hl
|
|
||||||
im 1
|
im 1
|
||||||
|
|
||||||
call aciaInit
|
call aciaInit
|
||||||
call shellInit
|
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld de, BLOCKDEV_SEL
|
ld de, BLOCKDEV_SEL
|
||||||
call blkSel
|
call blkSel
|
||||||
|
|
||||||
|
call basInit
|
||||||
|
ld hl, basFindCmdExtra
|
||||||
|
ld (BAS_FINDHOOK), hl
|
||||||
ei
|
ei
|
||||||
jp shellLoop
|
jp basStart
|
||||||
|
|
||||||
a28wCmd:
|
|
||||||
.db "a28w", 0b011, 0b001, 0
|
|
||||||
ld a, (hl)
|
|
||||||
ld (AT28W_MAXBYTES), a
|
|
||||||
inc hl
|
|
||||||
ld a, (hl)
|
|
||||||
ld (AT28W_MAXBYTES+1), a
|
|
||||||
jp at28wInner
|
|
||||||
|
|
||||||
|
|
||||||
|
basFindCmdExtra:
|
||||||
|
ld hl, basBLKCmds
|
||||||
|
call basFindCmd
|
||||||
|
ret z
|
||||||
|
ld hl, .mycmds
|
||||||
|
jp basFindCmd
|
||||||
|
.mycmds:
|
||||||
|
.db "at28w", 0
|
||||||
|
.dw at28wMain
|
||||||
|
.db 0xff
|
||||||
|
Loading…
Reference in New Issue
Block a user