From 7390cb18ed913edb4b76a6c513aef579dcf19266 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Sun, 5 Apr 2020 09:29:03 -0400 Subject: [PATCH] rc2014: a little cleanup --- recipes/rc2014/README.md | 19 +++++++++++----- recipes/rc2014/glue.asm | 57 ------------------------------------------------ 2 files changed, 13 insertions(+), 63 deletions(-) delete mode 100644 recipes/rc2014/glue.asm diff --git a/recipes/rc2014/README.md b/recipes/rc2014/README.md index 0c5a521..c66f090 100644 --- a/recipes/rc2014/README.md +++ b/recipes/rc2014/README.md @@ -39,11 +39,11 @@ device I use in this recipe. ### Gathering parts +* A "classic" RC2014 with Serial I/O * [Forth's stage 2 binary][stage2] * [romwrite][romwrite] and its specified dependencies * [GNU screen][screen] -* A FTDI-to-TTL cable to connect to the Serial I/O module of the RC2014 -* (Optional) RC2014's Digital I/O module +* A FTDI-to-TTL cable to connect to the Serial I/O module ### Configure your build @@ -85,6 +85,13 @@ In my case (arduino uno), it's `/dev/ttyACM0`. Then: See romwrite's README for details about these commands. +Note that this method is slow and clunky, but before long, you won't be using +it anymore. Writing to an EEPROM is much easier and faster from a RC2014 +running Collapse OS, so once you have that first Collapse OS ROM, you'll be +much better equipped for further toying around (unless, of course, you already +had tools to write to EEPROM. In which case, you'll be ignoring this section +altogether). + ### Running Put the AT28 in the ROM module, don't forget to set the A14 jumper high, then @@ -94,11 +101,11 @@ identify the tty bound to it (in my case, `/dev/ttyUSB0`). Then: screen /dev/ttyUSB0 115200 Press the reset button on the RC2014 to have Forth begin its bootstrap process. -Note that it has to build more than half of itself from source. It takes a -while about 30 seconds to complete. +Note that it has to build more than half of itself from source. It takes about +30 seconds to complete. -Once bootstrapping is done, you'll get a and you should see the Collapse OS -prompt. That's a full Forth interpreter. You can have fun right now. +Once bootstrapping is done you should see the Collapse OS prompt. That's a full +Forth interpreter. You can have fun right now. However, that long boot time is kinda annoying. Moreover, that bootstrap code being in source form takes precious space from our 8K ROM. We already have our diff --git a/recipes/rc2014/glue.asm b/recipes/rc2014/glue.asm deleted file mode 100644 index 0d33b4c..0000000 --- a/recipes/rc2014/glue.asm +++ /dev/null @@ -1,57 +0,0 @@ -.equ RAMSTART 0x8000 -.equ RAMEND 0xffff -.equ ACIA_CTL 0x80 ; Control and status. RS off. -.equ ACIA_IO 0x81 ; Transmit. RS on. -.equ DIGIT_IO 0x00 ; digital I/O's port - -jp init - -; interrupt hook -.fill 0x38-$ -jp aciaInt - -.inc "err.h" -.inc "ascii.h" -.inc "core.asm" -.inc "str.asm" -.equ ACIA_RAMSTART RAMSTART -.inc "acia.asm" - -.equ STDIO_RAMSTART ACIA_RAMEND -.equ STDIO_GETC aciaGetC -.equ STDIO_PUTC aciaPutC -.inc "stdio.asm" - -; *** BASIC *** - -; RAM space used in different routines for short term processing. -.equ SCRATCHPAD_SIZE STDIO_BUFSIZE -.equ SCRATCHPAD STDIO_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" -.equ BAS_RAMSTART BUF_RAMEND -.inc "basic/main.asm" - -init: - di - ; setup stack - ld sp, RAMEND - im 1 - - call aciaInit - ei - call basInit - jp basStart - -