****************************************************************
*                                                              *
*                        AmigaCOMAL                            *
*              assembler package include file                  *
*                     version 04.01.89                         *
*                                                              *
****************************************************************

; Type attributes
GLOBALBIT:     EQU    14           ; Global variable
EXTERNALBIT:   EQU    13           ; EXTERNAL function/procedure
CLOSEDBIT:     EQU    12           ; CLOSED function/procedure
IMPORTBIT:     EQU    11           ; Imported (package)
POINTERBIT:    EQU     8           ; Pointer variable

; Types of variables
strg:          EQU     0           ; Simple string
flt:           EQU     1           ; Simple float
longint:       EQU     2           ; Simple long integer
shortint:      EQU     3           ; Simple short integer
byteint:       EQU     4           ; Simple byte integer
record:        EQU     5           ; Simple record
strgarray:     EQU     8           ; String array
fltarray:      EQU     9           ; Float array
longarray:     EQU    10           ; Long integer array
shortarray:    EQU    11           ; Short integer array
bytearray:     EQU    12           ; Byte integer array
recarray:      EQU    13           ; Record array
strguser:      EQU    16           ; String user FUNCtion
fltuser:       EQU    17           ; Float user FUNCtion
longuser:      EQU    18           ; Long integer user FUNCtion
shortuser:     EQU    19           ; Short integer user FUNCtion
byteuser:      EQU    20           ; Byte integer user FUNCtion
strgcode:      EQU    24           ; String code function
fltcode:       EQU    25           ; Float code function
longcode:      EQU    26           ; Long integer code function
shortcode:     EQU    27           ; Short integer code function
bytecode:      EQU    28           ; Byte integer code function
userproc:      EQU   128           ; User PROCedure
codeproc:      EQU   129           ; Code procedure

; Types of formal parameters
strgval:       EQU     $001F       ; String value
fltval:        EQU     $002F       ; Float value
longval:       EQU     $012F       ; Long integer value
shortval:      EQU     $022F       ; Short integer value
byteval:       EQU     $032F       ; Byte integer value
recval:        EQU     $0042       ; Record value
strgref:       EQU     $8012       ; String REF
fltref:        EQU     $8022       ; Float REF
longref:       EQU     $8122       ; Long integer REF
shortref:      EQU     $8222       ; Short integer REF
byteref:       EQU     $8322       ; Byte integer REF
recref:        EQU     $8042       ; Record REF
procref:       EQU     $8022       ; Procedure REF
 
; Routine offsets
;
TestBreak:      EQU    -198
CmlWait:        EQU    -192
CallUser:       EQU    -186
AddCmlDev:      EQU    -180
RemCmlDev:      EQU    -174
NUMNEG:         EQU    -168
TSTSGN:         EQU    -162
AddExcept:      EQU    -156
RemExcept:      EQU    -150
GETCUR:         EQU    -144
SETCUR:         EQU    -138
KBDIN:          EQU    -132
CONIN:          EQU    -126
CONOUT:         EQU    -120
NUMINT:         EQU    -114
NUMATN:         EQU    -108
NUMASN:         EQU    -102
NUMACS:         EQU     -96
NUMTAN:         EQU     -90
NUMCOS:         EQU     -84
NUMSIN:         EQU     -78
NUMPWR:         EQU     -72
NUMLOG:         EQU     -66
NUMEXP:         EQU     -60
NUMSQR:         EQU     -54
INT2FP:         EQU     -48
FP2INT:         EQU     -42
NUMCMP:         EQU     -36
NUMDIV:         EQU     -30
NUMMUL:         EQU     -24
NUMSUB:         EQU     -18
NUMADD:         EQU     -12
CMLRET:         EQU      -6

; Offsets in COMAL structure
;
SP_top:        EQU       0     ; Stack top
SP_bot:        EQU       4     ; Stack bottom
PckLink:       EQU       8     ; Pointer to 1. package
TaskIdOff:     EQU      12     ; Task pointer
DosBaseOff:    EQU      16     ; Dos Base
IntBaseOff:    EQU      20     ; Intuition base
GraBaseOff:    EQU      24     ; Graphics base
LayBaseOff:    EQU      28     ; Layers base
DfBaseOff:     EQU      32     ; Diskfont base
IconBaseOff:   EQU      36     ; Icon base
EventFlgOff:   EQU      40     ; Event flags
EventCntOff:   EQU      41     ; Counter for unprocessed events
ComWinSigOff:  EQU      42     ; IDCMP-signal for command window
ComKbdSigOff:  EQU      43     ; Keyboard signal for cammand window
ExcWinSigOff:  EQU      44     ; IDCMP-signal for execute window
ExcKbdSigOff:  EQU      45     ; Keyboard signal for execute window
SerialSigOff:  EQU      46     ; Serial port signal
TimerSigOff:   EQU      47     ; Timer port signal
Res1Off:       EQU      48     ; Reserved for future use
Res2Off:       EQU      52     ; Reserved for future use
ComalHdOff:    EQU      56     ; Pointer to active window str
CommHdOff:     EQU      60     ; Reserved for EditHd
ExecHdOff:     EQU      64     ; Reserved for ExecHd

; Event flag bits
EscapeFlag:    EQU       6     ; Break key pressed
MasterEscFlg:  EQU       5     ; Quit program
GenerelKey:    EQU       4     ; Key in buffer
PckExceptFlg:  EQU       3     ; Call exception routine(s)

; Offsets in package structure
;
PckName:       EQU       4     ; Pointer to package name
PckType:       EQU       8     ; Package type
PckPrior:      EQU       9     ; Proirity of package
PckFlag:       EQU      10     ; Flags
PckTopId:      EQU      12     ; Pointer to address of 1. id
PckSignal:     EQU      16     ; Address of signal routine
PckCmlStr:     EQU      20     ; Address of Comal structure
PckConOut:     EQU      24     ; Address of ConOut routine
PckConIn:      EQU      28     ; Address of ConIn routine
PckKbdIn:      EQU      32     ; Address of Keybord in routinr
PckSetCur:     EQU      36     ; Address of SetCursor routine
PckGetCur:     EQU      40     ; Address of GetCursor routine
PckErrOut:     EQU      44     ; Address of Error Output routine
PckErrTxt:     EQU      48     ; Address of Error Text routine
PckExcept:     EQU      52     ; Address of exception routine
PckUser:       EQU      64     ; Offset to user defined pointer

; Package flag bits
PckConOutBit:  EQU       0
PckConInBit:   EQU       1
PckKbdInBit:   EQU       2
PckExclBit:    EQU       3     ; Flag for exclusive KbdIn
PckSetCurBit:  EQU       4
PckGetCurBit:  EQU       5
PckErrOutBit:  EQU       6
PckErrTxtBit:  EQU       7
PckExceptBit:  EQU      15
