mirror of
https://github.com/nineties/planckforth
synced 2025-01-27 08:00:04 +01:00
Fixed +loop
This commit is contained in:
parent
3411fec40d
commit
d014418bb4
1 changed files with 11 additions and 3 deletions
14
bootstrap.fs
14
bootstrap.fs
|
@ -1473,16 +1473,24 @@ do-stack 16 cells + do-sp !
|
||||||
compile rdrop
|
compile rdrop
|
||||||
; immediate
|
; immediate
|
||||||
|
|
||||||
|
\ This code is take from Gforth
|
||||||
|
: crossed-boundary? ( d n i )
|
||||||
|
swap - ( d i-n )
|
||||||
|
2dup + ( d i-n i+d-n )
|
||||||
|
over xor ( d i-n (i-n)^(i+d-n) )
|
||||||
|
>r xor r> ( d^(i-n) (i^n)^(i+d-n) )
|
||||||
|
and 0<
|
||||||
|
;
|
||||||
|
|
||||||
: +loop
|
: +loop
|
||||||
compile r>
|
compile r>
|
||||||
compile r>
|
compile r>
|
||||||
|
compile 3dup
|
||||||
compile rot
|
compile rot
|
||||||
compile over
|
|
||||||
compile +
|
compile +
|
||||||
compile >r
|
compile >r
|
||||||
compile over
|
|
||||||
compile >r
|
compile >r
|
||||||
compile =
|
compile crossed-boundary?
|
||||||
compile 0branch
|
compile 0branch
|
||||||
here cell + backpatch-leave \ leave jumps to here
|
here cell + backpatch-leave \ leave jumps to here
|
||||||
do> drop \ do-mark
|
do> drop \ do-mark
|
||||||
|
|
Loading…
Add table
Reference in a new issue