From: Erich W. <ew....@on...> - 2008-02-05 20:55:34
|
Hello, In release 2.6 "case" "encase" "of" "endof" were moved into lib/case.frt I loaded a small amforth (no case) on an atmega32. using the following file ----------------------------------------- #include lib/ans94/postpone.frt #include lib/case.frt : checkout ( n -- ) case 0 of ." none" endof 1 of ." once" endof 2 of ." twice" endof ." unknown" endcase ; ----------------------------------------- for upload with amforth-upload.py produces a reset or hang (!) of the controller after "endcase". Any ideas? The above example used to work with Version 2.5 and included case.asm endcase.asm of.asm endof.asm files, except for a leftover argument. Cheers, Erich --- the gory details -------------------- $ amforth-upload.py -t /dev/ttyUSB0 zz.fs : postpone ok bl word find dup 0< ok if ok drop compile compile , exit ok then ok if ok , exit ok then ok drop ok [ base @ decimal ] -13 [ base ! ] throw ok; immediate ok > 0 constant case ok > : of ok 1+ ok >r ok postpone over postpone = ok postpone if ok postpone drop ok r> ; ok > immediate ok > : endof ok >r ok postpone else ok r> ; ok > immediate ok > : endcase ok postpone drop ok 0 ?do ok postpone then ok loop ; ok > immediate ok > : checkout ok case ok 0 of ." none" endof ok 1 of ." once" endof ok 2 of ." twice" endof ok ." unknown" ok endcase amforth 2.6 ATmega32 > ok > ; amforth 2.6 ATmega32 > Traceback (most recent call last): File "/home/ew/bin/amforth-upload.py", line 232, in ? main(sys.argv[1:]) File "/home/ew/bin/amforth-upload.py", line 228, in main write_file_flow(in_file,tty_dev) File "/home/ew/bin/amforth-upload.py", line 169, in write_file_flow write_line_flow(line,dest) File "/home/ew/bin/amforth-upload.py", line 121, in write_line_flow i = dest.read(1) KeyboardInterrupt $ |