From 287213fc68740403dce6d4f8e9c7fe2ccd5231f5 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Fri, 17 Apr 2020 21:10:20 -0400 Subject: [PATCH] recipes/rc2014/eeprom: remove old stuff --- recipes/rc2014/eeprom/Makefile | 11 ------ recipes/rc2014/eeprom/glue.asm | 87 ------------------------------------------ recipes/rc2014/eeprom/usr.asm | 43 --------------------- 3 files changed, 141 deletions(-) delete mode 100644 recipes/rc2014/eeprom/Makefile delete mode 100644 recipes/rc2014/eeprom/glue.asm delete mode 100644 recipes/rc2014/eeprom/usr.asm diff --git a/recipes/rc2014/eeprom/Makefile b/recipes/rc2014/eeprom/Makefile deleted file mode 100644 index d3a2821..0000000 --- a/recipes/rc2014/eeprom/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -TARGET = os.bin -BASEDIR = ../../.. -ZASM = $(BASEDIR)/emul/zasm/zasm -KERNEL = $(BASEDIR)/kernel -APPS = $(BASEDIR)/apps - -.PHONY: all -all: $(TARGET) -$(TARGET): glue.asm - $(ZASM) $(KERNEL) $(APPS) < glue.asm > $@ - diff --git a/recipes/rc2014/eeprom/glue.asm b/recipes/rc2014/eeprom/glue.asm deleted file mode 100644 index 06ba0fe..0000000 --- a/recipes/rc2014/eeprom/glue.asm +++ /dev/null @@ -1,87 +0,0 @@ -; classic RC2014 setup (8K ROM + 32K RAM) and a stock Serial I/O module -; The RAM module is selected on A15, so it has the range 0x8000-0xffff -.equ RAMSTART 0x8000 -.equ RAMEND 0xffff -.equ ACIA_CTL 0x80 ; Control and status. RS off. -.equ ACIA_IO 0x81 ; Transmit. RS on. - -jp init - -; interrupt hook -.fill 0x38-$ -jp aciaInt - -.inc "err.h" -.inc "ascii.h" -.inc "blkdev.h" -.inc "core.asm" -.inc "str.asm" -.equ ACIA_RAMSTART RAMSTART -.inc "acia.asm" - -.equ MMAP_START 0xd000 -.inc "mmap.asm" - -.equ BLOCKDEV_RAMSTART ACIA_RAMEND -.equ BLOCKDEV_COUNT 1 -.inc "blockdev.asm" -; List of devices -.dw mmapGetB, mmapPutB - -.equ STDIO_RAMSTART BLOCKDEV_RAMEND -.equ STDIO_GETC aciaGetC -.equ STDIO_PUTC aciaPutC -.inc "stdio.asm" - -.equ AT28W_RAMSTART STDIO_RAMEND -.inc "at28w/main.asm" - -; *** BASIC *** - -; RAM space used in different routines for short term processing. -.equ SCRATCHPAD_SIZE STDIO_BUFSIZE -.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 sp, RAMEND - im 1 - - call aciaInit - xor a - ld de, BLOCKDEV_SEL - call blkSel - - call basInit - ld hl, basFindCmdExtra - ld (BAS_FINDHOOK), hl - ei - jp basStart - -basFindCmdExtra: - ld hl, basBLKCmds - call basFindCmd - ret z - ld hl, .mycmds - jp basFindCmd -.mycmds: - .db "at28w", 0 - .dw at28wMain - .db 0xff diff --git a/recipes/rc2014/eeprom/usr.asm b/recipes/rc2014/eeprom/usr.asm deleted file mode 100644 index f14b4e5..0000000 --- a/recipes/rc2014/eeprom/usr.asm +++ /dev/null @@ -1,43 +0,0 @@ -; If you find youself needing to write to an EEPROM through a shell that isn't -; built for this, compile this dependency-less code (change memory offsets as -; needed) and run it in a USR-like fashion. - - ld bc, 0x1000 ; bytecount to write - ld de, 0xd000 ; source data - ld hl, 0x2000 ; dest EEPROM memory mapping - -loop: - ld a, (de) - ld (hl), a - push de ; --> lvl 1 - push bc ; --> lvl 2 - ld bc, 0x2000 ; Should be plenty enough to go > 10ms - ld e, a ; save expected data for verification -wait: - ; as long as writing operation is running, IO/6 will toggle at each - ; read attempt and IO/7 will be the opposite of what was written. Simply - ; wait until the read operation yields the same value as what we've - ; written - ld a, (hl) - cp e - jr z, waitend - dec bc - ld a, b - or c - jr nz, wait - ; mismatch - pop bc ; <-- lvl 2 - pop de ; <-- lvl 1 - ld a, 1 ; nonzero - or a ; unset Z - ret -waitend: - pop bc ; <-- lvl 2 - pop de ; <-- lvl 1 - inc hl - inc de - dec bc - ld a, b - or c - jr nz, loop - ret ; Z already set