Mark Cave-Ayland wrote:
It seems that b(case)...b(of)...b(endof)...b(endcase) was broken in exactly the same way as the b(do)...b(loop) commands during Fcode evaluation. This patch fixes this, which now allows the Martux/Milax CDROM images to fail gracefully rather than segfaulting:
Just remembered that I forgot to post my test case for completeness:
\ Test Fcode case...of...endof...endcase \ Forth: 1 case 0 of ." zero" endof 1 of ." one" endof endcase here cc c, \ offset16 a6 c, \ 1 c4 c, \ b(case) a5 c, \ 0 1c c, 00 c, 0c c, \ b(of) 12 c, 04 c, 7a c, 65 c, 72 c, 6f c, \ b(") zero 90 c, \ type c6 c, 00 c, 10 c, \ b(endof) a6 c, \ 1 1c c, 00 c, 0b c, \ b(of) 12 c, 03 c, 6f c, 6e c, 65 c, \ b(") one 90 c, \ type c6 c, 00 c, 03 c, \ b(endof) c5 c, \ b(endcase) 00 c, \ end
ATB,
Mark.