P*      
* Keyword list: List of first three characters of keywords
* and the address (lo, hi) of their handling routine.
*
* This list must be in alphabetical order to work
* correctly.
*
NUMWORDS DFB 41           ;Number of valid keywords
KEYWORD  
         TXT 'bad'        ;Byte add
         DA BADD
         TXT 'ban'        ;Byte AND
         DA BAND
         TXT 'bde'        ;Byte DEC
         DA BDEC
         TXT 'beo'        ;Byte EOR
         DA BEOR
         TXT 'bin'        ;Byte INC
         DA BINC
         TXT 'bmo'        ;Byte move
         DA BMOVE         ;Define Address
         TXT 'bor'        ;Byte OR
         DA BOR
         TXT 'bsu'        ;Byte subtract
         DA BSUB
         TXT 'bte'        ;Byte test
         DA BTEST
         TXT 'com'        ;Comment
         DA COMMENT
         TXT 'dat'        ;Data label
         DA DATA
         TXT 'del'        ;Delay
         DA DELAY
         TXT 'don'        ;All done
         DA DONE
         TXT 'els'        ;Else
         DA ELSE
         TXT 'emb'        ;Embed
         DA EMBED
         TXT 'ent'        ;Entry point
         DA ENTRY
         TXT 'for'        ;Forver
         DA FOREVER
         TXT 'get'        ;Get current pointer
         DA GET
         TXT 'ilo'        ;Instrument load
         DA ILOAD
         TXT 'loo'        ;Loop
         DA LOOP
         TXT 'lwh'        ;Long when
         DA LONGWHEN
         TXT 'set'        ;Set current pointer
         DA SET
         TXT 'unt'        ;Until
         DA UNTIL
         TXT 'v1g'        ;Voice 1 get pointer
         DA V1GET
         TXT 'v2g'
         DA V2GET
         TXT 'v3g'
         DA V3GET
         TXT 'v1s'        ;Voice 1 set pointer
         DA V1SET
         TXT 'v2s'
         DA V2SET
         TXT 'v3s'
         DA V3SET
         TXT 'wad'        ;Wendell?
         DA WADD
         TXT 'wai'        ;Wait
         DA WAIT
         TXT 'wan'        ;Word and
         DA WAND
         TXT 'wde'        ;Word DEC
         DA WDEC
         TXT 'wen'        ;End When
         DA WEND
         TXT 'weo'        ;Ed Olmstead?
         DA WEOR
         TXT 'whe'        ;When
         DA WHEN
         TXT 'win'        ;Word INC
         DA WINC
         TXT 'wmo'        ;Word move (2-bytes)
         DA WMOVE
         TXT 'wor'        ;Word OR
         DA WOR
         TXT 'wsu'        ;Word sub
         DA WSUB
         TXT 'wte'        ;Word test
         DA WTEST

*
* Variable list, in alphabetical order.
*
* Each name is terminated by a 00 byte, followed by
* two addresses.  The second is the base location
* of the variable, the first is an index into that
* base (for instance, the voice number).
*
NUMVARS  DFB 19           ;Number of valid variables
VARTAB   
         TXT 'atdk'       ;Attack/decay current voice
         DFB 00
         DA COFFSET
         DA SHADOW+5

         TXT 'coffset'    ;SID offset (0 7 14) for
         DFB 0            ;current voice
         DA 00
         DA COFFSET

         TXT 'creg'       ;Control register, current voice
         DFB 00
         DA COFFSET
         DA SHADOW+4

         TXT 'curfield'   ;Current field = 0,1,2,3,...
         DFB 00
         DA 00
         DA CURFIELD

         TXT 'curvoice'   ;Current voice = 1,2,3
         DFB 00
         DA 00
         DA CURVOICE

         TXT 'data'       ;User label
         DFB 00
         DA $FFFF
         DA DATALO        ;Not actually used

         TXT 'dur'        ;Remaining duration
         DFB 00
         DA CURFIELD
         DA DURATION-1    ;field 0 = global

         TXT 'fhitab',00
         DA 0
         DA FREQHI

         TXT 'flotab',00
         DA 00
         DA FREQLO

         TXT 'freq'       ;Frequency reg of current voice
         DFB 00
         DA COFFSET       ;X offset
         DA SHADOW        ;Location of variable

         TXT 'inst'
         DFB 00
         DA CURFIELD
         DA CURINST-1

         TXT 'note'       ;Last note read in for voice
         DFB 00
         DA CURVOICE
         DA LASTNOTE-1

         TXT 'pwidth'     ;Pulse width, current voice
         DFB 00
         DA COFFSET
         DA SHADOW+2

         TXT 'shadow'     ;Shadow SID
         DFB 00
         DA 0             ;No index
         DA SHADOW

         TXT 'sid'        ;Real SID
         DFB 00
         DA 00
         DA $D400

         TXT 'surel'      ;Sustain/release, current voice
         DFB 00
         DA COFFSET
         DA SHADOW+6

         TXT 'v1stop'     ;Voice 1 stop/start
         DFB 00
         DA 00
         DA V1STOP

         TXT 'v2stop'     ;Voice 2 stop/start
         DFB 00
         DA 00
         DA V2STOP

         TXT 'v3stop'     ;Voice 3 stop/start
         DFB 00
         DA 00
         DA V3STOP

*
* Error list: addresses and text
*
ERRLIST  DA 00            ;No error #0
         DA :ERR2
         DA :ERR4
         DA :ERR6
         DA :ERR8
         DA :ERR10
         DA :ERR12
         DA :ERR14
         DA :ERR16
         DA :ERR18
         DA :ERR20
         DA :ERR22
         DA :ERR24
         DA :ERR26
         DA :ERR28
         DA :ERR30
         DA :ERR32
         DA :ERR34
         DA :ERR36
         DA :ERR38

:ERR2    TXT 'what the heck is that?! error'
         DFB 00
:ERR4    TXT 'bad argument'
         DFB 00
:ERR6    TXT 'indexed mode not allowed'
         DFB 00
:ERR8    TXT 'wacky index'
         DFB 00
:ERR10   TXT 'funky number'
         DFB 00
:ERR12   TXT 'i am totally confused error'
         DFB 00
:ERR14   TXT 'where'
         DFB 39           ;single quote
         TXT 's the rest of the line?'
         DFB 00
:ERR16   TXT 'illegal dest'
         DFB 00
:ERR18   TXT 'queue hosed'
         DFB 00
:ERR20   TXT 'stack blown'
         DFB 00
:ERR22   TXT 'bad source'
         DFB 00
:ERR24   TXT 'i told you to use *bytes*!'
         DFB 00
:ERR26   TXT 'loop/when tangle'
         DFB 00
:ERR28   TXT 'nowhere to loop!'
         DFB 00
:ERR30   TXT 'unclosed loop or when/else'
         DFB 00
:ERR32   TXT 'missing when'
         DFB 00
:ERR34   TXT 'branch too large -- use lwhen'
         DFB 00
:ERR36   TXT 'thine arg floweth over'
         DFB 00
:ERR38   TXT 'thine arg floweth under'
         DFB 00
