diff --git a/parts/z80/shell.asm b/parts/z80/shell.asm index 78b5270..b22f714 100644 --- a/parts/z80/shell.asm +++ b/parts/z80/shell.asm @@ -15,10 +15,9 @@ ; *** REQUIREMENTS *** ; stdio +; blkdev ; *** DEFINES *** -; SHELL_IO_GETC: Macro that calls a GetC routine for I/O ("load" cmd) -; SHELL_IO_PUTC: Macro that calls a PutC routine for I/O ("save" cmd) ; SHELL_EXTRA_CMD_COUNT: Number of extra cmds to be expected after the regular ; ones. See comment in COMMANDS section for details. ; SHELL_RAMSTART @@ -397,8 +396,7 @@ shellPeek: ; Load the specified number of bytes (max 0xff) from IO and write them in the ; current memory pointer (which doesn't change). This gets chars from -; SHELL_IO_GETC, which can be different from STDIO_GETC. Coupled with the -; "blockdev" part, this allows you to dynamically select your IO source. +; blkGetCW. ; Control is returned to the shell only after all bytes are read. ; ; Example: load 42 @@ -411,7 +409,7 @@ shellLoad: ld a, (hl) ld b, a ld hl, (SHELL_MEM_PTR) -.loop: SHELL_IO_GETC +.loop: call blkGetCW jr nz, .ioError ld (hl), a inc hl @@ -428,8 +426,7 @@ shellLoad: ; Load the specified number of bytes (max 0xff) from the current memory pointer ; and write them to I/O. Memory pointer doesn't move. This puts chars to -; SHELL_IO_PUTC, which can be different from STDIO_PUTC. Coupled with the -; "blockdev" part, this allows you to dynamically select your IO source. +; blkPutC. ; Control is returned to the shell only after all bytes are written. ; ; Example: save 42 @@ -445,7 +442,7 @@ shellSave: .loop: ld a, (hl) inc hl - SHELL_IO_PUTC + call blkPutC djnz .loop .end: diff --git a/recipes/rc2014/glue.asm b/recipes/rc2014/glue.asm index 1368f73..c05adbc 100644 --- a/recipes/rc2014/glue.asm +++ b/recipes/rc2014/glue.asm @@ -25,8 +25,6 @@ STDIO_RAMSTART .equ BLOCKDEV_RAMEND #include "stdio.asm" SHELL_RAMSTART .equ STDIO_RAMEND -.define SHELL_IO_GETC call aciaGetC -.define SHELL_IO_PUTC call aciaPutC SHELL_EXTRA_CMD_COUNT .equ 0 #include "shell.asm" diff --git a/recipes/rc2014/sdcard/glue.asm b/recipes/rc2014/sdcard/glue.asm index 8bfa450..3294c44 100644 --- a/recipes/rc2014/sdcard/glue.asm +++ b/recipes/rc2014/sdcard/glue.asm @@ -40,8 +40,6 @@ STDIO_RAMSTART .equ BLOCKDEV_RAMEND #include "stdio.asm" SHELL_RAMSTART .equ STDIO_RAMEND -.define SHELL_IO_GETC call blkGetCW -.define SHELL_IO_PUTC call blkPutC SHELL_EXTRA_CMD_COUNT .equ 3 #include "shell.asm" .dw sdcInitializeCmd, blkBselCmd, blkSeekCmd diff --git a/tools/emul/shell/shell_.asm b/tools/emul/shell/shell_.asm index db4ca77..df25dce 100644 --- a/tools/emul/shell/shell_.asm +++ b/tools/emul/shell/shell_.asm @@ -30,8 +30,6 @@ STDIO_RAMSTART .equ BLOCKDEV_RAMEND #include "fs_cmds.asm" SHELL_RAMSTART .equ FS_RAMEND -.define SHELL_IO_GETC call blkGetC -.define SHELL_IO_PUTC call blkPutC SHELL_EXTRA_CMD_COUNT .equ 7 #include "shell.asm" .dw blkBselCmd, blkSeekCmd, fsOnCmd, flsCmd, fnewCmd, fdelCmd, fopnCmd