Skip to content

Commit c9eed2b

Browse files
committed
Fixes bug in floating point VAL, we don't use integer stack.
Bug found by "Quiver" at AtariAge, see https://atariage.com/forums/topic/301411-fb-floating-point-arrays/
1 parent 1781770 commit c9eed2b

3 files changed

Lines changed: 21 additions & 2 deletions

File tree

src/interp/fp_val.asm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
; --------------------------------
2929

3030
.import push_fr0, get_str_eol
31-
.importzp IOERROR, next_ins_incsp
31+
.importzp IOERROR, next_instruction
3232

3333
.include "atari.inc"
3434

@@ -41,7 +41,7 @@
4141
bcc :+
4242
lda #18
4343
sta IOERROR
44-
: jmp next_ins_incsp
44+
: jmp next_instruction
4545
.endproc
4646

4747
.include "../deftok.inc"

testsuite/tests/fp-input.bas

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
' Test for statement "INPUT"
2+
? "Start"
3+
input a%
4+
? err(), a%
5+
input ; b%
6+
? err(), b%
7+
input a%
8+
? err()

testsuite/tests/fp-input.chk

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Name: Test statement "INPUT"
2+
Test: run-fp
3+
Input:
4+
1
5+
2
6+
.
7+
Output:
8+
Start
9+
?1 1
10+
1 2
11+
?18

0 commit comments

Comments
 (0)