| \ we default to this version if we have nothing else 05May99jaw |
\ we default to this version if we have nothing else 05May99jaw |
| [IFUNDEF] allot |
[IFUNDEF] allot |
| : allot ( n -- ) \ core |
: allot ( n -- ) \ core |
| \G Reserve or release @i{n} address units of data space without |
\G Reserve @i{n} address units of data space without |
| \G initialization; @i{n} is a signed number. In ANS Forth you can |
\G initialization. @i{n} is a signed number, passing a negative |
| \G only deallocate memory from the current contiguous region in |
\G @i{n} releases memory. In ANS Forth you can only deallocate |
| \G this way. In Gforth you can deallocate anything in this way |
\G memory from the current contiguous region in this way. In |
| \G but named words. The system does not check this restriction. |
\G Gforth you can deallocate anything in this way but named words. |
| |
\G The system does not check this restriction. |
| here + |
here + |
| dup 1- usable-dictionary-end forthstart within -8 and throw |
dup 1- usable-dictionary-end forthstart within -8 and throw |
| dp ! ; |
dp ! ; |
| LOOP ; |
LOOP ; |
| |
|
| : maxalign ( -- ) \ gforth |
: maxalign ( -- ) \ gforth |
| |
\G Align data-space pointer for all alignment requirements. |
| here dup maxaligned swap |
here dup maxaligned swap |
| ?DO |
?DO |
| bl c, |
bl c, |
| |
|
| \ the code field is aligned if its body is maxaligned |
\ the code field is aligned if its body is maxaligned |
| ' maxalign Alias cfalign ( -- ) \ gforth |
' maxalign Alias cfalign ( -- ) \ gforth |
| |
\G Align data-space pointer for code field (i.e., such that the |
| |
\G corresponding body is maxaligned). |
| |
|
| ' , alias A, ( addr -- ) \ gforth |
' , alias A, ( addr -- ) \ gforth |
| |
|