-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge my work around CREATE...;CODE and CREATE...DOES> #8
base: master
Are you sure you want to change the base?
Commits on Jun 20, 2015
-
annexia/jonesforth.s.txt uses LITSTRING, while jonesforth.s/f use LITS. There's no real reason why this should be different from the original. Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 7091cc7 - Browse repository at this point
Copy the full SHA 7091cc7View commit details -
annexia: update originals to latest version (47)
The ARM Jonesforth is version 47, while the prelude and x86 version under annexia were version 42. Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for a7d8fad - Browse repository at this point
Copy the full SHA a7d8fadView commit details -
jonesforth.s: omit \namelen parameter to defword and friends
It's error-prone and doesn't quite help the readability, so implicitly calculate the length within the macro. Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 79ab55e - Browse repository at this point
Copy the full SHA 79ab55eView commit details
Commits on Jun 24, 2015
-
Now we can make machine code definitions in Forth. I've decided to make all machine code emitters start with $ (such as $NEXT), although this may change in the future. Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ac99b06 - Browse repository at this point
Copy the full SHA ac99b06View commit details -
jonesforth.f: OK should be followed by CR
putchar may buffer after all. Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 7e11a37 - Browse repository at this point
Copy the full SHA 7e11a37View commit details
Commits on Jun 30, 2015
-
jonesforth.f: rewrite ;CODE, add CODE and END-CODE
Make ;CODE behave like the gforth variant, i.e. usable inside a level 2 (word defining) word (i.e. after CREATE). Before (see x86 jonesforth 47): : FOO ;CODE Now: CODE FOO END-CODE Or with CREATE: : MKNOTHING WORD CREATE 0 , ;CODE END-CODE MKNOTHING FOO More examples... so now we could do something like: defword "$DOCON",F_IMM,ASMDOCON .int LIT @ r0 points to DFA ldr r12, [r0, #4] @ read cell from DFA .int COMMA .int LIT PUSHDSP r12 @ push to stack .int COMMA .int EXIT : MKCON WORD CREATE 0 , ( push dummy codeword, rewritten by (;CODE)) , ( actual constant ) ;CODE $DOCON END-CODE 5 MKCON CON5 CON5 . CR CODE ... ENDCODE instead can be used to make `defcode' definitions in Forth instead of jonesforth.s. So now we could do something like: @ push r0 to stack defword "$<R0",F_IMM,ASMFROMR0 .int LIT PUSHDSP r0 .int COMMA .int EXIT @ push r7 to stack defword "$<R7",F_IMM,ASMFROMR7 .int LIT PUSHDSP r7 .int COMMA .int EXIT @ pop stack to r0 defword "$>R0",F_IMM,ASMTOR0 .int LIT POPDSP r0 .int COMMA .int EXIT @ pop stack to r7 defword "$>R7",F_IMM,ASMTOR7 .int LIT POPDSP r7 .int COMMA .int EXIT CODE SWAP $>R0 $>R7 $<R0 $<R7 END-CODE HEX 1337 FOOF SWAP . . CR Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 0f5e3ec - Browse repository at this point
Copy the full SHA 0f5e3ecView commit details -
jonesforth.f: fix SEE to not segfault on words that don't exist.
DICT signature is changed. On success: ( -- dictionary_address ) On failure ( -- word_addr word_len 0 ) Introduce DICT-CHECKED wrapper around DICT to log error about unknown word and throws an ABORT. Fix all words using DICT to instead use DICT-CHECKED. As an unfortunate side effect, the exception handling code had to travel upwards somewhat. Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for fef5bc3 - Browse repository at this point
Copy the full SHA fef5bc3View commit details -
jonesforth.f: let SEE see inside words created with CODE and ;CODE
[instead of segfaulting or printing nothing, of course] Now: CODE FOO END-CODE SEE ...gives CODE FOO ( CODEWORD FOO+0 ) E49A0004 E5901000 E12FFF11 (END-CODE) ...where the hex stuff is the $NEXT macro. CREATE ... ;CODE words: : MKNOTHING WORD CREATE 0 , 3 , ;CODE END-CODE MKNOTHING BAR SEE MKNOTHING SEE BAR ...gives : MKNOTHING WORD CREATE 0 , 3 , ;CODE ( MKNOTHING+9 ) E49A0004 E5901000 E12FFF11 (END-CODE) CODE BAR ( CODEWORD MKNOTHING+9 ) 3 (END-CODE) ...which shows you that BAR is a word created with MKNOTHING. Native words: SEE 2SWAP ...gives CODE 2SWAP ( CODEWORD 85BC ) (END-CODE) ...since length isn't encoded defcode definitions, this is the best we can do. Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 22cd871 - Browse repository at this point
Copy the full SHA 22cd871View commit details
Commits on Jul 26, 2015
-
See my blog post for details. http://osdevnotes.blogspot.com/2015/07/does-in-jonesforth.html Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 70675a2 - Browse repository at this point
Copy the full SHA 70675a2View commit details
Commits on Nov 5, 2015
-
pijFORTHos: move all the rpi stuff into rpi/
I really just want this to be a bunch of useful stuff built around a generic jonesforth.s. Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for f2f363b - Browse repository at this point
Copy the full SHA f2f363bView commit details -
arm: rename the jonesforth.s file
Be more explicit about arch. Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for b75a62f - Browse repository at this point
Copy the full SHA b75a62fView commit details
Commits on Nov 17, 2015
-
aarch64: a really terrible port of the jonesforth-arm.S code
This is still a wip. Some basic things seem to work, but a lot more is to be done. Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for b1cd6c2 - Browse repository at this point
Copy the full SHA b1cd6c2View commit details