Skip to content

Commit

Permalink
fixed WHILE, REPEAT using bb4wforth's fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
chengchangwu committed Aug 17, 2010
1 parent daad021 commit a67d543
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jonesforth.f
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,12 @@
: WHILE IMMEDIATE
['] 0BRANCH , \ compile 0BRANCH
DP @ \ save location of the offset2 on the stack
SWAP \ get the original offset (from BEGIN)
0 , \ compile a dummy offset2
;

: REPEAT IMMEDIATE
['] BRANCH , \ compile BRANCH
SWAP \ get the original offset (from BEGIN)
DP @ - , \ and compile it after BRANCH
DUP
DP @ SWAP - \ calculate the offset2
Expand Down

0 comments on commit a67d543

Please sign in to comment.