diff --git a/parts/platforms/README.md b/parts/platforms/README.md new file mode 100644 index 0000000..08d9751 --- /dev/null +++ b/parts/platforms/README.md @@ -0,0 +1,5 @@ +# platforms + +This is a collection of include files that set platform-specific constants +that different parts use. When assembling your own OS, pick the platform include +that is closest to yours and adapt it to your machine. diff --git a/parts/platforms/rc2014.inc b/parts/platforms/rc2014.inc new file mode 100644 index 0000000..7fd92f0 --- /dev/null +++ b/parts/platforms/rc2014.inc @@ -0,0 +1,5 @@ +; classic RC2014 setup (8K ROM + 32K RAM) and a stock Serial I/O module + +RAMEND .equ 0xa000 +ACIA_CTL .equ 0x80 ; Control and status. RS off. +ACIA_IO .equ 0x81 ; Transmit. RS on. diff --git a/parts/shell/shell.asm b/parts/shell/shell.asm index 97eb0a7..f61ee21 100644 --- a/parts/shell/shell.asm +++ b/parts/shell/shell.asm @@ -5,13 +5,7 @@ ; *** STATUS *** ; Incomplete. This just outputs the welcome prompt then halts -; *** PLATFORM *** -; this is specific to a classic RC2014 setup (8K ROM + 32K RAM). This will be -; reorganized into something better. - -RAMEND .equ 0xa000 -ACIA_CTL .equ 0x80 ; Control and status. RS off. -ACIA_IO .equ 0x81 ; Transmit. RS on. +#include "platform.inc" ; *** CONSTS *** CR .equ 0x0d diff --git a/recipes/rc2014.md b/recipes/rc2014.md index e1edf1c..eefb580 100644 --- a/recipes/rc2014.md +++ b/recipes/rc2014.md @@ -31,7 +31,8 @@ device I use in this recipe. ### Gathering parts -* `shell.asm` from `parts` +* `parts/platforms/rc2014.inc` as `platform.inc` +* `parts/shell/shell.asm` as `shell.asm` * [scas][scas] * [romwrite][romwrite] and its specified dependencies * [GNU screen][screen]