From 08392fee601e2d00af84792ec661da35ad9e2a8c Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Mon, 2 Dec 2019 23:00:35 -0500 Subject: [PATCH] recipes/rc2014/eeprom: use BASIC shell --- recipes/rc2014/eeprom/glue.asm | 63 +++++++++++++++++++--------------- 1 file changed, 36 insertions(+), 27 deletions(-) diff --git a/recipes/rc2014/eeprom/glue.asm b/recipes/rc2014/eeprom/glue.asm index 628d3a4..a7a1554 100644 --- a/recipes/rc2014/eeprom/glue.asm +++ b/recipes/rc2014/eeprom/glue.asm @@ -33,47 +33,56 @@ jp aciaInt .equ STDIO_PUTC aciaPutC .inc "stdio.asm" +.inc "lib/args.asm" .equ AT28W_RAMSTART STDIO_RAMEND .inc "at28w/main.asm" -; *** Shell *** -.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 +; *** BASIC *** -.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: di ; setup stack - ld hl, RAMEND - ld sp, hl + ld sp, RAMEND im 1 call aciaInit - call shellInit - xor a ld de, BLOCKDEV_SEL call blkSel + call basInit + ld hl, basFindCmdExtra + ld (BAS_FINDHOOK), hl ei - jp shellLoop - -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 - + jp basStart +basFindCmdExtra: + ld hl, basBLKCmds + call basFindCmd + ret z + ld hl, .mycmds + jp basFindCmd +.mycmds: + .db "at28w", 0 + .dw at28wMain + .db 0xff