From a5d85c08968da3443afb26807ec5f01827906cbe Mon Sep 17 00:00:00 2001 From: CrazyEttin <> Date: Tue, 30 Aug 2022 00:10:02 +0300 Subject: [PATCH] Add options to compile the emulator with specific amounts of memory --- emulator.pas | 15 ++++++++++++++- readme.md | 10 ++++++---- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/emulator.pas b/emulator.pas index f8ac342..6c728ab 100644 --- a/emulator.pas +++ b/emulator.pas @@ -15,7 +15,20 @@ type {$endif} const - LastRAM = $ffef; //The last address of RAM + //The last address of RAM + {$if defined(RAM4)} + LastRAM = $fff; //4 KiB + {$elseif defined(RAM8)} + LastRAM = $1fff; //8 KiB + {$elseif defined(RAM16)} + LastRAM = $3fff; //16 KiB + {$elseif defined(RAM32)} + LastRAM = $7fff; //32 KiB + {$elseif defined(RAM64)} + LastRAM = $ffef; //64 KiB + {$else} + LastRAM = $7ff; //2 KiB (default) + {$endif} var Hlt, ASCII, Verbose: boolean; //Halt, ASCII, and verbose flags diff --git a/readme.md b/readme.md index 4639339..979ce70 100644 --- a/readme.md +++ b/readme.md @@ -92,10 +92,12 @@ uninitialised. Emulator -------- -The emulator runs at roughly 500 KIPS, has the full 65520 bytes of RAM, -and interacts with memory mapped devices at roughly 1000 CPS. The speed -limitations can be removed by compiling the emulator with the argument --dfast. +By default the emulator runs at roughly 500 KIPS, has 2 KiB of RAM, and +interacts with memory mapped devices at roughly 1000 CPS. The arguments +-dRAM4, -dRAM8, -dRAM16, -dRAM32, and -dRAM64 can be used to compile +the emulator with 4, 8, 16, 32, or 64 KiB (minus the reserved addresses) +of RAM respectively instead and the speed limitations can be removed +with the argument -dfast. Input and output are handled by an emulated glass teletype terminal with local echo. Note that of the control characters only bell, backspace,