From: Tim Vaughan Date: Mon, 23 May 2016 01:49:30 +0000 (+1200) Subject: Problem is with lines >80 chars long. X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=dfc28eefbcea7eb34cf9c1e0df010322b291c40a;p=forth.jl.git Problem is with lines >80 chars long. --- diff --git a/src/forth.jl b/src/forth.jl index a233743..134b651 100644 --- a/src/forth.jl +++ b/src/forth.jl @@ -984,7 +984,7 @@ function run(;initialize=true) jmp = NEXT while jmp != 0 try -# println("Entering prim $(getPrimName(jmp))") + #println("Entering prim $(getPrimName(jmp))") jmp = callPrim(jmp) catch ex diff --git a/src/lib.4th b/src/lib.4th index 4e73206..81b1e6f 100644 --- a/src/lib.4th +++ b/src/lib.4th @@ -149,15 +149,11 @@ : +LOOP IMMEDIATE - trace - ['] DUP , \ Store copy of increment ['] R> , ['] SWAP , ['] R> , ['] SWAP , ['] R> , ['] SWAP , ['] + , ['] 2DUP , ['] - , ['] SWAP , ['] >R , ['] SWAP , ['] >R , ['] SWAP , ['] >R , - trace - \ Condition differently depending on sign of increment ['] SWAP , ['] 0>= , [COMPILE] IF ['] 0<= , @@ -165,16 +161,12 @@ ['] 0> , [COMPILE] THEN - trace - \ Branch back to begining of loop kernel ['] 0BRANCH , HERE @ - , \ Clean up ['] RDROP , ['] RDROP , ['] RDROP , - trace - \ Record address of loop end for any LEAVEs to use HERE @ SWAP ! @@ -217,7 +209,6 @@ REPEAT ; -xx \ COMMENTS ----------------------------------------------------------------------