recipes/rc2014/eeprom: remove old stuff

This commit is contained in:
Virgil Dupras 2020-04-17 21:10:20 -04:00
parent 82044454d5
commit 287213fc68
3 changed files with 0 additions and 141 deletions

View File

@ -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 > $@

View File

@ -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

View File

@ -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