-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcode_fs
63 lines (44 loc) · 1.27 KB
/
code_fs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
\ code_fs
\ This file is part of Sfera, a library for SuperForth
\ http://programandala.net/en.program.sfera.html
\ Author: Marcos Cruz (programandala.net)
\ XXX UNDER DEVELOPMENT -- usable, but needs improvements
\ ==============================================================
\ License
\ You may do whatever you want with this work, so long as you
\ retain the copyright/authorship/acknowledgment/credit
\ notice(s) and this license in all redistributed copies and
\ derived works. There is no warranty.
\ ==============================================================
\ History
\ 2016-01-08: Start.
\
\ 2016-01-23: Updated header.
\
\ 2016-02-08: Removed `end-of-file`.
\ ==============================================================
[undefined] assembler [if]
vocabulary assembler
[then]
current @
assembler definitions
variable abase \ backup of `base`
: asm ( -- )
\ !csp \ XXX TODO
base @ abase ! hex
\ also assembler \ XXX TODO
;
\ Start assembler mode.
: end-asm ( -- )
\ ?csp \ XXX TODO
abase @ base !
\ previous \ XXX TODO
;
\ End assembler mode.
: code ( "name" -- ) create-code asm ;
\ Define a code word "name".
: end-code ( -- )
end-asm ;
\ End the definition of a code word.
current !
\ vim: filetype=superforthsfera