rc2014: a little cleanup

This commit is contained in:
Virgil Dupras 2020-04-05 09:29:03 -04:00
parent 58e88119ec
commit 7390cb18ed
2 changed files with 13 additions and 63 deletions

View File

@ -39,11 +39,11 @@ device I use in this recipe.
### Gathering parts ### Gathering parts
* A "classic" RC2014 with Serial I/O
* [Forth's stage 2 binary][stage2] * [Forth's stage 2 binary][stage2]
* [romwrite][romwrite] and its specified dependencies * [romwrite][romwrite] and its specified dependencies
* [GNU screen][screen] * [GNU screen][screen]
* A FTDI-to-TTL cable to connect to the Serial I/O module of the RC2014 * A FTDI-to-TTL cable to connect to the Serial I/O module
* (Optional) RC2014's Digital I/O module
### Configure your build ### 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. 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 ### Running
Put the AT28 in the ROM module, don't forget to set the A14 jumper high, then 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 screen /dev/ttyUSB0 115200
Press the reset button on the RC2014 to have Forth begin its bootstrap process. 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 Note that it has to build more than half of itself from source. It takes about
while about 30 seconds to complete. 30 seconds to complete.
Once bootstrapping is done, you'll get a and you should see the Collapse OS Once bootstrapping is done you should see the Collapse OS prompt. That's a full
prompt. That's a full Forth interpreter. You can have fun right now. Forth interpreter. You can have fun right now.
However, that long boot time is kinda annoying. Moreover, that bootstrap code 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 being in source form takes precious space from our 8K ROM. We already have our

View File

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