:noname, ?do; fix +loop, aligned

llvm
Clyne 2 years ago
parent f63c4dec8a
commit d175fa6a88
Signed by: clyne
GPG Key ID: 3267C8EBF3F9AFC7

@ -143,9 +143,9 @@ yes 6.2.0280 0>
yes 6.2.0340 2>R yes 6.2.0340 2>R
yes 6.2.0410 2R> yes 6.2.0410 2R>
yes 6.2.0415 2R@ yes 6.2.0415 2R@
6.2.0455 :NONAME yes 6.2.0455 :NONAME
yes 6.2.0500 <> yes 6.2.0500 <>
6.2.0620 ?DO yes 6.2.0620 ?DO
yes 6.2.0698 ACTION-OF yes 6.2.0698 ACTION-OF
yes 6.2.0700 AGAIN yes 6.2.0700 AGAIN
yes 6.2.0825 BUFFER: yes 6.2.0825 BUFFER:

@ -62,7 +62,7 @@
: 0= 0 = ; : 0= 0 = ;
: 0< 0 < ; : 0< 0 < ;
: <= - 1- 0< ; : <= - 1- 0< ;
: > <= 0= ; : > swap < ;
: <> = 0= ; : <> = 0= ;
: 0<> 0= 0= ; : 0<> 0= 0= ;
: 0> 0 > ; : 0> 0 > ;
@ -78,19 +78,27 @@
: again postpone repeat ; imm : again postpone repeat ; imm
: do ['] _lit , here 0 , ['] >r , postpone 2>r here ; imm : do ['] _lit , here 0 , ['] >r , postpone 2>r here ; imm
: ?do ['] 2dup , ['] _lit , here 0 , ['] >r , ['] = , postpone if
['] 2drop , postpone 2r> ['] drop , ['] >r , ['] exit ,
postpone then postpone 2>r here ; imm
: unloop postpone 2r> ['] 2drop , ; imm : unloop postpone 2r> ['] 2drop , ; imm
: leave postpone unloop postpone 2r> : leave postpone unloop postpone 2r>
['] drop , ['] >r , ['] exit , ; imm ['] drop , ['] >r , ['] exit , ; imm
: +loop postpone 2r> ['] rot , ['] + , ['] 2dup , : +loop postpone 2r> ['] 2dup , ['] swap , ['] < , ['] >r ,
postpone 2>r ['] - , ['] 0= , ['] _jmp0 , , ['] rot , ['] + , ['] 2dup , ['] swap , ['] < ,
['] r> , ['] ^ , ['] -rot ,
postpone 2>r ['] _jmp0 , ,
postpone unloop
here swap ! ['] r> , ['] drop , ; imm
: loop postpone 2r> ['] 1+ , ['] 2dup ,
postpone 2>r ['] = , ['] _jmp0 , ,
postpone unloop postpone unloop
here swap ! ['] r> , ['] drop , ; imm here swap ! ['] r> , ['] drop , ; imm
: loop 1 postpone literal postpone +loop ; imm
: i postpone r@ ; imm : i postpone r@ ; imm
: j postpone 2r> postpone r@ ['] -rot , postpone 2>r ; imm : j postpone 2r> postpone r@ ['] -rot , postpone 2>r ; imm
: align here 1 cells 1- tuck & if 1 cells swap - allot else drop then ; : align here 1 cells 1- tuck & if 1 cells swap - allot else drop then ;
: aligned dup 1 cells 1- tuck & if 1 cells swap - allot else drop then ; : aligned dup 1 cells 1- tuck & if 1 cells swap - + else drop then ;
: and & ; : and & ;
: or | ; : or | ;
@ -209,3 +217,4 @@
: marker create _latest @ , here , does> : marker create _latest @ , here , does>
dup @ _latest ! cell+ @ here swap - allot ; dup @ _latest ! cell+ @ here swap - allot ;
: :noname 0 , here ] ;

Loading…
Cancel
Save