home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d7xx
/
d768
/
uedit.lha
/
Uedit
/
Documentation
/
UEK.DOC
< prev
next >
Wrap
Text File
|
1992-11-22
|
30KB
|
830 lines
-----------------------------------------------------------------------------
| UEK.DOC |
| Placed in the public domain July 92 Rick Stiles. |
-----------------------------------------------------------------------------
Special UEK functions
The peek() and poke() functions enable you to peek at any memory address and
poke a value into it.
getAddress() gets the address of internal Uedit variables which are in the
table below. For array or structure variables, you can add an offset to the
address that getAddress() returns to you and access a structure member or
index into an array. Most of the variables listed are "dangerous" to change
with poke() and should only be used for READ-ONLY purposes. See the warnings
below.
peek() gets the 1, 2, or 4 byte integer value at the given address.
poke() stores the 1, 2, or 4 byte integer value at the given address.
The Type argument indicates which kind of integer value to store: 1 byte, 2
byte, or 4 byte.
CL Functions:
getAddress(variable,addr) - gets Variable address; returns FALSE if
variable number is not in Variable list.
peek(addr,val,type) - gets val from address, always returns TRUE.
(See Type argument below.)
poke(addr,val,type) - pokes val into address, always returns TRUE.
(See Type argument below.)
Arguments:
variable: see Variables list below.
addr: memory address
val: integer value (byte, short, or long integer)
type: 1=byte, 2=short, 4=long
(Note: Type MUST correspond to the type of the variable you are
accessing in the list below, if you are accessing one of the
listed Variables. Using the wrong type in poke() would corrupt
memory.)
***** How to use these functions *****
When you first start using these functions, you had better be prepared for a
crash or lockup and having to reboot. These functions work nicely, but the
first time you try them out you are liable to make mistakes that cause memory
corruption or are liable to change a variable that should not be changed.
Only poke() can cause trouble, however. getAddress() and peek() are
"passive" and harmless.
There is a good way to use these functions and a way I hope you won't use
them. If you waste hours fooling with them, you are defeating the purpose of
Uedit. Uedit is supposed to be Productive and Useful. It is supposed to
save you Time and make your work Easy. It is not supposed to be a Job in
itself.
Do not peek and poke around needlessly, wasting time on these functions. Use
them only in crisp, one-shot cases, where they enable you to write useful
commands for which the regular CL lacks a required ingredient or access.
For example, suppose you need to correlate mouse X-Y position with column and
line in the window. Using getAddress() and peek() you can get all the
information you need. You can get the addresses of vertPixels, horPixels,
charHeight, charWidth, and lineHeight - but you won't need all of these.
Using peek() on the addresses for these, you can get the values of
charHeight, and so on. The value in lineHeight[0] is the base of the message
line, which is the beginning of the text area of the window. Then you can
compute the line and column corresponding to the mouseX-Y. But as
lineHeight[] contains the precomputed vertical pixel positions of lines, you
shouldn't need charHeight or vertPixels.
getAddress() and peek() can accomplish the same thing as a great many of the
CL functions, such as setEol(), getFlag(), flipFlag(), getLocal(),
setLocal(), etc. Using address offsets into curBuf's structure or a buffer's
in the buf[] array, you can get the local lineLength, pageLines, and so on,
just as you can with getLocal(). You can do that with any buffer in the
buf[] array, but first be sure to check the buf[n] pointer to see if it is
NULL. A NULL buf[n] pointer means that the buffer does not exist.
getAddress() and peek() are always safe to use. Using them, you can discover
the values and status of things that the regular CL doesn't give you access
to. For example, you can tell whether a buffer exists or not, whereas
isEmpty() returns True if it exists but is empty or doesn't exist.
Poke() is "dangerous" to use in the majority of cases and would corrupt
memory and cause Uedit to malfunction or crash or lock up.
********* WARNINGS ********
*** The variables in the list below should be used ONLY for READ-ONLY
purposes.
*** If you use poke(), it is entirely at your own risk. Before
experimenting with poke(), save your file changes first! Otherwise
you may lose hours of work that hasn't been saved.
*** Even variables that seem innocuous such as noDisplay may cause a
CRASH if you change their value. (noDisplay is especially dangerous,
but so are execLearn and most variables in the list.)
*** The variables marked (*) are "possibly" safe to change with poke():
* If you poke a value in the Allowed Range for that variable.
* If you poke ONLY 1 byte for char/uchar variables, 2 bytes for
short variables, and 4 bytes for long or address variables.
* If you do it at Your Own Risk.
*** I could easily have made mistakes in marking variables as safe or
unsafe. I merely went by my recollection of how the program uses
them. I did not trace and try changing each one to make sure. I did
try to err on the side of caution in marking them, however.
Variable List
Addresses: With getAddress() you are getting the ADDRESS of the variables
below, NOT the value of them. Note that this is just as true for pointer
(address) variables. You can only get the value using peek(). For instance,
nStack is the base pointer of the number stack. If you use getAddress() to
get the address of nStack, then in order to get the address that nStack is
pointing to (i.e., the value of nStack) you must use peek().
Variable Name Type (Purpose)
-------- ---- -------
0 (*) eol --uchar (current end of line char)--
1 (*) mouseX --short (last mouseX)--
2 (*) mouseY --short (last mouseY)--
3 (R) reportMouse --short (trackMouse flag)--
4 (R) mouseDown --short (mouseDown flag)--
5 (*) inputChar --short (last inputChar, 0 if has cmd)--
6 (*) macroNum --short (last macroNum)--
7 (*) gChar --short (last inputChar, not 0 even if has cmd)--
8 (*) showTitle --short (if nonzero refresh title bar in next pause)--
9 (R) depth --short (screen depth, 1 or 2 bitplanes)--
10 (R) maxLineChars --short (max chars per line)--
11 (R) charHeight --short (char pixel height)--
12 (R) charWidth --short (char pixel width)--
13 (R) vertPixels --short (vert screen pixels, use X2 for lace)--
14 (R) horPixels --short (hor window pixels )--
15 (R) maxLines --short (max text lines in window)--
16 (R) vscrollamt --short (vert scroll amt outstanding)--
17 (R) hscrollamt --short (hor scroll amt outstanding)--
18 (*) globalFlags --ulong (global flags picked up by new buffers)--
19 (R) primitive --short (PM flag, 0=no, 1=startup compile, 2=PM)--
20 (*) displayFlag --short (display flag bits)--
21 (R) curSplit --short (current split # in split window arrays)
22 (R) noDisplay --short (on when hideDisplay being used)--
23 (*) toTiny --short (goto tiny window next pause flag)--
24 (*) stopPause --short (abort flag)--
25 (R) menusUp --short (menus are up flag)--
26 (R) warpUp --short (warptext is up flag)--
27 (R) execLearn --short (am running learned seq flag)--
28 (*) stopSave --short (abort save next chance flag)--
29 (R) saves --short (# file saves outstanding)--
30 (R) prtOpen --short (printer port open flag)--
31 (R) prints --short (# prints outstanding)--
32 (*) UNUSED -- --
33 (*) menuInset --short (% (0-100) offset of submenus)--
34 (D) curLearn --short (index in running/learning learned seq)--
35 (D) curMsgIn --short (# of current input in msgQ array)--
36 (D) curMsgOut --short (# of current output in msgQ array)--
37 (R) curBuf --struct CB *curBuf (current buffer)--
38 (R) rp --struct RastPort *rp--
39 (R) uport --struct MsgPort *uport (input port)--
40 (R) edScreen --struct Screen *edScreen--
41 (R) edWindow --struct Window *edWindow--
42 (R) vp --struct ViewPort *vp--
43 (R) ffont --struct TextFont *ffont--
44 (R) nStack --struct ST *nStack(number stack)--
45 (R) bStack --struct ST *bStack(buffer stack)--
46 (R) sStack --struct ST *sStack(file-save stack)--
47 (D) cmdTable --uchar *cmdTable[MAXMACROS] (macro table)--
48 (D) cmdLens --short cmdLens[MAXMACROS] (macro lengths)--
49 (D) msgQ --struct msgQueue msgQ[MAXMSGS+1](raw inputs)--
50 (D) learnQ --struct msgQueue learnQ[MAXLEARN+1](learn inputs)--
51 (*) tabTables --uchar tabTables[MAXTABTABLES][MAXTABS + 1]--
52 (D) printByte --long printByte[MAXPRINTS](current byte)--
53 (R) printLen --long printLen[MAXPRINTS](size of print)--
54 (R) printBuf --uchar *printBuf[MAXPRINTS](buffer)--
55 (R) printChoice --short printChoice[MAXPRINTS](prefPrint this print)--
56 (R) prtPort --struct Port *prtPort (printer port being used)--
57 (*) charMappings --long charMappings[4] (illegal char mappings)--
58 (D) such --long *such[MAXSUCH] (ptrs to config defaults)--
59 (D) splitBufNum --short splitBufNum[MAXSPLITS]--
60 (R) startSplit --short startSplit[MAXSPLITS]--
61 (R) stopSplit --short stopSplit[MAXSPLITS]--
62 (R) lineHeight --short lineHeight[MAXLINES]--
63 (*) coloring --uchar coloring[3][4] (RGB colors)--
64 (*) UNUSED -- --
65 (*) rc --uchar rc[32] (page/row/col last displayed)--
66 (*) printKeys --uchar printKeys[ (2 * MAXPRINTABLES) + 1]--
67 (D) bufferNames --uchar *bufferNames[ALLBUFS]--
68 (D) gadgetName --uchar gadgetName[4][22]--
69 (D) configPtr --uchar *configPtr (name of config)--
70 (*) helpName --uchar helpName[22] (name of key-help)--
71 (*) dataName --uchar dataName[64] (name of data file)--
72 (R) buf --struct CB *buf[ALLBUFS] (buffer array)--
73 (*) n --long n[ALLBUFS] (N-integer array)--
74 (R) macroFunc --function *macroFunc[MAXFCTTOKENS] (yep)--
75 (D) oldCursorLine --short (last cursor line)--
76 (D) oldCursorCol --short (last cursor col)--
77 (V) startLine --short (display start line)--
78 (V) stopLine --short (display stop line)--
79 (D) nSplit --short (number of split windows)--
80 (*) maxSaveSize --short (max spooled file save buffer size <= 32767)--
81 (*) altKeys --uchar altKeys[2*MAXPRINTABLES + 1]--
(*) - could be safe to modify, if careful.
(D) - dangerous to modify, but could be done if smart & careful.
(R) - READ-ONLY, never use poke() on these.
(V) - volatile, changing it wouldn't have any effect.
NOTE: On the (D) variables, by being smart and careful it is meant that it
may be necessary to update several variables in order to make the change safe
and workable. A good example is nSplit and the split window arrays. They
work together and must be consistent. Above all split 0 must never be
changed, because it is curBuf. Another example is msgQ[] and curMsgIn and
curMsgOut. These form a ring buffer and curMsgIn is normally ahead of or
equal to curMsgOut. Also the Count field in the msgQueue structure must be 0
for any available input slot and non-zero (typically 1) for any unprocessed
input. Note that using these you could actually queue up inputs to the input
stream.
WARNINGS & Info
Here are a few selected items of info that could be helpful, plus a few
selected warnings.
I can't warn you about everything or tell you under what conditions
everything might or should not be modified. Few things can be modified
safely and the most innocent looking change may cause a crash, lockup, or
malfunction.
For example, DO NOT change noDisplay, prints, saves, execLearn, warpUp,
prtOpen, or any of the variables marked (R) in the above table.
Whatever you do, it is at your own risk:
eol: It is probably safe to change eol, but it is not encouraged.
Changing it does NOT change the global (config default) eol value.
That one has to be changed in the such[] array. If you do change
eol, which makes the display go screwy, use Load Data to recover from
it. It will reset eol back to the config default eol.
horPixels & vertPixels: Do not change these values. Also note that
vertPixels is the height of the window, not of the screen. The
screen is 1 pixel taller so you can grip the screen at the top and
slide it up or down.
bufferNames: array of pointers pointing to literal strings in startup
command. Do NOT write beyond or on top of the trailing null byte of
those strings.
gadgetName: Keeps the name length in byte 21 of each name. And the names
are also null terminated so the max name length is 19 bytes.
configPtr: Points to the config name. Do not write beyond or on top of the
trailing null byte in the config name.
printKeys: This is the same array as in Config! defaults. It has
two parts, each 64 bytes long.
tabTables: You can change these tables if you enter the values in the given
table in ascending order and end with a trailing null byte. The
lowest tab value is 1 and the highest is 255. Unused tables should
be 0 filled.
splitBufNum: Do NOT change the buffer number of the split number stored in
curSplit - i.e., do not change the value of splitBufNum[curSplit].
It is always curBuf (curFile). The buffer numbers of the other
splits can probably be changed, provided the buffer exists. (I think
the display routine checks, but don't count on it.) See the
following split window variables. (Note: Even if you changed the
buffer # in splitBufNum[curSplit], and changed curBuf to make it
point to the new buffer (the pointer would be in buf[n], where n is
the new buffer #), this would NOT be safe, because other steps are
required in order to switch curBuf.)
nSplit: Do NOT change this. This can have value 0-7, it is the # of
split windows. curBuf (curFile) is always the curSplit position of
the arrays splitBufNum[], startSplit[], and stopSplit[]. If nSplit
is changed, the split arrays all have to be adjusted accordingly.
startSplit & stopSplit: Do NOT change the line number values in these.
If you cause displaying beyond end of screen it would probably cause
a crash. If you got rid of a split window without redoing the line
numbers, the displaying would be screwy and trouble might arise.
globalFlags: Do NOT set the LOCKED, READONLY, DELETEIT, or NEEDPACK flag
bits in globalFlags. These are never set in globalFlags. Do NOT set
or reset a buffer's flags (using buf[] or curBuf) to any of the above
values. If the buffer is in the file-save queue, it is LOCKED and
must not be unlocked; also it may have its DELETEIT or READONLY flag
bit set. If it is not in the queue, its LOCKED and DELETEIT flag
bits must NEVER be used. If it is READONLY and not in the save-
queue, it cannot be put into the queue because it is read-only. If
it is in the queue, the read-only flag is used for a certain purpose
and must not be changed.
oldCursorline & oldCursorCol: These are used for the following purposes:
To tell the display where the cursor last was, so it can be wiped out
and moved. In the onScreen() test. In setRuler() and perhaps a few
other places where the cursor line might be of interest.
such: Such[] is an array of pointers to LONG integer variables which
are the config defaults. They appear in such[] in the same order as
they do in Config!:
pmEsc ([0] position)
userGlobalA userGlobalB columnar cram rowCol
markGadgets lace spooks busies teachKeys
MAXFILES icons searchCaps wildCard eitherOr
multiWild allBut singleWhite multiWhite menuOffset
learnMode cmdMultiplier speakAlerts speakMsgs printTabs
smartTabs customScreen useKeys prefPrint idleTime
hideDisplay scrollType trapMenus sWidth sHeight
tinyPriority capsLock clickTime userGlobalC UserGlobalD
trueTabs autoIndent overstrike autoBackup readOnly
wordWrap rightJustify mapChars changed userLocalA
userLocalB tabTable lineLength splitSize leftMargin
topMargin bottomMargin pageLines eoline inpChar
mcrNum localColor screenColor tinyCoords
If you change the value of a flag, use 0 for FALSE and 1 for TRUE.
If you change a flag, its value may not be used until you open a new
buffer or maybe not even then.
Do NOT change learnMode! Learn has to be turned on gracefully along
with other initializing.
localColor and screenColor are bit masks as described in the doc.
tinyCoords uses 16 bits each for the X and Y coords of the tiny
window. If you change tinyCoords, stay safely within the pixel size
of the WorkBench window.
If you change the value of any integer such as tabTable or eoline,
stay within the config default legal range for that variable. These
are listed in the manual and in Config!.
macroFunc: This is the array of pointers to the CL functions.
The functions in macroFunc[] are in the order of the function defines
below. The first 12 functions in the function defines below don't
exist and their job is carried out in the engine itself. Examples
are "if", "else", "return" and so on. In macroFunc[], any function
that doesn't really exist points to Fnull() which carries out an
abort. Also at the end of macroFunc[] may be some unused slots which
point to Fnull().
cmdTable & cmdLen: cmdTable is the array of pointers to commands. cmdLen
is the table of lengths of the commands. The entries are in macroNum
order. See the macroNum info in the manual. If a command does not
exist, the cmdTable entry will be NULL and the cmdLen entry will be
0. Swapping commands consists of swapping the entries of BOTH arrays
simultaneously. NEVER put the same pointer in TWO or more entries in
cmdTable, because obviously a memory area must not be freed twice by
Uedit. Copying a command consists of allocating a new block of
memory and copying the command into it and setting the length in
cmdLen to the same as for the command being copied. Killing a
command consists of freeing its memory and zeroing the entries for it
in cmdTable and cmdLen. Never change a value in cmdLen[] unless you
are swapping commands, and then the pointers in cmdTable[] must also
be swapped. Commands are terminated by a 0 byte; the engine knows
it's finished when it hits a 0 byte that isn't part of an integer
field, that is when it is looking for the next function and instead
hits a 0.
buf & n: These are the same as the buf and n variables in the CL.
warpUp: If warp is not up, it can only mean one of two things: Either
there was no memory to allocate for it or the font you are using is
not an 8 or 11 pixel font.
altKeys: It contains both alternate keys arrays which are in the Config!
defaults. The first is applies to the ALT key, and the second
applies to SHIFT-ALT. The arrays are each MAXPRINTABLES in length.
***** Structures & Defines *****
#define ALLBUFS 100
#define MAXMENUS 7
#define MAXITEMS 20
#define MAXSUBITEMS 12
#define MAXMENUWIDTH 17
#define MAXMACROSIZE 20480
#define MAXMACROS 1149
#define MAXFCTTOKENS 183
#define MAXMSGS 24
#define MAXLEARN 200
#define MAXWORD 132
#define MAXSTACK 10
#define MAXLINELEN 9999
#define MAXTABS 32
#define MAXTABTABLES 5
#define MAXMARGIN 255
#define MAXLINES 132
#define MAXLINECHARS 132
#define MAXPRINTABLES 64
#define BLOCKSIZE 256
#define DATASIZE (BLOCKSIZE - 12)
#define NAMELEN 80
/* displayFlag bits */
#define SHOWCURSOR_ 1
#define VSCROLL_ 2
#define HSCROLL_ 4
#define SHOWEOS_ 8
#define PAGE_ 16
#define ALLPAGE 0xfff0
#define MAXSPLITS 8
/* execLearn flag values - DO NOT CHANGE execLearn */
#define EXEC_LEARN 1 /* running learn seq */
#define STOP_EXEC_LEARN 2 /* just finished running learn seq */
#define MAXSUCH 65
/* ------------ in CB buf-header struct, bufPtr->Flags settings --------- */
#define TRUETABS 0x0001
#define AUTOINDENT 0x0002
#define OVERSTRIKE 0x0004
#define AUTOBACKUP 0x0008
#define READONLY 0x0010
#define WORDWRAP 0x0020
#define RIGHTJUSTIFY 0x0040
#define MAPCHARS 0x0080
#define CHANGED 0x0100
#define USERLOCALA 0x0200
#define USERLOCALB 0x0400
#define FAVORITE 0x0800
#define BACKEDUP 0x1000
#define NEEDPACK 0x2000
#define LOCKED 0x4000
#define DELETEIT 0x8000
/* ----------------------- markers used in data blocks ----------------- */
#define EOFILE 0x03
#define EOB 0x02
#define TRACE 0x01 /* to trace region to fill */
struct msgQueue { /* see Amiga ROM Kernal manual */
short Count;
ULONG Class;
USHORT Code;
USHORT Qualifier;
short MouseX,MouseY;
};
struct ST {
long num; /* if buffer stack, buffer pointer stored here */
struct ST *ptr; /* ptr to next item on the stack */
};
struct DB { /* see manual discussion of DB struct */
UCHAR Data[DATASIZE];
UCHAR endOfBlock; /* this must be EOB character */
UCHAR eols; /* #eols this block, 255 if formfeed or unknown */
USHORT BlockNum; /* max buf size = 65535 * 244 = 15.99 megs */
struct DB *LastBlock; /* pts to prev block or CB if is 1st block */
struct DB *NextBlock; /* pts to next block or NULL if last block */
};
struct CB { /* see manual for info on CB struct */
struct DB *Block; /* cursor */
struct DB *SHBlock; /* start hilite */
struct DB *EHBlock; /* end hilite */
struct DB *SIBlock; /* start invert */
struct DB *EIBlock; /* end invert */
struct DB *PBlock; /* start page */
struct DB *EBlock; /* end page */
struct DB *LABlock; /* locA */
struct DB *LBBlock; /* etc */
struct DB *LCBlock;
struct DB *LDBlock;
struct DB *LEBlock;
struct DB *LFBlock;
struct DB *LGBlock;
struct DB *LHBlock;
struct DB *LIBlock;
struct DB *LJBlock;
struct DB *LSPBlock; /* 2nd page beginning if file in 2 windows */
struct DB *LSCBlock; /* 2nd cursor "" */
struct DB *MBlock; /* mouse loc */
UCHAR *Ptr; /* ---- these are pointers into above blocks */
UCHAR *SHPtr;
UCHAR *EHPtr;
UCHAR *SIPtr;
UCHAR *EIPtr;
UCHAR *PPtr;
UCHAR *EPtr;
UCHAR *LAPtr;
UCHAR *LBPtr;
UCHAR *LCPtr;
UCHAR *LDPtr;
UCHAR *LEPtr;
UCHAR *LFPtr;
UCHAR *LGPtr;
UCHAR *LHPtr;
UCHAR *LIPtr;
UCHAR *LJPtr;
UCHAR *LSPPtr;
UCHAR *LSCPtr;
UCHAR *MPtr;
struct DB *NextBlock;
short PageCol;
short BufNum;
ULONG Flags; /* switched with Colors, and used to be USHORT */
USHORT LineLength;
USHORT PageLines;
short tabTable;
short LeftMargin;
short TopMargin;
short BottomMargin;
ULONG Colors; /* switched with Flags, and used to be USHORT */
long reserved1;
long reserved2;
UCHAR FileName[NAMELEN+3]; /* bumped upward */
};
/* order of functions in macroFunc array */
#define abort_ 1
#define not_ 2
#define do_ 3
#define while_ 4
#define if_ 5
#define else_ 6
#define goto_ 7
#define label_ 8
#define nothing_ 9
#define return_ 10
#define returnTrue_ 11
#define returnFalse_ 12
/* **** above functions do not actually exist; the following do **** */
#define mouseDown_ 13
#define trackMouse_ 14
#define updateDisplay_ 15
#define inputWaiting_ 16
#define thisKey_ 17
#define abortSave_ 18
#define restartPrint_ 19
#define reformat_ 20
#define runLearn_ 21
#define fullRefresh_ 22
#define refreshDisplay_ 23
#define abortPrint_ 24
#define gosub_ 26
#define beepDisplay_ 27
#define seeRuler_ 28
#define setRuler_ 29
#define stopSpell_ 32
#define spellerUp_ 33
#define hyperClose_ 34
#define hyperUp_ 35
#define inTiny_ 36
#define screenToBack_ 37
#define screenToFront_ 38
#define newFile_ 39
#define nameBuffer_ 40
#define checkedSubMenu_ 41
#define menu_ 42
#define checkedMenu_ 43
#define subMenu_ 44
#define runKey_ 45
#define gtNum_ 46
#define incNum_ 47
#define decNum_ 48
#define equateNum_ 49
#define eqNum_ 50
#define geNum_ 51
#define and_ 52
#define or_ 53
#define mul_ 54
#define div_ 55
#define add_ 56
#define sub_ 57
#define mod_ 58
#define mouseXY_ 59
#define setRGB_ 60
#define isEmpty_ 61
#define getSplitLines_ 62
#define getChar_ 63
#define onScreen_ 64
#define vScroll_ 65
#define hScroll_ 66
#define insertRgn_ 67
#define setEol_ 68
#define clearRgn_ 69
#define swapBuf_ 70
#define print_ 71
#define loadFile_ 72
#define insertFile_ 73
#define alertUser_ 74
#define askYesNo_ 75
#define saveFile_ 76
#define setFileName_ 77
#define getFileName_ 78
#define flipFlag_ 79
#define getFlag_ 80
#define toggle_ 81
#define toNumber_ 82
#define toWord_ 83
#define toUpper_ 84
#define toLower_ 85
#define setLocal_ 86
#define hexDecimal_ 87
#define fileSize_ 88
#define locToLine_ 89
#define lineToLoc_ 90
#define search_ 91
#define saveLearn_ 92
#define freeBuf_ 93
#define getLocal_ 94
#define is_ 95
#define loadLearn_ 96
#define quit_ 97
#define printerCode_ 98
#define saveConfig_ 99
#define loadConfig_ 100
#define moveCursor_ 101
#define equateLoc_ 102
#define incLoc_ 103
#define decLoc_ 104
#define eqLoc_ 105
#define geLoc_ 106
#define gtLoc_ 107
#define getKey_ 108
#define inputKey_ 109
#define swapKey_ 110
#define killKey_ 111
#define delay_ 112
#define editBuf_ 113
#define putMsg_ 114
#define inputString_ 115
#define inputNum_ 116
#define insertChar_ 117
#define copyChar_ 118
#define clearChar_ 119
#define swapChar_ 120
#define teachOne_ 121
#define execute_ 122
#define speak_ 123
#define copyColData_ 124
#define clearColData_ 125
#define gadgetName_ 126
#define typeChar_ 127
#define changeDir_ 128
#define inUse_ 129
#define setMaxFiles_ 130
#define getMaxFiles_ 131
#define getSerialNum_ 132
#define getColors_ 133
#define locToIndex_ 134
#define indexToLoc_ 135
#define locToCol_ 136
#define colToLoc_ 137
#define splitWindow_ 138
#define getTabs_ 139
#define getPageRowCol_ 140
#define gotoPage_ 141
#define getKeyVal_ 142
#define spell_ 143
#define startSpell_ 144
#define stringComp_ 145
#define rexxIn_ 146
#define rexxOut_ 147
#define loadKeys_ 148
#define saveKeys_ 149
#define push_ 150
#define pop_ 151
#define getBufAddr_ 152
#define getStackSize_ 153
#define rollStack_ 154
#define setSearch_ 155
#define attachBuf_ 156
#define detachBuf_ 157
#define copyKey_ 158
#define gotoSplit_ 159
#define getSearch_ 160
#define fileRequest_ 161
#define peek_ 162
#define poke_ 163
#define getAddress_ 164
#define upFlag_ 165
#define downFlag_ 166
#define switch_ 167
#define case_ 168
#define default_ 169
#define text_ 170
#define swapLoc_ 171
#define grep_ 172
#define setGrep_ 173
#define getGrep_ 174
#define setColors_ 175
#define hyperOpen_ 176
#define hyper_ 177
#define saveState_ 178
#define loadState_ 179
#define setTaskPri_ 180
#define draw_ 181
#define setFont_ 182
#define sortLines_ 183
#define compile_ 184
#define compileDefaults_ 185
#define getFont_ 186
#define stackBuf_ 187
#define compareBuf_ 188
#define define_ 189
#define clearBuf_ 190
#define tabsToSpaces_ 191
#define spacesToTabs_ 192
#define getRGB_ 193
#define xor_ 194
#define fold_ 195
#define setFold_ 196
#define getFold_ 197
***** Examples *****
<normal-esc: .. display depth (# bitplanes)
getAddress(9,n0)
peek(n0,n1,2) putMsg(n1) >
<normal-buttonUp: .. display mouseY
getAddress(2,n0)
peek(n0,n1,2) putMsg(n1) >
<normal-esc: .. display maxLineChars
getAddress(10,n0)
peek(n0,n1,2) putMsg(n1) >
<normal-esc: .. display charHeight in pixels
getAddress(11,n0)
peek(n0,n1,2) putMsg(n1) >
<normal-esc: .. show warpUp flag
getAddress(26,n0)
peek(n0,n1,2) putMsg(n1) >
<normal-esc: .. show curMsgIn index value
getAddress(35,n0)
peek(n0,n1,2) putMsg(n1) >
<normal-esc: .. show ExecLearn flag
getAddress(27,n0)
peek(n0,n1,2) putMsg(n1) >
<normal-esc: .. show horPixels
getAddress(14,n0)
peek(n0,n1,2) putMsg(n1) >
<normal-esc: .. show vertPixels
getAddress(13,n0)
peek(n0,n1,2) putMsg(n1) >
<normal-esc: .. show maxLines
getAddress(15,n0)
peek(n0,n1,2) putMsg(n1) >
<normal-esc: .. show vertical pixel boundaries of text area
getAddress(62,n0) .. get lineHeight[0] address
peek(n0,n1,2) .. get lineHeight[0] (pixel) value
putMsg(n1) .. pixels at bottom of msg line
delay(10)
getAddress(15,n10) .. get maxLines address
peek(n10,n11,2) .. get maxLines value
mul(n11,n11,2) .. calculate lineHeight[maxLines] address offset
add(n10,n0,n11) .. add to lineHeight[0]'s address
peek(n10,n11,2) .. lineHeight[maxLines]
putMsg(n11) >
<normal-buttonDown: .. mouse scrolling cmd that shows lines per pass
moveCursor(curFile,mouseLoc)
updateDisplay
mouseXY(n0,n1)
equateNum(n4,n1)
if (not mouseDown) return
while (not inputWaiting) {
trackMouse
mouseXY(n2,n3)
sub(n3,n3,n1)
div(n3,n3,5)
vscroll(n3)
getAddress(16,n9) peek(n9,n10,2) putMsg(n10) .. vscrollamt
updateDisplay
}
>
<normal-esc: .. set toTiny flag
getAddress(23,n0)
poke(n0,1,2) putMsg(n1) >
<normal-esc: .. change current eol to Carriage Return (NOT recommended)
getAddress(0,n0)
poke(n0,13,1) >