;  (c) 1990 S.Hawtin.
;  Permission is granted to copy this file provided
;   1) It is not used for commercial gain
;   2) This notice is included in all copies
;   3) Altered copies are marked as such
;
;  No liability is accepted for the contents of the file.
;
;  clibdefs.i	within		Public Domain c.lib
;
; Define some macros for low level interface to exec and dos
;

	INCLUDE	clibs:dos.i

lref	MACRO
	xref	_LVO\1
	ENDM
;
;
;
execLib	equ  	$4
	xref	dosLib
	xref	mathffpLib
	xref	mathtransLib

call	MACRO
	; We must keep the a6 register as it is used as a frame pointer
        ; as well as a link to the library.
	move.l	a6,-(sp)
	move.l	\1Lib,a6
	jsr	_LVO\2(a6)
	move.l	(sp)+,a6
	ENDM

; Some constants for memory allocation

MEMF_CHIP    EQU   1<<1
MEMF_FAST    EQU   1<<2
MEMF_PUBLIC  EQU   1<<0
MEMF_CLEAR   EQU   1<<16
MEMF_LARGEST EQU   1<<17

; And file handling

MODE_OLDFILE 	equ  	1005
MODE_NEWFILE 	equ  	1006

; Process structures

PROC.CLI	equ	$AC
PROC.CONSOLE	equ	$A4
PROC.MSGPORT	equ	$5C
PROC.STACKBASE	equ	$90
PROC.STACKSIZE	equ	$84
PROC.TASK	equ	$00
PROC.TASKNUM	equ	$8C
PROC.WINDOWPTR	equ	$B8

; File Handling structures

FH.TYPE		equ	8
