Commit 6cadccb5 authored by pazsan's avatar pazsan

Fixed some alignment problems

parent 9f267c89
......@@ -100,6 +100,7 @@ also Forth definitions
[IFDEF] asm-include asm-include [THEN]
previous
hex
>CROSS
......@@ -245,6 +246,7 @@ VARIABLE VocTemp
: <T get-current VocTemp ! also Ghosts definitions ;
: T> previous VocTemp @ set-current ;
hex
4711 Constant <fwd> 4712 Constant <res>
4713 Constant <imm> 4714 Constant <do:>
......@@ -543,7 +545,7 @@ ghost over ghost = ghost drop 2drop drop
\ generic threading modell
: docol, ( -- ) compile :docol T 0 , H ;
: dodoes, ( -- ) compile :doesjump T 0 , H ;
: dodoes, ( -- ) T cfalign H compile :doesjump T 0 , H ;
[IFUNDEF] (code)
Defer (code)
......@@ -553,7 +555,9 @@ Defer (end-code)
>TARGET
: Code
(THeader there resolve
there 2 T cells H + T a, 0 , H
[ has-prims 0= [IF] ITC [ELSE] true [THEN] ] [IF]
there 2 T cells H + T a, 0 , H
[THEN]
depth (code) ;
: Code:
......@@ -648,7 +652,7 @@ Cond: MAXI
docol, depth T ] H ;
: :noname ( -- colon-sys )
T align H there docol, depth T ] H ;
T cfalign H there docol, depth T ] H ;
Cond: EXIT ( -- ) restrict? compile ;S ;Cond
......@@ -669,7 +673,7 @@ Cond: [ restrict? state off ;Cond
>TARGET
Cond: DOES> restrict?
compile (does>) dodoes, tdoes @ ?dup IF @ T here H resolve THEN
compile (does>) dodoes, tdoes @ ?dup IF @ T here H resolve THEN
;Cond
: DOES> dodoes, T here H !does depth T ] H ;
......
......@@ -36,13 +36,13 @@
(defvar forth-positives
" : :noname code interpretation: ;code does> begin do ?do +do -do u+do u-do while if ?dup-if ?dup-0=-if else case struct [if] [else] "
" : :noname code interpretation: ;code does> begin do ?do +do -do u+do u-do while if ?dup-if ?dup-0=-if else case of struct [if] [else] "
"Contains all words which will cause the indent-level to be incremented
on the next line.
OBS! All words in forth-positives must be surrounded by spaces.")
(defvar forth-negatives
" ; end-code ;code does> until repeat while +loop loop -loop s+loop else then endif again endcase end-struct [then] [else] [endif] "
" ; end-code ;code does> until repeat while +loop loop -loop s+loop else then endif again endcase endof end-struct [then] [else] [endif] "
"Contains all words which will cause the indent-level to be decremented
on the current line.
OBS! All words in forth-negatives must be surrounded by spaces.")
......
......@@ -489,7 +489,7 @@ Defer 'throw
: throw ( y1 .. ym error/0 -- y1 .. ym / z1 .. zn error ) \ exception
?DUP IF
[ here 9 cells ! ] \ entry point for signal handler
[ has-header [IF] here 9 cells ! [THEN] ] \ entry point for signal handler
handler @ dup 0= IF
[ has-os [IF] ]
2 (bye)
......@@ -747,9 +747,9 @@ Create ??? 0 , 3 c, char ? c, char ? c, char ? c,
: !does ( addr -- ) \ gforth store-does
lastxt does-code! ;
: (does>) ( R: addr -- )
r> /does-handler + !does ;
r> cfaligned /does-handler + !does ;
: dodoes, ( -- )
here /does-handler allot does-handler! ;
cfalign here /does-handler allot does-handler! ;
doer? :dovar [IF]
: Create ( "name" -- ) \ core
......@@ -1308,7 +1308,7 @@ Defer 'cold ' noop IS 'cold
pathstring 2@ process-path pathdirs 2!
init-included-files
[ [THEN] ]
'cold
\ 'cold
[ has-files [IF] ]
argc @ 1 >
IF
......
......@@ -68,7 +68,7 @@ has-prims [IF]
prims-include
undef-words
include primitives.fs
all-words
all-words UNLOCK LOCK
[THEN]
doc-on
......
......@@ -600,7 +600,7 @@ n2 = 2*n1;
/* !! is this still correct? */
n2 = n1>>1;
:
dup U-HIGHBIT and IF 1 ELSE 0 THEN
dup MINI and IF 1 ELSE 0 THEN
[ bits/byte cell * 1- ] literal
0 DO 2* swap dup 2* >r U-HIGHBIT and
IF 1 ELSE 0 THEN or r> swap
......
......@@ -31,9 +31,6 @@ interpret/compile: S" ( compilation 'ccc"' -- ; run-time -- c-addr u ) \ core,fi
:noname ' >body postpone ALiteral postpone ! ;
interpret/compile: IS ( addr "name" -- ) \ gforth
' IS Alias TO ( addr "name" -- ) \ core-ext
immediate
:noname ' >body @ ;
:noname ' >body postpone ALiteral postpone @ ;
interpret/compile: What's ( "name" -- addr ) \ gforth
......@@ -45,11 +42,14 @@ interpret/compile: ." ( compilation 'ccc"' -- ; run-time -- ) \ core dot-quote
\ DOES> 17mar93py
:noname
align dodoes, here !does ]
dodoes, here !does ]
defstart :-hook ;
:noname
;-hook postpone (does>) ?struc dodoes,
defstart :-hook ;
interpret/compile: DOES> ( compilation colon-sys1 -- colon-sys2 ; run-time nest-sys -- ) \ core does
' IS Alias TO ( addr "name" -- ) \ core-ext
immediate
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment