| dp ! ; |
dp ! ; |
| [THEN] |
[THEN] |
| |
|
| : c, ( c -- ) \ core |
: c, ( c -- ) \ core c-comma |
| \G Reserve data space for one char and store @i{c} in the space. |
\G Reserve data space for one char and store @i{c} in the space. |
| here 1 chars allot c! ; |
here 1 chars allot c! ; |
| |
|
| : , ( w -- ) \ core |
: , ( w -- ) \ core comma |
| \G Reserve data space for one cell and store @i{w} in the space. |
\G Reserve data space for one cell and store @i{w} in the space. |
| here cell allot ! ; |
here cell allot ! ; |
| |
|
| \G If the data-space pointer is not aligned, reserve enough space to align it. |
\G If the data-space pointer is not aligned, reserve enough space to align it. |
| here dup aligned swap ?DO bl c, LOOP ; |
here dup aligned swap ?DO bl c, LOOP ; |
| |
|
| \ : faligned ( addr -- f-addr ) \ float |
\ : faligned ( addr -- f-addr ) \ float f-aligned |
| \ [ 1 floats 1- ] Literal + [ -1 floats ] Literal and ; |
\ [ 1 floats 1- ] Literal + [ -1 floats ] Literal and ; |
| |
|
| : falign ( -- ) \ float |
: falign ( -- ) \ float f-align |
| \G If the data-space pointer is not float-aligned, reserve |
\G If the data-space pointer is not float-aligned, reserve |
| \G enough space to align it. |
\G enough space to align it. |
| here dup faligned swap |
here dup faligned swap |
| : AVariable ( "name" -- ) \ gforth |
: AVariable ( "name" -- ) \ gforth |
| Create 0 A, ; |
Create 0 A, ; |
| |
|
| : 2Variable ( "name" -- ) \ double |
: 2Variable ( "name" -- ) \ double two-variable |
| create 0 , 0 , ; |
create 0 , 0 , ; |
| |
|
| : uallot ( n -- ) \ gforth |
: uallot ( n -- ) \ gforth |
| : Value ( w "name" -- ) \ core-ext |
: Value ( w "name" -- ) \ core-ext |
| (Constant) , ; |
(Constant) , ; |
| |
|
| : 2Constant ( w1 w2 "name" -- ) \ double |
: 2Constant ( w1 w2 "name" -- ) \ double two-constant |
| Create ( w1 w2 "name" -- ) |
Create ( w1 w2 "name" -- ) |
| 2, |
2, |
| DOES> ( -- w1 w2 ) |
DOES> ( -- w1 w2 ) |