j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Hi,
I've been trying to get Bernd Paysan's Mini-OOF (find it at http://www.jwdt.com/~paysan/mini-oof.html ) working with paflof. Mini-OOF is a small OO-layer written in Forth which might be interesting in regard to the package handling, which paflof still lacks. The example works fine in gforth, as far as i can see.
I'm using these two definitions to let mini-oof compile in paflof without exceptions: ------- 8< ---------- : /string ( addr len n -- addr+n len-n ) tuck - -rot + swap ; 0 cell+ constant cell ------- >8 ----------
Unfortunately there seem to be several problems: * the example mentioned on the page makes paflof segfault at END-CLASS. * paflof and gforth (ANS Forth?) seem to have different opinions about how to implement ['] and ' in compile mode. I.e. the following definition : defines ( xt class -- ) ' >body @ + ! ; leaves an xt on the stack in paflof, as ' is immediately. * CREATE ought to read the create-word's name from the TIB in paflof, using : CREATE PARSE-WORD $CREATE ; Thus, CREATE cannot be used in a colon definition, as there is nothing valid in the text input buffer. In ANS Forth, this should be possible. gforth's definition of CREATE is : Create header reveal dovar: cfa, ;
Any ideas how to solve these problems are welcome..
Stefan
- paflof and gforth (ANS Forth?) seem to have different opinions about how to implement ['] and ' in compile mode. I.e. the following definition : defines ( xt class -- ) ' >body @ + ! ; leaves an xt on the stack in paflof, as ' is immediately.
' is not allowed in compile state; that's correct ANS behaviour.
- CREATE ought to read the create-word's name from the TIB in paflof, using : CREATE PARSE-WORD $CREATE ; Thus, CREATE cannot be used in a colon definition, as there is nothing valid in the text input buffer. In ANS Forth, this should be possible. gforth's definition of CREATE is : Create header reveal dovar: cfa, ;
Use $CREATE ?
Cheers,
Segher - To unsubscribe: send mail to majordomo@freiburg.linux.de with 'unsubscribe openbios' in the body of the message http://www.freiburg.linux.de/OpenBIOS/ - free your system..