-
Notifications
You must be signed in to change notification settings - Fork 1
/
ED
60 lines (45 loc) · 1.11 KB
/
ED
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
\ Editor StrongEd support.
cr .( Loading Editor support...)
: find-editor
z" startdesktoptask " pocket z!
pocket 18 + max-path
z" StrongED$Dir" OSVar@ dup pocket c!
0= abort" No Strong ED path"
pocket 1+ ;
\ start the StrongED editor if we can find it.
: editor
find-editor os_cli drop ;
variable msg_block 160 allot
\ for messages to the editor
code send_user_message
mov r0, # 17
adr r1, # msg_block
mov r2, # 0
mov r3, # 0
swi " Wimp_SendMessage"
next c;
\ make an open doc message
: edit-open
msg_block 160 erase
160 msg_block !
&43b00 msg_block 16 + !
0 pocket 12 + !
z' StrongED_OpenDoc '
msg_block 20 + z! ;
\ edit word
: ed ( <wordname> -- )
cur-file 160 erase
edit-open
.viewinfo drop drop
cur-file 1+ msg_block 37 + z!
send_user_message ;
\ edit filename
: edit ( <filename> -- )
edit-open
bl word
pocket 1+ msg_block 37 + z! drop
send_user_message ;
\ NOTES on StrongED
\ http://stronged.torrens.org/man/misc/inter.html
\ http://rickman.orpheusweb.co.uk/cookbk/sections/1440.html
\ http://stronged.torrens.org/archive/2018/msg00427.html