From 570a9818ee058a96afd5e372605b29a0ed46029e Mon Sep 17 00:00:00 2001 From: Daniel Serpell Date: Sun, 13 Oct 2024 21:46:19 -0300 Subject: [PATCH] Expands INPUT to allow 255 bytes of buffer. Adds a test to catch errors on long records, and always return the full buffer on long records. --- src/interp/a800/input.asm | 18 +++++++++--------- testsuite/tests/diskio.bas | 26 ++++++++++++++++++++++++++ testsuite/tests/diskio.chk | 6 ++++++ 3 files changed, 41 insertions(+), 9 deletions(-) diff --git a/src/interp/a800/input.asm b/src/interp/a800/input.asm index 68295b6..8499bb3 100644 --- a/src/interp/a800/input.asm +++ b/src/interp/a800/input.asm @@ -47,22 +47,22 @@ line_buf = LBUFF lda #"; +NEXT +? #1, +? #1, "Big 2: "; +FOR I=0 TO 25 + ? #1, ""; +NEXT +? #1, +close #1 + +? "BIG INPUT" +open #2, 4, 0, "D:XXX" +input #2, A$ +? ERR() +? A$, LEN(A$) +input #2, A$ +? ERR() +? A$, LEN(A$) +close #2 +? ERR() + diff --git a/testsuite/tests/diskio.chk b/testsuite/tests/diskio.chk index 419b882..c7acccd 100644 --- a/testsuite/tests/diskio.chk +++ b/testsuite/tests/diskio.chk @@ -19,3 +19,9 @@ BGET 32 1 hola chaoZZZ +BIG INPUT +1 +Big 1: 217 +137 +Big 2: