Z88 Developers' Notes
Previous Contents Next

29. Operating System Manifests

The following definitions have been arranged using the standard definition files included with the Z88 Assembler Workbench. Most of the files were originally created from the V2.00 release of the Developer's Notes and arranged into a logical combination of the various topics the system calls define. The files have been alphabeticaly merged and the layout slightly changed for a more visual appearance of this section which gives a good overview of related calls and their corresponding call values.



alarm.def

; Alarm manipulation:

    DEFC GN_Aab  = $6809          ; Allocate alarm block
    DEFC GN_Fab  = $6A09          ; Free alarm block
    DEFC GN_Lab  = $6C09          ; Link alarm block in chain
    DEFC GN_Uab  = $6E09          ; Unlink alarm block
    DEFC GN_Alp  = $7009          ; Process an expired alarm (OZ usage)

; Low level alarm call definitions:
    DEFC OS_Alm  = $81            ; Alarm manipulation (OZ usage)
    ; arguments:
        DEFC AH_SUSP = $01        ; suspend alarm
        DEFC AH_REV  = $02        ; revive alarms
        DEFC AH_RES  = $03        ; reset alarm enable state
        DEFC AH_SINC = $04        ; display symbol
        DEFC AH_SDEC = $05        ; remove symbol (subject to use count)
        DEFC AH_SRES = $06        ; reset symbol
        DEFC AH_SET  = $07        ; Set a new alarm:
        DEFC AH_CNC  = $08        ; Cancel an alarm:
        DEFC AH_DG1  = $09        ; Ding-dong type 1
        DEFC AH_DG2  = $0A        ; Ding-dong type 2
        DEFC AH_AINC = $0B        ; action count increment
        DEFC AH_ADEC = $0C        ; action count decrement
        DEFC AH_ARES = $0D        ; action count reset
______________________________________________________________________________
bastoken.def

; BBC BASIC (Z80) tokens:

	DEFC	BAS_AND 	 = 128
	DEFC	BAS_DIV		 = 129
	DEFC	BAS_EOR		 = 130
	DEFC	BAS_MOD		 = 131
	DEFC	BAS_OR		 = 132
	DEFC	BAS_ERROR	 = 133
	DEFC	BAS_LINE	 = 134
	DEFC	BAS_OFF		 = 135
	DEFC	BAS_STEP	 = 136
	DEFC	BAS_SPC		 = 137
	DEFC	BAS_TAB		 = 138		;TAB(
	DEFC	BAS_ELSE	 = 139
	DEFC	BAS_THEN	 = 140

	DEFC	BAS_OPENIN	 = 142
	DEFC	BAS_PTR_G	 = 143		;Used to Get pseudo variable value
	DEFC	BAS_PAGE_G	 = 144		;Used to Get pseudo variable value
	DEFC	BAS_TIME_G	 = 145		;Used to Get pseudo variable value
	DEFC	BAS_LOMEM_G	 = 146		;Used to Get pseudo variable value
	DEFC	BAS_HIMEM_G	 = 147		;Used to Get pseudo variable value
	DEFC	BAS_ABS		 = 148
	DEFC	BAS_ACS		 = 149
	DEFC	BAS_ADVAL	 = 150
	DEFC	BAS_ASC		 = 151
	DEFC	BAS_ASN		 = 152
	DEFC	BAS_ATN		 = 153
	DEFC	BAS_BGET	 = 154
	DEFC	BAS_COS		 = 155
	DEFC	BAS_COUNT	 = 156
	DEFC	BAS_DEG		 = 157
	DEFC	BAS_ERL		 = 158
	DEFC	BAS_ERR		 = 159
	DEFC	BAS_EVAL	 = 160
	DEFC	BAS_EXP		 = 161
	DEFC	BAS_EXT		 = 162
	DEFC	BAS_FALSE	 = 163
	DEFC	BAS_FN		 = 164
	DEFC	BAS_GET		 = 165
	DEFC	BAS_INKEY	 = 166
	DEFC	BAS_INSTR	 = 167		;INSTR(
	DEFC	BAS_INT		 = 168
	DEFC	BAS_LEN		 = 169
	DEFC	BAS_LN		 = 170
	DEFC	BAS_LOG		 = 171
	DEFC	BAS_NOT		 = 172
	DEFC	BAS_OPENUP	 = 173
	DEFC	BAS_OPENOUT	 = 174
	DEFC	BAS_PI		 = 175
	DEFC	BAS_POINT	 = 176		;POINT(
	DEFC	BAS_POS		 = 177
	DEFC	BAS_RAD		 = 178
	DEFC	BAS_RND		 = 179
	DEFC	BAS_SNG		 = 180
	DEFC	BAS_SIN		 = 181
	DEFC	BAS_SQR		 = 182
	DEFC	BAS_TAN		 = 183
	DEFC	BAS_TO		 = 184
	DEFC	BAS_TRUE	 = 185
	DEFC	BAS_USR		 = 186
	DEFC	BAS_VAL		 = 187
	DEFC	BAS_VPOS	 = 188
	DEFC	BAS_CHR		 = 189		;CHR$
	DEFC	BAS_GET_STR	 = 190		;GET$
	DEFC	BAS_INKEY_STR	 = 191		;INKEY$
	DEFC	BAS_LEFT	 = 192		;LEFT$(
	DEFC	BAS_MID		 = 193		;MID$(
	DEFC	BAS_RIGHT	 = 194		;RIGHT$(
	DEFC	BAS_STR		 = 195		;STR$
	DEFC	BAS_STRING	 = 196		;STRING$(
	DEFC	BAS_EOF		 = 197
	DEFC	BAS_AUTO	 = 198
	DEFC	BAS_DELETE	 = 199
	DEFC	BAS_LOAD	 = 200
	DEFC	BAS_LIST	 = 201
	DEFC	BAS_NEW		 = 202
	DEFC	BAS_OLD		 = 203
	DEFC	BAS_RENUMBER	 = 204
	DEFC	BAS_SAVE	 = 205
	DEFC	BAS_PUT		 = 206
	DEFC	BAS_PTR_P	 = 207		;Used to Put pseudo variable value
	DEFC	BAS_PAGE_P	 = 208		;Used to Put pseudo variable value
	DEFC	BAS_TIME_P	 = 209		;Used to Put pseudo variable value
	DEFC	BAS_LOMEM_P	 = 210		;Used to Put pseudo variable value
	DEFC	BAS_HIMEM_P	 = 211		;Used to Put pseudo variable value
	DEFC	BAS_SOUND	 = 212
	DEFC	BAS_BPUT	 = 213
	DEFC	BAS_CALL	 = 214
	DEFC	BAS_CHAIN	 = 215
	DEFC	BAS_CLEAR	 = 216
	DEFC	BAS_CLOSE	 = 217
	DEFC	BAS_CLG		 = 218
	DEFC	BAS_CLS		 = 219
	DEFC	BAS_DATA	 = 220
	DEFC	BAS_DEF		 = 221
	DEFC	BAS_DIM		 = 222
	DEFC	BAS_DRAW	 = 223
	DEFC	BAS_END		 = 224
	DEFC	BAS_ENDPROC	 = 225
	DEFC	BAS_ENVELOPE	 = 226
	DEFC	BAS_FOR		 = 227
	DEFC	BAS_GOSUB	 = 228
	DEFC	BAS_GOTO	 = 229
	DEFC	BAS_GCOL	 = 230
	DEFC	BAS_IF		 = 231
	DEFC	BAS_INPUT	 = 232
	DEFC	BAS_LET		 = 233
	DEFC	BAS_LOCAL	 = 234
	DEFC	BAS_MODE	 = 235
	DEFC	BAS_MOVE	 = 236
	DEFC	BAS_NEXT	 = 237
	DEFC	BAS_ON		 = 238
	DEFC	BAS_VDU		 = 239
	DEFC	BAS_PLOT	 = 240
	DEFC	BAS_PRINT	 = 241
	DEFC	BAS_PROC	 = 242
	DEFC	BAS_READ	 = 243
	DEFC	BAS_REM		 = 244
	DEFC	BAS_REPEAT	 = 245
	DEFC	BAS_REPORT	 = 246
	DEFC	BAS_RESTORE	 = 247
	DEFC	BAS_RETURN	 = 248
	DEFC	BAS_RUN		 = 249
	DEFC	BAS_STOP	 = 250
	DEFC	BAS_COLOUR	 = 251
	DEFC	BAS_TRACE	 = 252
	DEFC	BAS_UNTIL	 = 253
	DEFC	BAS_WIDTH	 = 254
	DEFC	BAS_OSCLI	 = 255

______________________________________________________________________________
char.def

; Character management:

    DEFC GN_Cls  = $6209          ; Classify a character
    DEFC GN_Skc  = $3209          ; Bypass a character in a sequense
    DEFC GN_Skd  = $3409          ; Bypass delimiters in a sequense
    DEFC GN_Skt  = $3609          ; Search for character in a sequense
______________________________________________________________________________
ctrlchar.def

; ASCII control characters:

    DEFC  NUL  =  0
    DEFC  SOH  =  1
    DEFC  STX  =  2
    DEFC  ETX  =  3
    DEFC  EOT  =  4
    DEFC  ENQ  =  5
    DEFC  ACK  =  6
    DEFC  BEL  =  7
    DEFC  BS   =  8
    DEFC  HT   =  9
    DEFC  LF   =  10
    DEFC  VT   =  11
    DEFC  FF   =  12
    DEFC  CR   =  13
    DEFC  SO   =  14
    DEFC  SI   =  15
    DEFC  DLE  =  16
    DEFC  DC1  =  17
    DEFC  DC2  =  18
    DEFC  DC3  =  19
    DEFC  DC4  =  20
    DEFC  NAK  =  21
    DEFC  SYN  =  22
    DEFC  ETB  =  23
    DEFC  CAN  =  24
    DEFC  EM   =  25
    DEFC  SUB  =  26
    DEFC  ESC  =  27
    DEFC  FS   =  28
    DEFC  GS   =  29
    DEFC  RS   =  30
    DEFC  US   =  31
    DEFC  DEL  =  127

    DEFC  XON  =  17
    DEFC  XOFF =  19

______________________________________________________________________________
director.def

; Director/CLI low level access:

    DEFC DC_Alt = $1A0C           ; Pass an alternative character
    DEFC DC_Bye = $080C           ; Exiting current application (internal)
    DEFC DC_Ent = $0A0C           ; Enter new application (internal)
    DEFC DC_Gen = $200C           ; Screen driver call (internal)
    DEFC DC_Icl = $140C           ; Invoke new CLI
    DEFC DC_In  = $0E0C           ; Read from CLI (internal)
    DEFC DC_Ini = $060E           ; Initialize the Director (internal)
    DEFC DC_nam = $0C0C           ; Name current application
    DEFC DC_Nq  = $160C           ; Handle Director/CLI enquiries (internal)
    DEFC DC_Out = $100C           ; Write to CLI (internal)
    DEFC DC_Pol = $220C           ; Poll for card usage (internal)
    DEFC DC_Prt = $120C           ; Print to CLI (internal)

    DEFC DC_Rbd = $1C0C           ; Rebind streams
    ; arguments:
         DEFC RB_IN = $00         ; input stream - new source of input
         DEFC RB_OUT = $01        ; output stream - new destination for output
         DEFC RB_PRT = $02        ; printer stream - new destination for output
         DEFC RB_INT = $03        ; input stream T - copy of input
         DEFC RB_OPT = $04        ; output stream T - copy of output
         DEFC RB_PTT = $05        ; printer stream T -  copy of output
    DEFC DC_Scn = $240C           ; Scan for card usage (internal)
    DEFC DC_Sp  = $180C           ; Handle Director/CLI settings (internal)
    DEFC DC_Xin = $1E0C           ; Examine CLI input (internal)
    DEFC OS_Use = $EE06           ; Fetch information about process card usage
    DEFC OS_Bye = $21             ; Application exit.
    DEFC OS_Exit= $F606           ; Quit process (internal)
    DEFC OS_Ent = $FA06           ; Enter an application (internal)
    DEFC OS_Cli = $84             ; CLI interface (internal)
    ; arguments:
         DEFC CL_RIM = $01        ; get raw input
         DEFC CL_MBC = $02        ; meta/base to character conversion
         DEFC CL_CMB = $03        ; character to meta/base conversion
         DEFC CL_INC = $04        ; increment CLI use count
         DEFC CL_DEC = $05        ; decrement CLI use count
         DEFC CL_RES = $06        ; reset CLI use count
         DEFC CL_ACK = $07        ; acknowledge CLI/Escape
         DEFC CLM_SH = $01        ; SHIFT key (bit) mask
         DEFC CLM_CT = $02        ; DIAMOND (bit) mask
    DEFC OS_Dom = $FE06           ; Open director memory (internal)
    DEFC OS_Poll= $FC06           ; Poll for an application (internal)
    DEFC OS_Stk = $F806           ; Stack file current process (internal)
    DEFC OS_Wait= $7E             ; Wait for event (internal)
    ; arguments:
         DEFC WT_ANY = $FF        ; infinite

    DEFC OS_Fth = $DE06           ; Free tri-handle (internal)
    DEFC OS_Gth = $E206           ; Allocate tri-handle (internal)
    DEFC OS_Vth = $E006           ; Verify tri-handle (internal)
    ; arguments for all three handle calls:
         DEFC TH_FILT = $F0       ; verify filter handle
         DEFC TH_WMG  = $F1       ; verify wildcard manager handle
         DEFC TH_ALM  = $F2       ; verify alarm handle

; Application Type manifests 1 (type byte1 in Application DOR):
    DEFC AT_Good = 1    ; (BIT 0) well behaved
    DEFC AT_Bad  = 2    ; (BIT 1) not well behaved, not killed on pre-emption
    DEFC AT_Ugly = 4    ; (BIT 2) not well behaved, killed on pre-emption
    DEFC AT_Popd = 8    ; (BIT 3) popdown (if not set then an application)
    DEFC AT_Ones = 16   ; (BIT 4) only one application instance allowed
    DEFC AT_Draw = 32   ; (BIT 5) OZ to redraw screen is possible (2K file)
    DEFC AT_Film = 64   ; (BIT 6) File Manager Application (internal usage)
    DEFC AT_Boot = 128  ; (BIT 7) Application Auto Boot (after soft reset)

; Application Type manifests 2 (type byte2 in Application DOR):
; (Bits 3 - 6 are ignored - should be reset)

    DEFC AT2_Cl  = 1    ; (BIT 0) Set Caps Lock on creation entry
    DEFC AT2_Icl = 2    ; (BIT 1) Set 'inverted' Caps Lock on creation entry
    DEFC AT2_Ie  = 128  ; (BIT 7) Ignore error returns (should be avoided).
_______________________________________________________________________________
dor.def

; DOR interface:

    DEFC OS_Dor = $87             ; DOR interface

    ; DOR codes when using OS_Dor :
         DEFC DR_Get    = $01     ; Get handle for a DOR name (internal use)
         DEFC DR_Dup    = $02     ; Duplicate DOR
         DEFC DR_Sib    = $03     ; Return brother DOR
         DEFC DR_Son    = $04     ; Return child DOR
         DEFC DR_Fre    = $05     ; Free (release) DOR handle
         DEFC DR_Cre    = $06     ; Create blank DOR
         DEFC DR_Del    = $07     ; Delete DOR
         DEFC DR_Ins    = $08     ; Insert DOR
         DEFC DR_Rd     = $09     ; Read DOR record
         DEFC DR_Wr     = $0A     ; Write DOR record
    ; Major DOR types:
         DEFC Dm_Dev    = $81     ; File Device
         DEFC Dm_Chd    = $82     ; Character Device
         DEFC Dm_Rom    = $83     ; ROM information
    ; Minor DOR types:
         DEFC Dn_Fil    = $11     ; File type
         DEFC Dn_Dir    = $12     ; Directory type
         DEFC Dn_Apl    = $13     ; Application front DOR type,
         DEFC Dn_Del    = $7F     ; Deleted Entry type.
    ; Record DOR types:
         DEFC Dt_Nam    = $4E     ; filename
         DEFC Dt_Cre    = $43     ; creation time
         DEFC Dt_Upd    = $55     ; update time
         DEFC Dt_Ext    = $58     ; Extent (length of file)
         DEFC Dt_Atr    = $41     ; Not currently used
         DEFC Dt_Hlp    = $48     ; Help type
         DEFC Dt_Inf    = $40     ; Information
______________________________________________________________________________
error.def

; Error return codes:
; Codes marked with * are fatal errors

    DEFC RC_OK     = $00
    DEFC RC_Esc    = $01          ; Escape condition (e.g. ESC pressed)
    DEFC RC_Time   = $02          ; Timeout
    DEFC RC_Unk    = $03          ; Unknown request (parameter in register) *
    DEFC RC_Bad    = $04          ; Bad arguments *
    DEFC RC_Ms     = $05          ; Bad memory segment specifier *
    DEFC RC_Na     = $06          ; Not available  *
    DEFC RC_Room   = $07          ; No room
    DEFC RC_Hand   = $08          ; Bad handle  *
    DEFC RC_Eof    = $09          ; End Of File   (also returned by DOR calls)
    DEFC RC_Flf    = $0A          ; Filter Full
    DEFC RC_Ovf    = $0B          ; Overflow
    DEFC RC_Sntx   = $0C          ; Syntax Error
    DEFC RC_Wrap   = $0D          ; Wrap condition met
    DEFC RC_Push   = $0E          ; Pushback error, cannot satisfy request
    DEFC RC_Err    = $0F          ; Internal Error   *
    DEFC RC_Type   = $10          ; Unexpected type  *
    DEFC RC_Pre    = $11          ; Cannot pre-empt, or No Room
    DEFC RC_Onf    = $12          ; Object (file or directory) not found
    DEFC RC_Rp     = $13          ; Read protected
    DEFC RC_Wp     = $14          ; Write protected
    DEFC RC_Use    = $15          ; In Use
    DEFC RC_Fail   = $16          ; General Failure, cannot satisfy request
    DEFC RC_Ivf    = $17          ; Invalid filename
    DEFC RC_Ftm    = $18          ; File Type Mismatch
    DEFC RC_Exis   = $19          ; File already exist
    DEFC RC_Addr   = $32          ; Bad address  *
    DEFC RC_Size   = $33          ; Bad size  *
    DEFC RC_Bank   = $34          ; Bad bank  *
    DEFC RC_Frm    = $35          ; Frame error  *
    DEFC RC_Par    = $36          ; Parity error
    DEFC RC_Dvz    = $46          ; Division by zero
    DEFC RC_Tbg    = $47          ; Too big
    DEFC RC_Nvr    = $48          ; Negative root
    DEFC RC_Lgr    = $49          ; Log range
    DEFC RC_Acl    = $4A          ; Accuracy lost
    DEFC RC_Exr    = $4B          ; Exponent function range
    DEFC RC_Bdn    = $4C          ; Bad number
    DEFC RC_Draw   = $66          ; Application pre-empted and screen corrupted
    DEFC RC_Quit   = $67          ; Request application to quit  *
    DEFC RC_Susp   = $69          ; Suspicion of pre-emption
; Related operating system calls and parameters:
    DEFC OS_Esc  = $6F            ; Examine special condition
                                  ; parameters in A:
         DEFC SC_BIT = $00        ; Test for Escape
         DEFC SC_ACK = $01        ; Acknowledge escape and flush input buffer
         DEFC SC_SET = $02        ; Set Escape (simulate an Escape condition)
         DEFC SC_RES = $03        ; Reset Escape without flushing input buffer
         DEFC SC_TST = $04        ; Test if Escape Detect. is Enabled/Disabled
         DEFC SC_ENA = $05        ; Enable Escape Detection
         DEFC SC_DIS = $06        ; Disable Escape Detection
    DEFC OS_Erh = $75             ; Set (install) Error Handler
    DEFC OS_Erc = $72             ; Get error context (internal)
    DEFC GN_Err = $4A09           ; Display an interactive error box
    DEFC GN_Esp = $4C09           ; Return pointer to a system error message
_______________________________________________________________________________
fileio.def

; File open system call:

    DEFC  GN_Opf = $6009          ; open file/stream (or device)
    DEFC  OS_Op  = $EA06          ; internal open

    ; Parameters used with GN_Opf (in A register)

         DEFC OP_IN   = $01       ; read only (shared)
         DEFC OP_OUT  = $02       ; write only
         DEFC OP_UP   = $03       ; open read/write
         DEFC OP_MEM  = $04       ; Open memory pool
         DEFC OP_DIR  = $05       ; Create directory name (returns DOR handle)
         DEFC OP_DOR  = $06       ; Fetch DOR handle
    ; Various file/stream manipulation calls:
         DEFC  GN_Ren = $6609     ; rename filename
         DEFC  OS_Ren = $E406     ; file rename (internal)
         DEFC  GN_Del = $6409     ; delete file
         DEFC  OS_Del = $E606     ; delete file (internal)
         DEFC  GN_Cl  = $6209     ; close file/stream
         DEFC  OS_Cl  = $E806     ; close file/stream (internal)
         DEFC  OS_Gb  = $39       ; get byte from file or device
         DEFC  OS_Gbt = $3F       ; - with timeout
         DEFC  OS_Pb  = $3C       ; put byte to file or device
         DEFC  OS_Pbt = $42       ; - with timeout
         DEFC  Os_Ugb = $36       ; unget byte (not implemented).
         DEFC  OS_Mv  = $45       ; move bytes between stream and memory
         DEFC  OS_Frm = $48       ; File read miscellaneous
         DEFC  OS_Fwm = $4B       ; File write miscellaneous
    ; File status codes, when using OS_Frm or OS_Fwm:

         DEFC  FA_PTR = $01       ; Get sequential file pointer
         DEFC  FA_EXT = $02       ; Get length (Extent) of sequential file
         DEFC  FA_EOF = $03       ; End Of File enquiry
         DEFC  FA_BST = $04       ; Buffer status (system use only)

    ; Various calls to process filenames:

         DEFC  GN_Pfs = $5A09     ; parse filename segment
         DEFC  GN_Prs = $5809     ; parse filename
         DEFC  GN_Fcm = $4E09     ; compress a filename
         DEFC  GN_Fex = $5009     ; expand a filename
         DEFC  GN_Esa = $5E09     ; read/write filename segments
    ; Calls on wildcards, searching for files, parsing filenames:

         DEFC  GN_Opw = $5209     ; open wildcard handler
         DEFC  GN_Wcl = $5409     ; close wildcard handler
         DEFC  GN_Wfn = $5609     ; get next filename match from wc.handler
         DEFC  GN_Wsm = $5C09     ; match filename segment to wildcard string

    ; File Eprom Interface:
    ; (deleted/old files are ignored, they can only be fetched by using
    ; EPROM file format information)

         DEFC  OS_Epr = $F006     ; File Eprom Manipulation Interface
         ; arguments:
         DEFC  EP_Save = $00      ; blow RAM file to EPROM
         DEFC  EP_Load = $03      ; load file from EPROM (save to RAM file)
         DEFC  EP_Dir  = $15      ; return next filename (starting with first)
                                  ; (all files must be read until RC_EOF)
______________________________________________________________________________
filter.def

; Filter manipulation:

    DEFC GN_Flo  = $2209          ; Open a filter
    DEFC GN_Flc  = $2409          ; Close a filter
    DEFC GN_Flw  = $2609          ; Push character into filter
    DEFC GN_Flr  = $2809          ; Read character from filter
    DEFC GN_Flf  = $2A09          ; Flush filter
    DEFC GN_Fpb  = $2C09          ; Push back character into filter
_______________________________________________________________________________
fpp.def

; Floating point package (FPP):

    DEFC FP_BAS = $A2             ; call Floating point package function
                                  ; (doesn't work properly)
; function codes:
         DEFC FP_AND = $21        ; bitwise AND
         DEFC FP_IDV = $24        ; integer division
         DEFC FP_EOR = $27        ; bitwise XOR
         DEFC FP_MOD = $2A        ; integer remainder
         DEFC FP_OR  = $2D        ; bitwise OR
         DEFC FP_LEQ = $30        ; less than or equal to
         DEFC FP_NEQ = $33        ; not equal to
         DEFC FP_GEQ = $36        ; greater than or equal to
         DEFC FP_LT  = $39        ; less than
         DEFC FP_EQ  = $3C        ; equal
         DEFC FP_MUL = $3F        ; multiply
         DEFC FP_ADD = $42        ; add
         DEFC FP_GT  = $45        ; greater than
         DEFC FP_SUB = $48        ; subtract
         DEFC FP_PWR = $4B        ; raise to the power
         DEFC FP_DIV = $4E        ; divide
         DEFC FP_ABS = $51        ; absolute value
         DEFC FP_ACS = $54        ; arc cosine
         DEFC FP_ASN = $57        ; arc sine
         DEFC FP_ATN = $5A        ; arc tangent
         DEFC FP_COS = $5D        ; cosine
         DEFC FP_DEG = $60        ; radians to degrees
         DEFC FP_EXP = $63        ; exponential
         DEFC FP_INT = $66        ; integer value
         DEFC FP_LN  = $69        ; base e (natural) logarithm
         DEFC FP_LOG = $6C        ; base 10 (common) logarithmn
         DEFC FP_NOT = $6F        ; bitwise NOT
         DEFC FP_RAD = $72        ; degrees to radians
         DEFC FP_SGN = $75        ; sign
         DEFC FP_SIN = $78        ; sinus
         DEFC FP_SQR = $7B        ; square root
         DEFC FP_TAN = $7E        ; tangent
         DEFC FP_ZER = $81        ; zero
         DEFC FP_ONE = $84        ; one
         DEFC FP_TRU = $87        ; true (-1)
         DEFC FP_PI  = $8A        ; PI
         DEFC FP_VAL = $8D        ; numeric value of string
         DEFC FP_STR = $90        ; string value of a number
         DEFC FP_FIX = $93        ; truncate a float to an integer
         DEFC FP_FLT = $96        ; integer to float conversion
         DEFC FP_TST = $99        ; test number for zero and sign
         DEFC FP_CMP = $9C        ; compare two numbers
         DEFC FP_NEG = $9F        ; negate number
______________________________________________________________________________
integer.def

; Integer manipulation:

    DEFC GN_M16  = $7209          ; Unsigned 16bit multiplication
    DEFC GN_D16  = $7409          ; Unsigned 16bit division
    DEFC GN_M24  = $7609          ; Unsigned 24bit multiplication
    DEFC GN_D24  = $7809          ; Unsigned 24bit division
    DEFC GN_Gdn  = $1009          ; ASCII to integer conversion
    DEFC GN_Pdn  = $1209          ; Integer to ASCII conversion
_____________________________________________________________________________
interrpt.def

; Interrupt (vector) calls:
; (performed as CALL OZ_DI or CALL OZ_EI)

    DEFC OZ_DI = $0051            ; Disable IM 2 interrupts
    DEFC OZ_EI = $0054            ; Enable IM 2 interrupts
_______________________________________________________________________________
map.def

; Graphic area (PipeDream map) control:

    DEFC OS_Map  = $F406          ; Map control

         DEFC MP_WR   = $01       ; write a line to the map
         DEFC MP_DEF  = $02       ; define a map using Panel width
         DEFC MP_GRA  = $03       ; define a map of specific width
         DEFC MP_DEL  = $04       ; delete a map
_______________________________________________________________________________
memory.def

; Memory allocation, deallocation:

    DEFC OS_Mop = $4E             ; Open memory (allocate memory pool)
    DEFC OS_Mal = $54             ; Allocate memory
    DEFC OS_Axp = $D206           ; Allocate explicit page (internal OZ usage)
    DEFC OS_Mfr = $57             ; Free memory
    DEFC OS_Mcl = $51             ; Close memory (free memory pool)

; Memory information movement:

    DEFC OS_Bde = $DA06           ; Copy bytes to extended address
    DEFC OS_Bhl = $DC06           ; Copy bytes from extended address
    DEFC GN_Rbe = $3E09           ; Read byte at extended address
    DEFC GN_Wbe = $4009           ; Write byte to extended address

; Memory comparison:

    DEFC GN_Cme  = $4209          ; compare null-terminated strings

; Memory/bank binding:

    DEFC OS_Mgb = $5A             ; Get current binding
    DEFC OS_Mpb = $5D             ; Set (Put) new binding
    DEFC OS_Bix = $60             ; Bind in extended address (internal)
    DEFC OS_Box = $63             ; Restore bindings after OS_Bix (internal)

; Fast code interface for bank switching (A=1)

    DEFC OS_Fc  = $8A

; Linked list manipulation calls (often used in combination with OS_Mal):

    DEFC GN_Xin = $4609
    DEFC GN_Xnx = $4409
    DEFC GN_Xdl = $4809

; Memory Masks used by OS_Mop:

    DEFC MM_S0 = $00              ; Segment 0 mask
    DEFC MM_S1 = $40              ; Segment 1 mask
    DEFC MM_S2 = $80              ; Segment 2 mask
    DEFC MM_S3 = $C0              ; Segment 3 mask

; additional allocation directives for OS_Mop:
    ; Source of memory (to be allocated):
    DEFC MM_FIX = $02     ; fixed workspace (not subject to swapping)
    DEFC MM_SLT = $04     ; explicit slot usage, mask'ed with the following:
         DEFC MC_CI = $10 ; internal memory
         DEFC MC_C1 = $01 ; card 1
         DEFC MC_C2 = $02 ; card 2
         DEFC MC_C3 = $03 ; card 3

    ; Allocation variations:
    DEFC MM_EXC = $10     ; exclusive use of bank
    DEFC MM_MUL = $20     ; use multiple banks
 

; Segment specifiers used by OS_Mgb, OS_Mpb:

    DEFC MS_S0 = $00              ; Segment 0 specifier
    DEFC MS_S1 = $01              ; Segment 1 specifier
    DEFC MS_S2 = $02              ; Segment 2 specifier
    DEFC MS_S3 = $03              ; Segment 3 specifier

; Low level OZ memory organisation definitions:
; (these manifests represents bit identifiers in a configuration byte that
; is (returned by OS_Nq, NQ_SLT):

    DEFC BU_EPR = 1               ; bank is EPROM
    DEFC BU_ROM = 2               ; bank is ROM
    DEFC BU_WRK = 4               ; work memory
    DEFC BU_FIX = 8               ; fixed memory
    DEFC BU_RES = 16              ; reserved memory
    DEFC BU_APL = 32              ; bank is application RAM
    DEFC BU_FRE = 128             ; bank is available RAM
_______________________________________________________________________________
misc.def

; Miscellaneous OZ call definitions:

    DEFC OS_Blp  = $D806          ; Bleep
    DEFC OS_Prt  = $24            ; Send character directly to printer filter (low level)
    DEFC OS_Isq  = $D006          ; Initialize prefix sequense (internal)
    DEFC OS_Wsq  = $CE06          ; Write to prefix sequense (internal)
    DEFC OS_Fn   = $7B            ; Miscellaneous OS functions (internal)
         DEFC FN_AH = $01         ; allocate handle
         DEFC FN_VH = $02         ; verify handle
         DEFC FN_FH = $03        ; free handle
_______________________________________________________________________________
saverst.def

; Save / Restore manipulation:
; (screen, application mailbox, Page wait & Application card management)

    DEFC OS_Sr  = $6C             ; Save & Restore
    ; arguments:
    DEFC SR_SUS = $01             ; Save user screen
    DEFC SR_RUS = $02             ; Restore user screen
    DEFC SR_WPD = $03             ; Write parameter data (mailbox)
    DEFC SR_RPD = $04             ; Read parameter data (mailbox)
    DEFC SR_FUS = $05             ; Free user screen (released, not displayed)
    DEFC SR_CRM = $06             ; Remvove card (not implemented)
    DEFC SR_CIN = $07             ; Insert card  (not implemented)
    DEFC SR_PWT = $08             ; Page wait
    DEFC SR_RND = $09             ; Occasionally a random number (system use)
_______________________________________________________________________________
screen.def

; Screen control:

    DEFC OS_Off  = $EC06          ; switch machine (screen) off

    DEFC OS_Sci  = $D406          ; alter screen info
    ; arguments:
         DEFC SC_LR0  = $01       ; LORES0 (512 byte granularity)
         DEFC SC_LR1  = $02       ; LORES1 (4K granularity)
         DEFC SC_HR0  = $03       ; HIRES0 (8K granularity)
         DEFC SC_HR1  = $04       ; HIRES1 (2K granularity)
         DEFC SC_SBR  = $05       ; screen base (2K granularity)
_______________________________________________________________________________
serintfc.def

; Low level serial port interface:

    DEFC OS_Si   = $8D            ; serial interface (low level)

         DEFC SI_HRD  = $00       ; Hard reset the serial port
         DEFC SI_SFT  = $03       ; Soft reset the serial port
         DEFC SI_INT  = $06       ; Interrupt entry point
         DEFC SI_GBT  = $09       ; Get byte from serial port
         DEFC SI_PBT  = $0C       ; Put byte to serial port
         DEFC SI_ENQ  = $0F       ; Status enquiry
         DEFC SI_FTX  = $12       ; Flush Tx (transmit) buffer
         DEFC SI_FRX  = $15       ; Flush Rx (receive) buffer
         DEFC SI_TMO  = $18       ; Set timeout
_______________________________________________________________________________
stdio.def

; Standard input/output calls

    DEFC OS_In   = $2A       ; read a byte from std. input (keyboard)
    DEFC OS_Tin  = $2D       ; read a byte from std. input, with timeout
    DEFC OS_Out  = $27       ; write a byte to std. output
    DEFC OS_Xin  = $30       ; examine input (e.g. check for pre-emption)

    DEFC GN_Nln  = $2E09     ; send newline (CR/LF) to std. output
    DEFC GN_Sop  = $3A09     ; write string to std. output
    DEFC GN_Soe  = $3C09     ; write string from extended address
    DEFC GN_Sip  = $3809     ; system input line routine

    DEFC OS_Pur  = $33       ; purge keyboard buffer (and reset timeout)

; Standard input key definitions (Returned by OS_In, OS_Tin, GN_Sip)
;
; The following codes are NOT zero prefixed:
; IN_ESC, IN_ENT, IN_TAB, IN_SPC & IN_DEL

    DEFC IN_ESC = $1B

;         ENTER          TAB            DELETE

    DEFC IN_ENT  = $0D, IN_TAB  = $09, IN_DEL  = $7F
    DEFC IN_SENT = $D1, IN_STAB = $D2, IN_SDEL = $D3  ; SHIFT
    DEFC IN_DENT = $C1, IN_DTAB = $C2, IN_DDEL = $C3  ; DIAMOND
    DEFC IN_AENT = $B1, IN_ATAB = $B2, IN_ADEL = $B3  ; SQUARE
    DEFC IN_SPC  = 32

;         LEFT           RIGHT          DOWN           UP
    DEFC IN_LFT  = $FC, IN_RGT  = $FD, IN_DWN  = $FE, IN_UP   = $FF
    DEFC IN_SLFT = $F8, IN_SRGT = $F9, IN_SDWN = $FA, IN_SUP  = $FB  ; SHIFT
    DEFC IN_DLFT = $F4, IN_DRGT = $F5, IN_DDWN = $F6, IN_DUP  = $F7  ; DIAMOND
    DEFC IN_ALFT = $F0, IN_ARGT = $F1, IN_ADWN = $F2, IN_AUP  = $F3  ; SQUARE

; various definitions:
    DEFC ESC = 27, LF = 10, CR = 13

; Menu exception codes:
    DEFC MU_ENT  = $E1, MU_TAB  = $E2, MU_SPC = $E0, MU_DEL = $E3

; OZ screen driver icons:
    DEFC SD_EXSP = $20       ; Exact space
    DEFC SD_BLL  = $21       ; Bell
    DEFC SD_GRV  = $27       ; Grave accent
    DEFC SD_SQUA = $2A       ; Square
    DEFC SD_DIAM = $2B       ; Diamond
    DEFC SD_SHFT = $2D       ; Shift
    DEFC SD_VBAR = $7C       ; Unbroken vertical bar

    DEFC SD_ENT = $E1, SD_TAB = $E2, SD_SPC = $E0, SD_DEL = $E3
    DEFC SD_ESC = $E4, SD_MNU = $E5, SD_INX = $E6, SD_HLP = $E7

; Outlined icons:
    DEFC SD_OLFT = $F0, SD_ORGT = $F1
    DEFC SD_OUP  = $F3, SD_ODWN = $F2

; bullet icons:
    DEFC SD_BLFT = $F4, SD_BRGT = $F5
    DEFC SD_BDWN = $F6, SD_BUP  = $F7

; pointer icons:
    DEFC SD_PLFT = $F8, SD_PRGT = $F9
    DEFC SD_PDWN = $FA, SD_PUP  = $FB

; Miscellaneous driver codes:
    DEFC SD_DTS = $7F        ; Delete toggle settings
    DEFC SD_DWN = $FE        ; Scroll screen downwards
    DEFC SD_UP  = $FF        ; Scroll screen upwards
_______________________________________________________________________________
syspar.def

; System calls to alter settings in Panel, PrinterEd and other resources:

    DEFC OS_Nq   = $66  ; enquire (fetch) parameter
    DEFC OS_Sp   = $69  ; specify (set) parameter

; Enquiries, read by OS_Nq:

;         <Symbol>  <Value>   <Meaning>

    DEFC NQ_Wbox  = $8300    ; return window information
    DEFC NQ_Wcur  = $8303    ; return cursor information
    DEFC NQ_Rds   = $8306    ; read text from screen

    DEFC NQ_Ain   = $8600    ; application enquiry
    DEFC NQ_Khn   = $8603    ; read keyboard handle
    DEFC NQ_Shn   = $8606    ; read screen handle
    DEFC NQ_Phn   = $8609    ; read printer indirected handle
    DEFC NQ_Nhn   = $860C    ; read null handle
    DEFC NQ_Wai   = $860F    ; Who am I?
    DEFC NQ_Com   = $8612    ; read comms handle
    DEFC NQ_Ihn   = $8615    ; read IN handle
    DEFC NQ_Ohn   = $8618    ; read OUT handle
    DEFC NQ_Rhn   = $861B    ; read direct printer handle
    DEFC NQ_Mfs   = $8900    ; read free space information
    DEFC NQ_Slt   = $8903    ; read slot type information

    DEFC NQ_Dev   = $8C00    ; fetch current device
    DEFC NQ_Dir   = $8C03    ; fetch current directory
    DEFC NQ_Fnm   = $8C06    ; fetch current filename match string
    DEFC NQ_Dmh   = $8C09    ; fetch Director special memory handle
    DEFC NQ_Inp   = $8C0C    ; read std. input handle
    DEFC NQ_Out   = $8C0F    ; read std. output handle
    DEFC NQ_Prt   = $8C12    ; read printer stream handle
    DEFC NQ_Tin   = $8C15    ; read input-T handle
    DEFC NQ_Tot   = $8C18    ; read output-T handle
    DEFC NQ_Tpr   = $8C1B    ; read printer-T stream handle
    DEFC NQ_Chn   = $8C1E    ; read comms handle

; Specifies, set by OS_Sp:
    ; Panel definitions (serial port parameters, timeout, defaults, etc.) :

    ;    <Symbol>  <Value>   <Meaning>

    DEFC PA_Gfi   = $8000    ; Install changed settings
    DEFC PA_Mct   = $8001    ; Timeout in minutes
    DEFC PA_Rep   = $8002    ; Repeat rate
    DEFC PA_Kcl   = $8003    ; Keyclick 'Y' or 'N'
    DEFC PA_Snd   = $8004    ; Sound 'Y' or 'N'
    DEFC PA_Bad   = $8005    ; Default bad process size in K
    DEFC PA_Iov   = $8010    ; Insert/Overtype 'I' or 'O'
    DEFC PA_Dat   = $8011    ; Date format 'E' or 'A'
    DEFC PA_Map   = $8012    ; PipeDream map 'Y' or 'N'
    DEFC PA_Msz   = $8013    ; Map size in pixels
    DEFC PA_Dir   = $8014    ; Default directory
    DEFC PA_Dev   = $8015    ; Default device
    DEFC PA_Txb   = $8016    ; Transmit baud rate - binary
    DEFC PA_Rxb   = $8017    ; Receive baud rate - binary
    DEFC PA_Xon   = $8018    ; Xon/Xoff 'Y' or 'N'
    DEFC PA_Par   = $8019    ; Parity 'O', 'E', 'M', 'S' or 'N'

; PrinterED definitions (highlights $ translation tables) :
    DEFC PA_Ptr   = $8020    ; Printer name
    DEFC PA_Alf   = $8021    ; Allow Linefeed, 'Y' or 'N'
    DEFC PA_Pon   = $8022    ; Printer On sequense
    DEFC PA_Pof   = $8023    ; Printer Off sequense
    DEFC PA_Eop   = $8024    ; End of page sequense
    DEFC PA_Mip   = $8025    ; HMI prefix sequense
    DEFC PA_Mis   = $8026    ; HMI suffix sequense
    DEFC PA_Mio   = $8027    ; HMI offset sequense

; The format of each highlight sequense is as follows:
        ;    PA_On<n>       Highlight ON sequense
        ;    PA_On<n>+1     Highlight OFF sequense
        ;    PA_On<n>+2     OFF at CR 'Y' or 'N'
        ;    PA_On<n>+3     Highlight n special character
         DEFC PA_On1    = $8028   ; Underline
         DEFC PA_On2    = $802C   ; Bold
         DEFC PA_On3    = $8030   ; Extended sequense
         DEFC PA_On4    = $8034   ; Italics
         DEFC PA_On5    = $8038   ; Subscript
         DEFC PA_On6    = $803C   ; Superscript
         DEFC PA_On7    = $8040   ; Alternate font
         DEFC PA_On8    = $8044   ; User Defined
         ; The format of each translation code sequense is as follows:
         ;    PA_Tr<n>       Translate from character
         ;    PA_Tr<n>+1     Translate to sequense

         DEFC PA_Tr1    = $8048   ; Row 1, Entry A
         DEFC PA_Tr2    = $804A   ;              B
         DEFC PA_Tr3    = $804C   ;              C
         DEFC PA_Tr4    = $804E   ; Row 2, Entry A
         DEFC PA_Tr5    = $8050   ;              B
         DEFC PA_Tr6    = $8052   ;              C
         DEFC PA_Tr7    = $8054   ; Row 3, Entry A
         DEFC PA_Tr8    = $8056   ;              B
         DEFC PA_Tr9    = $8058   ;              C
         ; ISO translations 1 - 28:
         DEFC PA_Tr10   = $8080   ; Row 1, Entry 1    (ISO 1)
         DEFC PA_Tr11   = $8082   ;              2    (ISO 2)
         DEFC PA_Tr12   = $8084   ;              3    (ISO 3)
         DEFC PA_Tr13   = $8086   ;              4    ...
         DEFC PA_Tr14   = $8088   ;              5
         DEFC PA_Tr15   = $808A   ;              6
         DEFC PA_Tr16   = $808C   ;              7
         DEFC PA_Tr17   = $808E   ; Row 2, Entry 1
         DEFC PA_Tr18   = $8090   ;              2
         DEFC PA_Tr19   = $8092   ;              3
         DEFC PA_Tr20   = $8094   ;              4
         DEFC PA_Tr21   = $8096   ;              5
         DEFC PA_Tr22   = $8098   ;              6
         DEFC PA_Tr23   = $809A   ;              7
         DEFC PA_Tr24   = $809C   ; Row 3, Entry 1
         DEFC PA_Tr25   = $809E   ;              2
         DEFC PA_Tr26   = $80A0   ;              3
         DEFC PA_Tr27   = $80A2   ;              4
         DEFC PA_Tr28   = $80A4   ;              5
         DEFC PA_Tr29   = $80A6   ;              6
         DEFC PA_Tr30   = $80A8   ;              7
         DEFC PA_Tr31   = $80AA   ; Row 4, Entry 1
         DEFC PA_Tr32   = $80AC   ;              2
         DEFC PA_Tr33   = $80AE   ;              3
         DEFC PA_Tr34   = $80B0   ;              4
         DEFC PA_Tr35   = $80B2   ;              5    ...
         DEFC PA_Tr36   = $80B4   ;              6    ...
         DEFC PA_Tr37   = $80B6   ;              7    (ISO 28)
    ; File system parameters:
         DEFC SP_Dev    = $8C00   ; Set current device
         DEFC SP_Dir    = $8C03   ; Set current directory
         DEFC SP_Fnm    = $8C06   ; Set current name match

_______________________________________________________________________________
time.def

; Time & Date manipulation:

    DEFC GN_Gmt = $1A09      ; get (read) machine time in internal format
    DEFC GN_Pmt = $1E09      ; put (set) machine date
    DEFC GN_Msc = $2009      ; Miscellaneous time operations
    DEFC GN_Gtm = $0A09      ; convert ASCII string to internal time format
    DEFC GN_Ptm = $0C09      ; convert internal time to ASCII string
    DEFC GN_Sdo = $0E09      ; convert real time to time to elapse
    DEFC OS_Dly = $D606      ; delay a given period
    DEFC GN_Gdt = $0609      ; convert ASCII string to internal date
    DEFC GN_Pdt = $0809      ; convert internal date to ASCII string
    DEFC GN_Die = $1409      ; convert from internal to zoned format
    DEFC GN_Dei = $1609      ; convert from zoned format to internal format
    DEFC GN_Gmd = $1809      ; get current machine date in internal format
    DEFC GN_Pmd = $1C09      ; set machine date

    DEFC OS_Ht  = $F206      ; hardware time manipulation (internal OZ usage)
         DEFC HT_RES = $01   ; reset hardware timer
         DEFC HT_RD  = $02   ; read hardware timer
         DEFC HT_MDT = $03   ; read monthy/date/time address
    DEFC OS_Ust = $EE06      ; update small timer (internal)
______________________________________________________________________________
tokens.def

; Dynamic token manipulation:

    DEFC OS_Wrt  = $CC06     ; Write token
    DEFC OS_Wtb  = $CA06     ; Write token base

______________________________________________________________________________


Previous Contents Next
Glossary Operating System Manifests System calls reference