BASIC line editor: cursor keys, Home/End, Delete, and Right to recall a line
Typing a line number and pressing Right brings that program line up to edit. Left/Right move, Home/End (Ctrl-A/Ctrl-E) jump, typing inserts, Backspace and Delete remove, Enter takes the whole line; long lines wrap. To fit the ROM, the date code is smaller and SDCC gets more allocator effort; build.sh now fails if the code runs past 8000h. basic/test-edit.py checks the editor in the emulator. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
073db68754
commit
eb72d85834
8 files changed
+6473
-6227
No files matched your search
+7
-1
@@ -4,6 +4,12 @@ set -e
|
||||
cd "$(dirname "$0")"
|
||||
mkdir -p out
|
||||
sdasz80 -plosgff out/crt0.rel crt0.s
|
||||
sdcc -mz80 --opt-code-speed --max-allocs-per-node 20000 --std-sdcc11 -c -o out/basic.rel basic.c
|
||||
sdcc -mz80 --opt-code-speed --max-allocs-per-node 100000 --std-sdcc11 -c -o out/basic.rel basic.c
|
||||
sdcc -mz80 --no-std-crt0 --code-loc 0x0080 --data-loc 0x8000 -o out/basic.ihx out/crt0.rel out/basic.rel
|
||||
python3 ../tools/ihx2mem.py out/basic.ihx basic.bin basic.mem
|
||||
# the code must end below 8000h, where BASIC's data starts
|
||||
end=$(awk '$2 == "s__GSFINAL" {print $1}' out/basic.map)
|
||||
if [ $((16#$end)) -gt $((0x8000)) ]; then
|
||||
echo "BASIC is too big: its code runs to $end, past 8000h" >&2
|
||||
exit 1
|
||||
fi
|
||||
Reference in new issue
Block a user