toad disc magic
From
sjack@sjack@dontemail.me (sjack) to
comp.lang.forth on Sun Nov 30 16:52:04 2025
From Newsgroup: comp.lang.forth
[#] magic.d -- Disc magic
--.
"XYZZY" at the beginning of the first line of SCR#0 marks the disc as
magic. The next word is a key word that identifies the disc and
following text on the line is a title.
A magic disc contains meta information as to its size, e.g. max
number of blocks, and arrangement, e.g. where error messages are
located. On first access SCR#1 defines meta words that pertain to the
the disc and SCR#2 is the screen first loaded afterwards that refresh
disc meta word values. Usually in SCR#0 a word is defined to "use" the
disc and load SCR#2.
"MAIN" is the primary magic disc and serves as a library. On "GO"
MAIN is placed in use, SCR#0 is loaded, and a configuration script is
found and executed to extend Toad.
Another magic disc is "WORK" containing error messages, and little
code if any. It is used when Toad already is configured for its
desired functionality and does not have much need for additional code
from MAIN. Toad is then operational and may use WORK as scratch disc
and for virtual memory. Toad can bang on WORK with little fear of
loosing code if anything goes awry.
When MAIN is first accessed, it defines the word "LIB" which can be
used afterwards to use MAIN and load its SCR#2. When WORK is first
accessed, it defines the word WORK which can be used to use WORK and
load its SCR#2. On Toad startup, or after "EMPTY", GO entered will
run first access of MAIN to load Toad's configuration and profile.
The script may then leave MAIN and use WORK for first access.
Afterwards, discs can be changed from one to the other by LIB and
WORK.
:) toad go
LOOP ISN'T UNIQUE
+LOOP ISN'T UNIQUE
( ISN'T UNIQUE
?LOADING ISN'T UNIQUE
;NEXT ISN'T UNIQUE
#S ISN'T UNIQUE
TAB ISN'T UNIQUE
.. ISN'T UNIQUE
BACK ISN'T UNIQUE
SV! ISN'T UNIQUE
SVAR: ISN'T UNIQUE
CREATE ISN'T UNIQUE
REFILL ISN'T UNIQUE
XYZZY WORK TOAD FORTH Working disk
bye :) toad -q go
XYZZY WORK TOAD FORTH Working disk
warning ? 1 OK
dir
SCR# 10
0 ( DIR )( Main work disk directory )
1 WTCODE 46 47 SUB_DIR \ word-type codes
2 SHOW 11 11 SUB_DIR \
3 NFO 12 12 SUB_DIR \ toad information OK
12 -list
SCR# 12
0 ( DIR_NFO )( Toad information )
1 INDEX sys o rcdi d/toad_nfo
2 MODE sys o rcdg "MODE" d/toad_nfo
3 FIG_MAN sys o doc fth fig manual OK
"nfo/mode" /da
[r] MODE selections
-Q +Q Enable/disable 'Not unique' warning message
-PAUSE +PAUSE Enable/disable pausing
-ECHO +ECHO Enable/disable FLOAD echoing
-DOTS +DOTS Enable/disable dot representation of items on stack
-PAGE +PAGE Enable/disable screen display paging
-STAB +STAB Enable/disable screen (hardware) tabbing
-WARN +WARN Enable/disable error printouts (when LIB is opened).
-UABORT +UABORT Enable/disable user abort
-WARM +WARM Enable/disable warm abort
-EDUMP Assign snapshot to UABORT
-ERRORS Assign external error handler to UABORT
-ECUT Enable cut error handling
-RTRACE Enable return stack unravelling on error
-STAB +STAB Enable/disable software tabbing
-AMEM +AMEM Enable/disable Absolute memory display
-OFMT +OFMT Enable/disable formatted output
-VOC +VOC Save CURRENT/Restore to CONTEXT
--.
OK
mtb eof OK
warning ? 0 OK
lib OK
disc. XYZZY MAIN TOAD Forth Main library file OK
dir
SCR# 100
0 ( DIR_MAIN )
1 VSW 106 106 SUB_DIR \ VIRTUAL SWITCH
2 SHOW 102 102 SUB_DIR \ Load and show
3 GO 104 104 SUB_DIR \ load and go
4 GO_RTC 105 105 SUB_DIR \ load and go rtc
5 \ UTIL 208 208 SUB_DIR \ load utility
6 WTCODE 126 127 SUB_DIR \ Word type codes
7 LINE 108 108 SUB_DIR \ Line definitions OK
102 -list
SCR# 102
0 ( DIR_SHOW )
1 MMAP CR .( Memory map: ) CR 130 LOAD
2 SIB CR .( String input buffer: ) CR 132 LOAD
3 BLKBUF CR .( Block buffers: ) CR BUFS?
4 BUF CR .( Allocation chain: ) CR 134 LOAD
5 SWITCH CR .( Switch status: ) CR 133 LOAD
6 WTYPE CR .( Word types: ) 124 LIST 125 -LIST
7 VOCS CR .( Vocabularies: ) CR LSVOC
8 MPAD CR .( Memory pad: ) CR 135 LOAD
9 FIO CR .( FIO status: ) CR 136 LOAD
10 LMAC CR .( Local macros ) CR 138 LOAD
11 COLD CR .( Cold start values: ) CR 137 LOAD
12 ABORT CR .( ABORT status: ) 139 LOAD OK
"/show/sib" /da
String input buffer:
SIBB : 134655448
SIBZ : 512
SIBI : 450--> 134655898
DUMP : 255 255 255 127 84 65 78 84 32 114 101 113 117 105 114 101
100 46 102 0 0 4 115 97 110 101 0 7 112 114 111 102 105 108 101 0
6 45 69 68 85 77 80 0 7 43 85 65 66 79 82 84 0 6 43 80 65 85 83 69
0 5 45 83 84 65 66 0 5 45 65 77 69 77 0 5 43 79 70 77 84 0 56 48
0 0 51 57 0 0 36 101 111 102 32 117 115 105 110 103 32 102 98 47
119 111 114 107 46 102 98 32 49 32 108 111 97 100 32 99 114 32 100
105 115 99 46 0 101 111 102 32 117 115 105 110 103 32 102 98 47 119
111 114 107 46 102 98 32 49 32 108 111 97 100 32 99 114 32 100 105
115 99 46 0 0 7 112 114 111 102 105 108 101 0 8 110 102 111 47 109
111 100 101 0 32 32 32 32 32 32 32 49 50 32 49 50 32 83 85 66 95
68 73 82 32 32 92 32 116 111 97 100 32 105 110 102 111 114 109 97
116 105 111 110 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
32 32 32 0 0 32 32 32 32 32 115 121 115 32 111 32 114 99 100 103
32 34 77 79 68 69 34 32 100 47 116 111 97 100 95 110 102 111 32 32
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
32 32 0 0 6 68 73 82 86 79 67 0 9 47 115 104 111 119 47 115 105 98
0 32 32 32 49 48 50 32 49 48 50 32 83 85 66 95 68 73 82 32 32 92
32 76 111 97 100 32 97 110 100 32 115 104 111 119 32 32 32 32 32
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 32 32
32 32 32 32 32 67 82 32 46 40 32 83 116 114 105 110 103 32 105 110
112 117 116 32 98 117 102 102 101 114 58 32 41 32 67 82 32 49 51
50 32 76 79 65 68 32 32 32 32 32 32 32 32 32 32 32 32 32 0 0 101
115 116 46 102 0 67 79 78 83 84 65 78 84 32 116 101 115 116 46 102
0 0 8 82 69 81 85 73 82 69 68 0 12 102 47 114 101 113 117 105 114
101 100 46 102 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 OK
mtb work OK
disc. XYZZY WORK TOAD FORTH Working disk OK
--.
[#] //
--
me
--- Synchronet 3.21a-Linux NewsLink 1.2