diff options
author | Clyne Sullivan <clyne@bitgloo.com> | 2024-11-26 07:48:52 -0500 |
---|---|---|
committer | Clyne Sullivan <clyne@bitgloo.com> | 2024-11-26 07:48:52 -0500 |
commit | b40fba6baf84dcf8b6d4f108418e55f0da7b0730 (patch) | |
tree | 2b36518cbd7b544f6d6b62d1831203f67e00e0f2 /core.fth | |
parent | 2820ff4559ab29afbd2c948149dc1eadf1632cf2 (diff) |
add base
Diffstat (limited to 'core.fth')
-rw-r--r-- | core.fth | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -16,6 +16,7 @@ : ip [ _d cell+ cell+ ] literal ; : here dp @ ; : unused [ _d 8 cells + ] literal @ here - ; +: base [ _d 9 cells + ] literal ; : latest [ _d 4 cells + ] literal @ ; \ : dup sp@ @ ; @@ -39,7 +40,10 @@ : 1+ 1 + ; : 1- 1 - ; -: if ['] _jmp0 , here 0 , ; immediate -: then here swap ! ; immediate -: else ['] _jmp , here 0 , swap here swap ! ; immediate +: if ['] _jmp0 , here 0 , ; immediate +: then here swap ! ; immediate +: else ['] _jmp , here 0 , swap here swap ! ; immediate + +: decimal 10 base ! ; +: hex 16 base ! ; |