chitselb / pettil

6502 Forth-83 dialect for the Commodore PET 2001
http://pettil.tumblr.com
34 stars 3 forks source link

Bug in ?DO ?LEAVE LOOP #65

Closed chitselb closed 6 years ago

chitselb commented 8 years ago

: foo ?do i . loop ; 20 00 0a jsr enter d0 08 pqdo 09 70 09 i c9 14 dot f1 08 loop fb dc 09 exit

8 8 foo succeeds (no iterations)

: foo ?do i . ?terminal ?leave loop ;

8 8 foo <--- fails, pqdo offset is wrong

20 00 0a jsr enter d0 08 pqdo 00 <--- compiler probably broke this, with ?leave Should be $0e 70 09 i c9 14 dot 8c 12 qterm b0 08 pqleave 05 f1 08 loop f6
dc 09 exit

chitselb commented 6 years ago

is working now!