Diaperglu Documention Directory
Home
Building
DHTML Scripting
Using Diaperglu
Documention Key
Script Commands Reference
C Library API Reference
Handy References
About
License
Contact
Forth Draft Standard
// ////////////////////////////////////////////////////////////////////////////////////// // // Documentation Key: // // Stacks and buffer changes shorthand: // // ( before -- after ) // for example, for the forth script token '+' : // ( n1 n0 -- n1+n0 ) // if data stack before doing + is 3 5, afterwards it will be 8 // // // Stack and buffer names shorthand: // // ( -- ) data stack // ( -error- ) error stack // ( -pad- ) pad buffer for forth core number to string // calculations // ( -r- ) rstack (separate from return stack) // ( -EH- ) elementid hlistid stack (double number stack) // ( -currentinputbuffer- ) current script interpreter source // ( -currentnewvariablebuffer- ) where memory for new variables is allocated // ( -currentcompilebuffer- ) where new code is compiled // ( -$- ) string stack // ( -l$- ) lstring stack, caller specifies lstring stack // offset and data buffers somewhere on data stack // // // Data stack items shorthand: // // ? unknown number of items on stack // u 64 bit unsigned integer // n 64 bit signed integer // x 64 bit signed or unsigned integer (doesn't matter how you look at it) // ud 128 bit unsigned integer - low 64 bits then high 64 bits // nd 128 bit signed integer - low 64 bits then high 64 bits // xd 128 bit signed or unsigned integer - low 64 bits then high 64 bits // addr 64 bit address pointer // a-addr 64 bit address pointer which is 64 bit aligned (low 3 bits are 0) // c-addr 64 bit address pointer to a counted string, // first character in string (which is a byte) specifies the length // or 64 bit address pointer which is character aligned // (in this implementation all address pointers are character aligned) // xt execution token // char 8 bit character // wid word list identifier // sf 32 bit IEEE single precision floating point number // df 64 bit IEEE double precision floating point number // // // Current input buffer items shorthand: // // <spaces> an arbitrary number of spaces // <delimiters> an arbitrary number of delimeters which are these: // <backspace> <carriage return> <form feed> // <line feed> <space> <tab> <vertical tab> // // Calling methods: // // call x calls the subroutine x pushing the return address in the standard // method // // safe call x calls the subroutine but saves the offset and bufferid of the // caller instead of a return address so that the return address can // be calculated when the called routine returns. This allows for a // valid return when the buffer the calling routine is in is // relocated during the call to the subroutine which can happen if // the subroutine is compiling to the buffer the caller is in. // // //////////////////////////////////////////////////////////////////////////////////////