	PRINT PUSH
	PRINT OFF
**********************************************************************
*
* All.Macros
*
* This file contains all the tool macros and the utility macros
* that we use to build system tools and the ROM.
*
**********************************************************************


**********************************************************************
*
* OUR MACROS
*
* Macros used by the toolbox group in making system software.
*
* These include most of the M16.Utility macros by Lou Infeld,
* the dummy section macros by Steve Glass and Don Marsh and	the 
* PushPtr macro.
*
**********************************************************************




*************************************************************************
*			            		*
*	    Apple //GS Utility Macros	            		*
*	            by		            		*
*	        Lou Infeld		            	*
*			           	 	*
*	Copyright Apple Computer, Inc. 1986-1988            	*
*	        All Rights Reserved	            		*
*			            		*
*   Revision History		            		*
*   ----------------		            		*
*   v1.0R1 (04/29/87) --    First Release	            		*
*	        This file is a subset of the old            	*
*	            'M16.Utility'	            		*
*   v2.0R1 (01/22/88) --    First AsmIIGS release	            	*
*   v2.0R2 (02/11/88) --    "writelin" renamed "writeline"	            	*
*   v2.0R3 (03/29/88) --    "|" added to pea instrs to avoid Assembler  	*
*	            warning		            	*
*	        "pushlong" was incorrect if &offset was "s" 	*
*	            or not specified	            		*
*   v2.0R4 (04/14/88) --    "writestr" and "writeline" didn't restore   	*
*	        STRING setting	            		*
*   v2.0R5 (06/15/88) --    "pushlong" was incorrect for stack relative 	*
*
* (Long and Short Removed by SEG)
*************************************************************************

;...............................................................
;
;        Pull 3 bytes from stack
;
;    pull3 addr    -- pulls bytes off stack and stores in 'loc'
;...............................................................
	MACRO
	pull3 &addr
	pull1 &addr
	pullword &addr+1
	MEND
;...............................................................
;
;        Pull 1 byte from stack
;
;    pull1 loc     -- pulls byte off stack and stores in 'loc'
;    pull1 loc,x   -- pulls byte off stack and stores in 'loc,x'
;    pull1         -- pulls byte off stack and leaves in A
;...............................................................
	MACRO
	pull1 &addr,&reg
	shortm
	pullword &addr,&reg
	longm
	MEND
;...............................................................
;
;        Push 1 byte onto stack
;
;    push1 loc     -- pushes byte onto stack from 'loc'
;    push1 loc,x   -- pushes byte onto stack from 'loc,x'
;    push1 #n      -- pushes constant #n onto stack
;    push1         -- pushes byte onto stack (from A)
;...............................................................
	MACRO
	push1 &addr,&reg
	shortm
	pushword &addr,&reg
	longm
	MEND
;...............................................................
;
;        Push 3 bytes onto stack
;
;    push3 addr    -- pushes bytes onto	stack from 'loc'
;    push3 addr,x  -- pushes bytes onto	stack from 'loc,x'
;    push3 #n      -- pushes constant #n onto stack
;...............................................................
	MACRO
	push3 &addr,&reg
	IF  &reg­''	THEN
	lda &addr+1,&reg
	pha
	phb
	lda &addr,&reg
	sta 1,s
	ELSEIF &addr[1:1]='#' THEN
	lda #&addr[2:255]>>8
	pha
	GOTO .a
	ELSE
	lda &addr+1
	pha
.a	phb
	lda &addr
	sta 1,s
	ENDIF
	MEND
;...............................................................
;
;        Add 2 byte	integers
;
;    add loc1,loc2,loc3 - adds 'loc1' to 'loc2' and stores in 'loc3'
;    add loc1,loc2	    - adds 'loc1' to 'loc2' and leaves in A
;    add ,loc2,loc3	    - adds A with 'loc2' and stores in 'loc3' 
;
;        'loc1' and	'loc2' can be constants
;...............................................................
	MACRO
	add &a1,&a2,&a3
	IF  &a1­''	THEN
	lda &a1
	ENDIF
	clc
	adc &a2
	IF  &a3­''	THEN
	sta &a3
	ENDIF
	MEND
;...............................................................
;
;        Add 4 byte	integers
;
;    add4 loc1,loc2,loc3 - adds 'loc1' to 'loc2' and stores	in 'loc3'
;    add4 ,loc2,loc3     - adds A to 'loc2' and stores in 'loc3'
;
;        'loc1' and	'loc2' can be constants
;...............................................................
	MACRO
	add4 &a1,&a2,&a3
	IF  &a1­''	THEN
	lda &a1
	ENDIF
	clc
	adc &a2
	sta &a3
	IF  &a1=''	THEN
	lda #0
	ELSEIF &a1[1:1]='#'	THEN
	lda #^&a1[2:255]
	ELSE
	lda &a1+2
	ENDIF
	IF  &a2[1:1]='#'	THEN
	adc #^&a2[2:255]
	ELSE
	adc &a2+2
	ENDIF
	sta &a3+2
	MEND
;...............................................................
;
;        Increment a 4 byte integer
;
;    inc4 loc - increments 'loc'
;...............................................................
	MACRO
	inc4 &a1
	inc &a1
	bne @a
	inc &a1+2
@a
	MEND
;...............................................................
;
;        Subtract 2	byte integers
;
;    sub loc1,loc2,loc3 - subtracts 'loc2' from 'loc1' and stores in 'loc3'
;    sub loc1,loc2	    - subtracts 'loc2' from 'loc1' and leaves in A
;    sub ,loc2,loc3	     - subtracts 'loc2' from A and stores in 'loc3' 
;
;        'loc1' and	'loc2' can be constants
;...............................................................
	MACRO
	sub &a1,&a2,&a3
	IF  &a1­''	THEN
	lda &a1
	ENDIF
	sec
	sbc &a2
	IF  &a3­''	THEN
	sta &a3
	ENDIF
	MEND
;...............................................................
;
;        Subtract 4	byte integers
;
;    sub4 loc1,loc2,loc3 - subtracts 'loc2' from 'loc1' and	stores in 'loc3'
;    sub4 ,loc2,loc3     - subtracts 'loc2' from A and stores in 'loc3'
;...............................................................
	MACRO
	sub4 &a1,&a2,&a3
	IF  &a1­''	THEN
	lda &a1
	ENDIF
	sec
	sbc &a2
	sta &a3
	IF  &a1=''	THEN
	lda #0
	ELSEIF &a1[1:1]='#'	THEN
	lda #^&a1[2:255]
	ELSE
	lda &a1+2
	ENDIF
	IF  &a2[1:1]='#'	THEN
	sbc #^&a2[2:255]
	ELSE
	sbc &a2+2
	ENDIF
	sta &a3+2
	MEND
;...............................................................
;
;        Decrement a 4 byte integer
;
;    dec4 loc - decrements 'loc'
;...............................................................
	MACRO
	dec4 &a1
	dec &a1
	bpl @a
	dec &a1+2
@a
	MEND
;...............................................................
;
;        Define string
;
;        Generates a Pascal type of string
;...............................................................
	MACRO
	str &string
	lclc &sset
&sset	SETC &SETTING('STRING')
	STRING PASCAL
	dc.B &string
	STRING &sset
	MEND
;...............................................................
;
;        Define pointer
;...............................................................
	MACRO
	dp  &pointer
	dc.L &pointer
	MEND
;...............................................................
;
;        Left Shift	4 bytes
;
;        asl4  loc,#n	;n is shift count (pos)
;        asl4  loc,lnum	;lnum contains shift count (pos)
;        asl4  loc		;X contains shift count (pos)
;...............................................................
	MACRO
	asl4 &loc,&num
	lda &loc+2
	IF  &num­''	THEN
	ldx &num
	ENDIF
@a	asl a
	asl &loc
	adc #0
	dex
	bne @a
	sta &loc+2
	MEND
;...............................................................
;
;        Right Shift 4 bytes
;
;        lsr4  loc,#n	;n is shift count (pos)
;        lsr4  loc,lnum	;lnum contains shift count (pos)
;        lsr4  loc		;X contains shift count (neg)
;...............................................................
	MACRO
	lsr4 &loc,&num
	IF  &num­''	THEN
	lda &num
	eor #$FFFF
	clc
	adc #1
	tax
	ENDIF
	lda &loc
@a	lsr a
	lsr &loc+2
	bcc @b
	ora #$8000
@b	inx
	bne @a
	sta &loc
	MEND
;...............................................................
;
;        Turn on native mode
;
;    The processor is put into 'native'	mode.  8 bit or 16 bit
;    mode can be specified by using 'short' or 'long' as the
;    parameter.  If	no parameter is specified, 'long' is assumed
;...............................................................
	MACRO
	native &mode
	clc
	xce
	IF  &mode­''	THEN
	&mode
	ELSE
	long
	ENDIF
	MEND
;...............................................................
;
;        Turn on emulation mode
;
;    The processor is put into 'emulation' mode.
;...............................................................
	MACRO
	emulation
	sec
	xce
	longa off
	longi off
	MEND
;...............................................................
;
;        Set Memory	& A register to 16 bits
;...............................................................
	MACRO
	longm
	rep #%00100000
	longa on
	MEND
;...............................................................
;
;        Set X & Y registers to 16 bits
;...............................................................
	MACRO
	longx
	rep #%00010000
	longi on
	MEND
;...............................................................
;
;        Set Memory	& A register to 8 bits
;...............................................................
	MACRO
	shortm
	sep #%00100000
	longa off
	MEND
;...............................................................
;
;        Set X & Y registers to 8 bits
;...............................................................
	MACRO
	shortx
	sep #%00010000
	longi off
	MEND
;...............................................................
;
;        Write string
;
;        writestr loc     - string at loc 'loc'
;        writestr #'ABC'  - string='ABC'
;        writestr	      - A,Y has loc	of string         
;...............................................................
	MACRO
	writestr &addr
	IF  &addr­''	THEN
	IF  &addr[1:1]='#'	THEN
	bra @b
	LCLC &sset
&sset	SETC &SETTING('STRING')
	STRING PASCAL
@a	DC.B &addr[2:255]
	STRING &sset
@b	pea @a>>16
	pea |@a
	ELSE
	pea &addr>>16
	pea |&addr
	ENDIF
	ELSE
	phy
	pha
	ENDIF
	ldx #$1C0C
	jsl $E10000
	MEND
;...............................................................
;
;        Write line	(string+CR)
;
;        writeline loc     - string at loc 'loc'
;        writeline #'ABC'  - string='ABC'
;        writeline 'ABC'   - string='ABC'
;        writeline	       - CR only
;
;...............................................................
	MACRO
	writeline &addr
	IF  &addr­''	THEN
	IF  &addr[1:1]='#'	OR &addr[1:1]='''' THEN
	bra @b
	LCLC &sset
&sset	SETC &SETTING('STRING')
	STRING PASCAL
	IF  &addr[1:1]='#'	THEN
@a	DC.B &addr[2:255]
	ELSE
@a	DC.B &addr[1:255]
	ENDIF
	STRING &sset
@b	pea @a>>16
	pea |@a
	ELSE
	pea &addr>>16
	pea |&addr
	ENDIF
	ELSE
	pea @c+1>>16
	pea |@c+1
	ENDIF
	ldx #$1A0C
@c	jsl $E10000
	MEND
;...............................................................
;
;        Write character
;
;        writech	      - char in A register
;        writech #'A'     - char='A'
;        writech ch,x     - char in loc	'ch,x'
;...............................................................
	MACRO
	writech &addr,&reg
	IF  &addr­''	THEN
	IF  &reg­''	THEN
	lda &addr,&reg
	ELSE
	lda &addr
	ENDIF
	ENDIF
	pha
	ldx #$180C
	jsl $E10000
	MEND
;...............................................................
;
;              Read	a char from keyboard
;
;        readch addr     - char stored in 'addr'
;        readch	     - char left in	A register
;
;...............................................................
	MACRO
	readch &addr
	pea 0
	pea 1
	ldx #$220C
	jsl $E10000
	pla
	IF  &addr­''	THEN
	sta &addr
	ENDIF
	MEND


;
; DSect Macros
;
; By Don Marsh  and	Steven Glass
; 11 Sep 87
;
; A series of macros to help in making equates.  This is
; useful when you want to define a series of    equates that
; relate to each other.  For example, offsets on the stack,
; locations on  direct page, offsets in	a record.
;
; Normally you  would do something like
;
;     lab1 equ  0
;     lab2 equ  lab1+4
;     lab3 equ  lab2+2
;     etc.
;
; These macros  let	you do the  following
;
;          DSECT 0
;     lab1 long
;     lab2 word
;     lab3 long
;
; The macros do the	equating and addition for you.  They also make the
; code more readable.
;
; The macro GlobalDSECT makes   the equates global rather than
; local.
;
; The macro DSectSize returns   the current value of the
; dummy program counter that is being maintained.
;
; The macro DefineStack is like using DSECT 1.
;




;
;  DSect &Value
;
;  Begin local  data section.   This defines a  dummy PC
;  register which can be used   in equates to avoid error-
;  prone linked equates for setting up direct page or
;  stack offsets.  The dummy PC begins at &Value and
;  is updated by the appropriate amount	by the BYTE,
;  WORD, LONG,  and	BLOCK macros.
;
	MACRO
	DSect &Value
DummyPC	SET &Value
	MEND


;
;  DefineStack
;
;  This is a specialized data   section	which defines
;  a dummy PC starting at 1 in order to	define a
;  series of stack offsets using the BYTE, WORD,
;  LONG, and BLOCK macros.
;
	MACRO
	DefineStack
DummyPC	SET 1
	MEND

;
;  &lab byte
;
;  Equate the given	label with the current dummy
;  PC (defined  by DSect, GlobalDSect, or
;  DefineStack), and update the dummy PC by the
;  appropriate  amount.
;
	MACRO
&lab	BYTE
&lab	equ DummyPC
DummyPC	SET DummyPC+1
	MEND

;
;  &lab word
;
;  Equate the given	label with the current dummy
;  PC (defined  by DSect, GlobalDSect, or
;  DefineStack), and update the dummy PC by the
;  appropriate  amount.
;
	MACRO
&lab	WORD
&lab	equ DummyPC
DummyPC	SET DummyPC+2
	MEXIT
	MEND

;
;  &lab long
;
;  Equate the given	label with the current dummy
;  PC (defined  by DSect, GlobalDSect, or
;  DefineStack), and update the dummy PC by the
;  appropriate  amount.
;
	MACRO
&lab	LONG
&lab	equ DummyPC
DummyPC	SET DummyPC+4
	MEND

;
;  &lab block &size
;
;  Equate the given	label with the current dummy
;  PC (defined  by DSect, GlobalDSect, or
;  DefineStack), and update the dummy PC by the
;  appropriate  amount (&size bytes).
;
	MACRO
&lab	BLOCK &Value
	if  &lab	= '' goto .skiplab
&lab	equ DummyPC
.skiplab
DummyPC	SET DummyPC+&Value
	MEND

;
;  &lab DSectSize
;
;  This macro equates the given label with the
;  current dummy PC	defined by the DSect,
;  GlobalDSect, or DefineStack macros.	This    is
;  useful for determing the size of data sections
;  or parts of  data sections.
;
	MACRO
&lab	DSectSize
&lab	equ DummyPC
	MEND

;
;  CheckSize &size,&limit
;
;  This macro causes an assembler error	if
;  &size > &limit.	Useful in   checking the size
;  of direct page assignments.
;
	MACRO
	CheckSize &size,&limit
	IF  &Eval(&size)<=&Eval(&limit) goto .DONE
	AError 'Programmer-specified size limit exceeded: ABORT ASSEMBLY!'
.DONE
	MEND



	MACRO
&lab	SYSTEMDATE
&lab
	LCLC &Temp
&Temp	setc &getenv('SystemDate')
	LCLC &EIB	; declare a temporary var to hold current string setting
&EIB	SETC &SETTING('STRING') ; put   current	string  setting into temp
	STRING ASIS	; Set string type to ASIS.
	if &TEMP='' then
	DC.B '&SysDate'	; make the string
	else
	DC.B '&TEMP'
	endif
	STRING &EIB	; restore orig  string settings
	MEND

	MACRO
&lab	SYSTEMTIME
&lab
	LCLC &Temp
&Temp	setc &getenv('SystemTime')
	LCLC &EIB	; declare a temporary var to hold current string setting
&EIB	SETC &SETTING('STRING') ; put   current	string  setting into temp
	STRING ASIS	; Set string type to ASIS.
	if &TEMP='' then
	DC.B '&SysTime'	; make the string
	else
	DC.B '&TEMP'
	endif
	STRING &EIB	; restore orig  string settings
	MEND


;-----------------------------------------------------------
;
; A few last macros
;
	MACRO
&lab	PushPtr &addr
&lab
	dc.B $F4
	dc.W (&addr)>>16
	dc.B $F4
	dc.W &addr
	MEND


	macro
&lab	SetMode16
&lab
	rep #$30
	longa on
	longi on
	ENDM

	macro
&lab	SetMode8
&lab
	sep #$30
	longa off
	longi off
	ENDM

; File:  M16.ACE 
; 
; 
; Copyright Apple computer, Inc.  1988 
; All Rights Reserved 
; 
; 

 MACRO 
&lab _ACEBootInit 
&lab ldx #$011D 
     jsl $E10000 
 MEND 

 MACRO 
&lab _ACEStartUp 
&lab ldx #$021D 
     jsl $E10000 
 MEND 

 MACRO 
&lab _ACEShutDown 
&lab ldx #$031D 
     jsl $E10000 
 MEND 

 MACRO 
&lab _ACEVersion 
&lab ldx #$041D 
     jsl $E10000 
 MEND 

; MACRO 
;&lab _ACEReset 
;&lab ldx #$051D 
;     jsl $E10000 
; MEND 

 MACRO 
&lab _ACEStatus 
&lab ldx #$061D 
     jsl $E10000 
 MEND 

 MACRO 
&lab _ACEInfo 
&lab ldx #$071D 
     jsl $E10000 
 MEND 

 MACRO 
&lab _ACECompBegin 
&lab ldx #$0B1D 
     jsl $E10000 
 MEND 

 MACRO 
&lab _ACECompress 
&lab ldx #$091D 
     jsl $E10000 
 MEND 

 MACRO 
&lab _ACEExpand 
&lab ldx #$0A1D 
     jsl $E10000 
 MEND 

 MACRO 
&lab _ACEExpBegin 
&lab ldx #$0C1D 
     jsl $E10000 
 MEND 

; File: M16.ADB
;
;
; Copyright Apple Computer, Inc. 1986, 1987
; All Rights Reserved
;
;

 MACRO
&lab _ADBBootInit
&lab ldx #$0109
     jsl $E10000
 MEND

 MACRO
&lab _ADBStartUp
&lab ldx #$0209
     jsl $E10000
 MEND

 MACRO
&lab _ADBShutDown
&lab ldx #$0309
     jsl $E10000
 MEND

 MACRO
&lab _ADBVersion
&lab ldx #$0409
     jsl $E10000
 MEND

 MACRO
&lab _ADBReset
&lab ldx #$0509
     jsl $E10000
 MEND

 MACRO
&lab _ADBStatus
&lab ldx #$0609
     jsl $E10000
 MEND

 MACRO
&lab _AbsOff
&lab ldx #$1009
     jsl $E10000
 MEND

 MACRO
&lab _AbsOn
&lab ldx #$0F09
     jsl $E10000
 MEND

 MACRO
&lab _AsyncADBReceive
&lab ldx #$0D09
     jsl $E10000
 MEND

 MACRO
&lab _ClearSRQTable
&lab ldx #$1609
     jsl $E10000
 MEND

 MACRO
&lab _GetAbsScale
&lab ldx #$1309
     jsl $E10000
 MEND

 MACRO
&lab _ReadAbs
&lab ldx #$1109
     jsl $E10000
 MEND

 MACRO
&lab _ReadKeyMicroData
&lab ldx #$0A09
     jsl $E10000
 MEND

 MACRO
&lab _ReadKeyMicroMem
&lab ldx #$0B09
     jsl $E10000
 MEND

 MACRO
&lab _SendInfo
&lab ldx #$0909
     jsl $E10000
 MEND

 MACRO
&lab _SetAbsScale
&lab ldx #$1209
     jsl $E10000
 MEND

 MACRO
&lab _SRQPoll
&lab ldx #$1409
     jsl $E10000
 MEND

 MACRO
&lab _SRQRemove
&lab ldx #$1509
     jsl $E10000
 MEND

 MACRO
&lab _SyncADBReceive
&lab ldx #$0E09
     jsl $E10000
 MEND
; File: M16.Control
;
;
; Copyright Apple Computer, Inc. 1986, 1987
; All Rights Reserved
;
;

 MACRO
&lab _CtlBootInit
&lab ldx #$0110
     jsl $E10000
 MEND

 MACRO
&lab _CtlStartUp
&lab ldx #$0210
     jsl $E10000
 MEND

 MACRO
&lab _CtlShutDown
&lab ldx #$0310
     jsl $E10000
 MEND

 MACRO
&lab _CtlVersion
&lab ldx #$0410
     jsl $E10000
 MEND

 MACRO
&lab _CtlReset
&lab ldx #$0510
     jsl $E10000
 MEND

 MACRO
&lab _CtlStatus
&lab ldx #$0610
     jsl $E10000
 MEND

 MACRO
&lab _CtlNewRes
&lab ldx #$1210
     jsl $E10000
 MEND

 MACRO
&lab _DisposeControl
&lab ldx #$0A10
     jsl $E10000
 MEND

 MACRO
&lab _DragControl
&lab ldx #$1710
     jsl $E10000
 MEND

 MACRO
&lab _DragRect
&lab ldx #$1D10
     jsl $E10000
 MEND

 MACRO
&lab _DrawControls
&lab ldx #$1010
     jsl $E10000
 MEND

 MACRO
&lab _DrawOneCtl
&lab ldx #$2510
     jsl $E10000
 MEND

 MACRO
&lab _EraseControl
&lab ldx #$2410
     jsl $E10000
 MEND

 MACRO
&lab _FindControl
&lab ldx #$1310
     jsl $E10000
 MEND

 MACRO
&lab _GetCtlAction
&lab ldx #$2110
     jsl $E10000
 MEND

 MACRO
&lab _GetCtlDPage
&lab ldx #$1F10
     jsl $E10000
 MEND

 MACRO
&lab _GetCtlParams
&lab ldx #$1C10
     jsl $E10000
 MEND

 MACRO
&lab _GetCtlRefCon
&lab ldx #$2310
     jsl $E10000
 MEND

 MACRO
&lab _GetCtlTitle
&lab ldx #$0D10
     jsl $E10000
 MEND

 MACRO
&lab _GetCtlValue
&lab ldx #$1A10
     jsl $E10000
 MEND

 MACRO
&lab _GrowSize
&lab ldx #$1E10
     jsl $E10000
 MEND

 MACRO
&lab _HideControl
&lab ldx #$0E10
     jsl $E10000
 MEND

 MACRO
&lab _HiliteControl
&lab ldx #$1110
     jsl $E10000
 MEND

 MACRO
&lab _KillControls
&lab ldx #$0B10
     jsl $E10000
 MEND

 MACRO
&lab _MoveControl
&lab ldx #$1610
     jsl $E10000
 MEND

 MACRO
&lab _NewControl
&lab ldx #$0910
     jsl $E10000
 MEND

 MACRO
&lab _SetCtlAction
&lab ldx #$2010
     jsl $E10000
 MEND

 MACRO
&lab _SetCtlIcons
&lab ldx #$1810
     jsl $E10000
 MEND

 MACRO
&lab _SetCtlParams
&lab ldx #$1B10
     jsl $E10000
 MEND

 MACRO
&lab _SetCtlRefCon
&lab ldx #$2210
     jsl $E10000
 MEND

 MACRO
&lab _SetCtlTitle
&lab ldx #$0C10
     jsl $E10000
 MEND

 MACRO
&lab _SetCtlValue
&lab ldx #$1910
     jsl $E10000
 MEND

 MACRO
&lab _ShowControl
&lab ldx #$0F10
     jsl $E10000
 MEND

 MACRO
&lab _TestControl
&lab ldx #$1410
     jsl $E10000
 MEND

 MACRO
&lab _TrackControl
&lab ldx #$1510
     jsl $E10000
 MEND

; File: M16.Desk
;
;
; Copyright Apple Computer, Inc. 1986, 1987
; All Rights Reserved
;
;


 MACRO
&lab _DeskBootInit
&lab ldx #$0105
     jsl $E10000
 MEND

 MACRO
&lab _DeskStartUp
&lab ldx #$0205
     jsl $E10000
 MEND

 MACRO
&lab _DeskShutDown
&lab ldx #$0305
     jsl $E10000
 MEND

 MACRO
&lab _DeskVersion
&lab ldx #$0405
     jsl $E10000
 MEND

 MACRO
&lab _DeskReset
&lab ldx #$0505
     jsl $E10000
 MEND

 MACRO
&lab _DeskStatus
&lab ldx #$0605
     jsl $E10000
 MEND

 MACRO
&lab _ChooseCDA
&lab ldx #$1105
     jsl $E10000
 MEND

 MACRO
&lab _CloseAllNDAs
&lab ldx #$1D05
     jsl $E10000
 MEND

 MACRO
&lab _CloseNDA
&lab ldx #$1605
     jsl $E10000
 MEND

 MACRO
&lab _CloseNDAByWinPtr
&lab ldx #$1C05
     jsl $E10000
 MEND

 MACRO
&lab _FixAppleMenu
&lab ldx #$1E05
     jsl $E10000
 MEND

 MACRO
&lab _GetDAStrPtr
&lab ldx #$1405
     jsl $E10000
 MEND

 MACRO
&lab _GetNumNDAs
&lab ldx #$1B05
     jsl $E10000
 MEND

 MACRO
&lab _InstallCDA
&lab ldx #$0F05
     jsl $E10000
 MEND

 MACRO
&lab _InstallNDA
&lab ldx #$0E05
     jsl $E10000
 MEND

 MACRO
&lab _OpenNDA
&lab ldx #$1505
     jsl $E10000
 MEND

 MACRO
&lab _RestAll
&lab ldx #$0C05
     jsl $E10000
 MEND

 MACRO
&lab _RestScrn
&lab ldx #$0A05
     jsl $E10000
 MEND

 MACRO
&lab _SaveAll
&lab ldx #$0B05
     jsl $E10000
 MEND

 MACRO
&lab _SaveScrn
&lab ldx #$0905
     jsl $E10000
 MEND

 MACRO
&lab _SetDAStrPtr
&lab ldx #$1305
     jsl $E10000
 MEND

 MACRO
&lab _SystemClick
&lab ldx #$1705
     jsl $E10000
 MEND

 MACRO
&lab _SystemEdit
&lab ldx #$1805
     jsl $E10000
 MEND

 MACRO
&lab _SystemEvent
&lab ldx #$1A05
     jsl $E10000
 MEND

 MACRO
&lab _SystemTask
&lab ldx #$1905
     jsl $E10000
 MEND

 MACRO
&lab _DialogBootInit
&lab ldx #$0115
     jsl $E10000
 MEND

 MACRO
&lab _DialogStartUp
&lab ldx #$0215
     jsl $E10000
 MEND

 MACRO
&lab _DialogShutDown
&lab ldx #$0315
     jsl $E10000
 MEND

 MACRO
&lab _DialogVersion
&lab ldx #$0415
     jsl $E10000
 MEND

 MACRO
&lab _DialogReset
&lab ldx #$0515
     jsl $E10000
 MEND

 MACRO
&lab _DialogStatus
&lab ldx #$0615
     jsl $E10000
 MEND

 MACRO
&lab _Alert
&lab ldx #$1715
     jsl $E10000
 MEND

 MACRO
&lab _CautionAlert
&lab ldx #$1A15
     jsl $E10000
 MEND

 MACRO
&lab _CloseDialog
&lab ldx #$0C15
     jsl $E10000
 MEND

 MACRO
&lab _DefaultFilter
&lab ldx #$3615
     jsl $E10000
 MEND

 MACRO
&lab _DialogSelect
&lab ldx #$1115
     jsl $E10000
 MEND

 MACRO
&lab _DisableDItem
&lab ldx #$3915
     jsl $E10000
 MEND

 MACRO
&lab _DlgCopy
&lab ldx #$1315
     jsl $E10000
 MEND

 MACRO
&lab _DlgCut
&lab ldx #$1215
     jsl $E10000
 MEND

 MACRO
&lab _DlgDelete
&lab ldx #$1515
     jsl $E10000
 MEND

 MACRO
&lab _DlgPaste
&lab ldx #$1415
     jsl $E10000
 MEND

 MACRO
&lab _DrawDialog
&lab ldx #$1615
     jsl $E10000
 MEND

 MACRO
&lab _EnableDItem
&lab ldx #$3A15
     jsl $E10000
 MEND

 MACRO
&lab _ErrorSound
&lab ldx #$0915
     jsl $E10000
 MEND

 MACRO
&lab _FindDItem
&lab ldx #$2415
     jsl $E10000
 MEND

 MACRO
&lab _GetAlertStage
&lab ldx #$3415
     jsl $E10000
 MEND

 MACRO
&lab _GetControlDItem
&lab ldx #$1E15
     jsl $E10000
 MEND

 MACRO
&lab _GetDefButton
&lab ldx #$3715
     jsl $E10000
 MEND

 MACRO
&lab _GetDItemBox
&lab ldx #$2815
     jsl $E10000
 MEND

 MACRO
&lab _GetDItemType
&lab ldx #$2615
     jsl $E10000
 MEND

 MACRO
&lab _GetDItemValue
&lab ldx #$2E15
     jsl $E10000
 MEND

 MACRO
&lab _GetFirstDItem
&lab ldx #$2A15
     jsl $E10000
 MEND

 MACRO
&lab _GetIText
&lab ldx #$1F15
     jsl $E10000
 MEND

 MACRO
&lab _GetNewDItem
&lab ldx #$3315
     jsl $E10000
 MEND

 MACRO
&lab _GetNewModalDialog
&lab ldx #$3215
     jsl $E10000
 MEND

 MACRO
&lab _GetNextDItem
&lab ldx #$2B15
     jsl $E10000
 MEND

 MACRO
&lab _HideDItem
&lab ldx #$2215
     jsl $E10000
 MEND

 MACRO
&lab _IsDialogEvent
&lab ldx #$1015
     jsl $E10000
 MEND

 MACRO
&lab _ModalDialog
&lab ldx #$0F15
     jsl $E10000
 MEND

 MACRO
&lab _ModalDialog2
&lab ldx #$2C15
     jsl $E10000
 MEND

 MACRO
&lab _NewDItem
&lab ldx #$0D15
     jsl $E10000
 MEND

 MACRO
&lab _NewModalDialog
&lab ldx #$0A15
     jsl $E10000
 MEND

 MACRO
&lab _NewModelessDialog
&lab ldx #$0B15
     jsl $E10000
 MEND

 MACRO
&lab _NoteAlert
&lab ldx #$1915
     jsl $E10000
 MEND

 MACRO
&lab _ParamText
&lab ldx #$1B15
     jsl $E10000
 MEND

 MACRO
&lab _RemoveDItem
&lab ldx #$0E15
     jsl $E10000
 MEND

 MACRO
&lab _ResetAlertStage
&lab ldx #$3515
     jsl $E10000
 MEND

 MACRO
&lab _SelectIText
&lab ldx #$2115
     jsl $E10000
 MEND

 MACRO
&lab _SelIText
&lab ldx #$2115
     jsl $E10000
 MEND

 MACRO
&lab _SetDAFont
&lab ldx #$1C15
     jsl $E10000
 MEND

 MACRO
&lab _SetDefButton
&lab ldx #$3815
     jsl $E10000
 MEND

 MACRO
&lab _SetDItemBox
&lab ldx #$2915
     jsl $E10000
 MEND

 MACRO
&lab _SetDItemType
&lab ldx #$2715
     jsl $E10000
 MEND

 MACRO
&lab _SetDItemValue
&lab ldx #$2F15
     jsl $E10000
 MEND

 MACRO
&lab _SetIText
&lab ldx #$2015
     jsl $E10000
 MEND

 MACRO
&lab _ShowDItem
&lab ldx #$2315
     jsl $E10000
 MEND

 MACRO
&lab _StopAlert
&lab ldx #$1815
     jsl $E10000
 MEND

 MACRO
&lab _UpdateDialog
&lab ldx #$2515
     jsl $E10000
 MEND

; File: M16.Event
;
;
; Copyright Apple Computer, Inc. 1986, 1987
; All Rights Reserved
;
;

 MACRO
&lab _EMBootInit
&lab ldx #$0106
     jsl $E10000
 MEND

 MACRO
&lab _EMStartUp
&lab ldx #$0206
     jsl $E10000
 MEND

 MACRO
&lab _EMShutDown
&lab ldx #$0306
     jsl $E10000
 MEND

 MACRO
&lab _EMVersion
&lab ldx #$0406
     jsl $E10000
 MEND

 MACRO
&lab _EMReset
&lab ldx #$0506
     jsl $E10000
 MEND

 MACRO
&lab _EMStatus
&lab ldx #$0606
     jsl $E10000
 MEND

 MACRO
&lab _Button
&lab ldx #$0D06
     jsl $E10000
 MEND

 MACRO
&lab _DoWindows
&lab ldx #$0906
     jsl $E10000
 MEND

 MACRO
&lab _EventAvail
&lab ldx #$0B06
     jsl $E10000
 MEND

 MACRO
&lab _FakeMouse
&lab ldx #$1906
     jsl $E10000
 MEND

 MACRO
&lab _FlushEvents
&lab ldx #$1506
     jsl $E10000
 MEND

 MACRO
&lab _GetCaretTime
&lab ldx #$1206
     jsl $E10000
 MEND

 MACRO
&lab _GetDblTime
&lab ldx #$1106
     jsl $E10000
 MEND

 MACRO
&lab _GetMouse
&lab ldx #$0C06
     jsl $E10000
 MEND

 MACRO
&lab _GetNextEvent
&lab ldx #$0A06
     jsl $E10000
 MEND

 MACRO
&lab _GetOSEvent
&lab ldx #$1606
     jsl $E10000
 MEND

 MACRO
&lab _OSEventAvail
&lab ldx #$1706
     jsl $E10000
 MEND

 MACRO
&lab _PostEvent
&lab ldx #$1406
     jsl $E10000
 MEND

 MACRO
&lab _SetEventMask
&lab ldx #$1806
     jsl $E10000
 MEND

 MACRO
&lab _SetSwitch
&lab ldx #$1306
     jsl $E10000
 MEND

 MACRO
&lab _StillDown
&lab ldx #$0E06
     jsl $E10000
 MEND

 MACRO
&lab _TickCount
&lab ldx #$1006
     jsl $E10000
 MEND

 MACRO
&lab _WaitMouseUp
&lab ldx #$0F06
     jsl $E10000
 MEND

; File: M16.Font 
; 
; 
; Copyright Apple Computer, Inc. 1986, 1987, 1988 
; All Rights Reserved 
; 
; 

 MACRO 
&lab _FMBootInit 
&lab ldx #$011B 
     jsl $E10000 
 MEND 

 MACRO 
&lab _FMStartUp 
&lab ldx #$021B 
     jsl $E10000 
 MEND 

 MACRO 
&lab _FMShutDown 
&lab ldx #$031B 
     jsl $E10000 
 MEND 

 MACRO 
&lab _FMVersion 
&lab ldx #$041B 
     jsl $E10000 
 MEND 

 MACRO 
&lab _FMReset 
&lab ldx #$051B 
     jsl $E10000 
 MEND 

 MACRO 
&lab _FMStatus 
&lab ldx #$061B 
     jsl $E10000 
 MEND 

 MACRO 
&lab _AddFamily 
&lab ldx #$0D1B 
     jsl $E10000 
 MEND 

 MACRO 
&lab _AddFontVar 
&lab ldx #$141B 
     jsl $E10000 
 MEND 

 MACRO 
&lab _ChooseFont 
&lab ldx #$161B 
     jsl $E10000 
 MEND 

 MACRO 
&lab _CountFamilies 
&lab ldx #$091B 
     jsl $E10000 
 MEND 

 MACRO 
&lab _CountFonts 
&lab ldx #$101B 
     jsl $E10000 
 MEND 

 MACRO 
&lab _FamNum2ItemID 
&lab ldx #$1B1B 
     jsl $E10000 
 MEND 

 MACRO 
&lab _FindFamily 
&lab ldx #$0A1B 
     jsl $E10000 
 MEND 

 MACRO 
&lab _FindFontStats 
&lab ldx #$111B 
     jsl $E10000 
 MEND 

 MACRO 
&lab _FixFontMenu 
&lab ldx #$151B 
     jsl $E10000 
 MEND 

 MACRO 
&lab _FMGetCurFID 
&lab ldx #$1A1B 
     jsl $E10000 
 MEND 

 MACRO 
&lab _FMGetSysFID 
&lab ldx #$191B 
     jsl $E10000 
 MEND 

 MACRO 
&lab _FMSetSysFont 
&lab ldx #$181B 
     jsl $E10000 
 MEND 

 MACRO 
&lab _GetFamInfo 
&lab ldx #$0B1B 
     jsl $E10000 
 MEND 

 MACRO 
&lab _GetFamNum 
&lab ldx #$0C1B 
     jsl $E10000 
 MEND 

 MACRO 
&lab _InstallFont 
&lab ldx #$0E1B 
     jsl $E10000 
 MEND 

 MACRO 
&lab _InstallWithStats 
&lab ldx #$1C1B 
     jsl $E10000 
 MEND 

 MACRO 
&lab _ItemID2FamNum 
&lab ldx #$171B 
     jsl $E10000 
 MEND 

 MACRO 
&lab _LoadFont 
&lab ldx #$121B 
     jsl $E10000 
 MEND 

 MACRO 
&lab _LoadSysFont 
&lab ldx #$131B 
     jsl $E10000 
 MEND 

 MACRO 
&lab _SetPurgeStat 
&lab ldx #$0F1B 
     jsl $E10000 
 MEND 

; File: M16.IntMath
;
;
; Copyright Apple Computer, Inc. 1986, 1987
; All Rights Reserved
;
;

 MACRO
&lab _IMBootInit
&lab ldx #$010B
     jsl $E10000
 MEND

 MACRO
&lab _IMStartUp
&lab ldx #$020B
     jsl $E10000
 MEND

 MACRO
&lab _IMShutDown
&lab ldx #$030B
     jsl $E10000
 MEND

 MACRO
&lab _IMVersion
&lab ldx #$040B
     jsl $E10000
 MEND

 MACRO
&lab _IMReset
&lab ldx #$050B
     jsl $E10000
 MEND

 MACRO
&lab _IMStatus
&lab ldx #$060B
     jsl $E10000
 MEND

 MACRO
&lab _Dec2Int
&lab ldx #$280B
     jsl $E10000
 MEND

 MACRO
&lab _Dec2Long
&lab ldx #$290B
     jsl $E10000
 MEND

 MACRO
&lab _Fix2Frac
&lab ldx #$1C0B
     jsl $E10000
 MEND

 MACRO
&lab _Fix2Long
&lab ldx #$1B0B
     jsl $E10000
 MEND

 MACRO
&lab _Fix2X
&lab ldx #$1E0B
     jsl $E10000
 MEND

 MACRO
&lab _FixATan2
&lab ldx #$170B
     jsl $E10000
 MEND

 MACRO
&lab _FixDiv
&lab ldx #$110B
     jsl $E10000
 MEND

 MACRO
&lab _FixMul
&lab ldx #$0F0B
     jsl $E10000
 MEND

 MACRO
&lab _FixRatio
&lab ldx #$0E0B
     jsl $E10000
 MEND

 MACRO
&lab _FixRound
&lab ldx #$130B
     jsl $E10000
 MEND

 MACRO
&lab _Frac2Fix
&lab ldx #$1D0B
     jsl $E10000
 MEND

 MACRO
&lab _Frac2X
&lab ldx #$1F0B
     jsl $E10000
 MEND

 MACRO
&lab _FracCos
&lab ldx #$150B
     jsl $E10000
 MEND

 MACRO
&lab _FracDiv
&lab ldx #$120B
     jsl $E10000
 MEND

 MACRO
&lab _FracMul
&lab ldx #$100B
     jsl $E10000
 MEND

 MACRO
&lab _FracSin
&lab ldx #$160B
     jsl $E10000
 MEND

 MACRO
&lab _FracSqrt
&lab ldx #$140B
     jsl $E10000
 MEND

 MACRO
&lab _Hex2Int
&lab ldx #$240B
     jsl $E10000
 MEND

 MACRO
&lab _Hex2Long
&lab ldx #$250B
     jsl $E10000
 MEND

 MACRO
&lab _HexIt
&lab ldx #$2A0B
     jsl $E10000
 MEND

 MACRO
&lab _HiWord
&lab ldx #$180B
     jsl $E10000
 MEND

 MACRO
&lab _Int2Dec
&lab ldx #$260B
     jsl $E10000
 MEND

 MACRO
&lab _Int2Hex
&lab ldx #$220B
     jsl $E10000
 MEND

 MACRO
&lab _Long2Dec
&lab ldx #$270B
     jsl $E10000
 MEND

 MACRO
&lab _Long2Fix
&lab ldx #$1A0B
     jsl $E10000
 MEND

 MACRO
&lab _Long2Hex
&lab ldx #$230B
     jsl $E10000
 MEND

 MACRO
&lab _LongDivide
&lab ldx #$0D0B
     jsl $E10000
 MEND

 MACRO
&lab _LongMul
&lab ldx #$0C0B
     jsl $E10000
 MEND

 MACRO
&lab _LoWord
&lab ldx #$190B
     jsl $E10000
 MEND

 MACRO
&lab _Multiply
&lab ldx #$090B
     jsl $E10000
 MEND

 MACRO
&lab _SDivide
&lab ldx #$0A0B
     jsl $E10000
 MEND

 MACRO
&lab _UDivide
&lab ldx #$0B0B
     jsl $E10000
 MEND

 MACRO
&lab _X2Fix
&lab ldx #$200B
     jsl $E10000
 MEND

 MACRO
&lab _X2Frac
&lab ldx #$210B
     jsl $E10000
 MEND

; File: M16.lineEdit
;
;
; Copyright Apple Computer, Inc. 1986, 1987
; All Rights Reserved
;
;

 MACRO
&lab _LEBootInit
&lab ldx #$0114
     jsl $E10000
 MEND

 MACRO
&lab _LEStartUp
&lab ldx #$0214
     jsl $E10000
 MEND

 MACRO
&lab _LEShutDown
&lab ldx #$0314
     jsl $E10000
 MEND

 MACRO
&lab _LEVersion
&lab ldx #$0414
     jsl $E10000
 MEND

 MACRO
&lab _LEReset
&lab ldx #$0514
     jsl $E10000
 MEND

 MACRO
&lab _LEStatus
&lab ldx #$0614
     jsl $E10000
 MEND

 MACRO
&lab _LEActivate
&lab ldx #$0F14
     jsl $E10000
 MEND

 MACRO
&lab _LEClick
&lab ldx #$0D14
     jsl $E10000
 MEND

 MACRO
&lab _LECopy
&lab ldx #$1314
     jsl $E10000
 MEND

 MACRO
&lab _LECut
&lab ldx #$1214
     jsl $E10000
 MEND

 MACRO
&lab _LEDeactivate
&lab ldx #$1014
     jsl $E10000
 MEND

 MACRO
&lab _LEDelete
&lab ldx #$1514
     jsl $E10000
 MEND

 MACRO
&lab _LEDispose
&lab ldx #$0A14
     jsl $E10000
 MEND

 MACRO
&lab _LEFromScrap
&lab ldx #$1914
     jsl $E10000
 MEND

 MACRO
&lab _LEGetScrapLen
&lab ldx #$1C14
     jsl $E10000
 MEND

 MACRO
&lab _LEGetTextHand
&lab ldx #$2214
     jsl $E10000
 MEND

 MACRO
&lab _LEGetTextLen
&lab ldx #$2314
     jsl $E10000
 MEND

 MACRO
&lab _LEIdle
&lab ldx #$0C14
     jsl $E10000
 MEND

 MACRO
&lab _LEInsert
&lab ldx #$1614
     jsl $E10000
 MEND

 MACRO
&lab _LEKey
&lab ldx #$1114
     jsl $E10000
 MEND

 MACRO
&lab _LENew
&lab ldx #$0914
     jsl $E10000
 MEND

 MACRO
&lab _LEPaste
&lab ldx #$1414
     jsl $E10000
 MEND

 MACRO
&lab _LEScrapHandle
&lab ldx #$1B14
     jsl $E10000
 MEND

 MACRO
&lab _LESetCaret
&lab ldx #$1F14
     jsl $E10000
 MEND

 MACRO
&lab _LESetHilite
&lab ldx #$1E14
     jsl $E10000
 MEND

 MACRO
&lab _LESetJust
&lab ldx #$2114
     jsl $E10000
 MEND

 MACRO
&lab _LESetScrapLen
&lab ldx #$1D14
     jsl $E10000
 MEND

 MACRO
&lab _LESetSelect
&lab ldx #$0E14
     jsl $E10000
 MEND

 MACRO
&lab _LESetText
&lab ldx #$0B14
     jsl $E10000
 MEND

 MACRO
&lab _LETextBox
&lab ldx #$1814
     jsl $E10000
 MEND

 MACRO
&lab _LETextBox2
&lab ldx #$2014
     jsl $E10000
 MEND

 MACRO
&lab _LEToScrap
&lab ldx #$1A14
     jsl $E10000
 MEND

 MACRO
&lab _LEUpdate
&lab ldx #$1714
     jsl $E10000
 MEND

; File: M16.List
;
;
; Copyright Apple Computer, Inc. 1986, 1987
; All Rights Reserved
;
;


 MACRO
&lab _ListBootInit
&lab ldx #$011C
     jsl $E10000
 MEND

 MACRO
&lab _ListStartup
&lab ldx #$021C
     jsl $E10000
 MEND

 MACRO
&lab _ListShutDown
&lab ldx #$031C
     jsl $E10000
 MEND

 MACRO
&lab _ListVersion
&lab ldx #$041C
     jsl $E10000
 MEND

 MACRO
&lab _ListReset
&lab ldx #$051C
     jsl $E10000
 MEND

 MACRO
&lab _ListStatus
&lab ldx #$061C
     jsl $E10000
 MEND

 MACRO
&lab _CreateList
&lab ldx #$091C
     jsl $E10000
 MEND

 MACRO
&lab _DrawMember
&lab ldx #$0C1C
     jsl $E10000
 MEND

 MACRO
&lab _GetListDefProc
&lab ldx #$0E1C
     jsl $E10000
 MEND

 MACRO
&lab _NewList
&lab ldx #$101C
     jsl $E10000
 MEND

 MACRO
&lab _NextMember
&lab ldx #$0B1C
     jsl $E10000
 MEND

 MACRO
&lab _ResetMember
&lab ldx #$0F1C
     jsl $E10000
 MEND

 MACRO
&lab _SelectMember
&lab ldx #$0D1C
     jsl $E10000
 MEND

 MACRO
&lab _SortList
&lab ldx #$0A1C
     jsl $E10000
 MEND

; File:  M16.Loader
;
;
; Copyright Apple Computer, Inc. 1986, 1987, 1988
; All Rights Reserved
;

 MACRO
&lab _LoaderInitialization
&lab ldx #$0111
     jsl $E10000
 MEND

 MACRO
&lab _LoaderInit
&lab ldx #$0111
     jsl $E10000
 MEND

 MACRO
&lab _LoaderStartUp
&lab ldx #$0211
     jsl $E10000
 MEND

 MACRO
&lab _LoaderShutDown
&lab ldx #$0311
     jsl $E10000
 MEND

 MACRO
&lab _LoaderVersion
&lab ldx #$0411
     jsl $E10000
 MEND

 MACRO
&lab _LoaderReset
&lab ldx #$0511
     jsl $E10000
 MEND

 MACRO
&lab _LoaderStatus
&lab ldx #$0611
     jsl $E10000
 MEND

 MACRO
&lab _GetLoadSegInfo
&lab ldx #$0F11
     jsl $E10000
 MEND

 MACRO
&lab _GetPathname
&lab ldx #$1111
     jsl $E10000
 MEND

 MACRO
&lab _GetUserID
&lab ldx #$1011
     jsl $E10000
 MEND

 MACRO
&lab _InitialLoad
&lab ldx #$0911
     jsl $E10000
 MEND

 MACRO
&lab _LGetPathname
&lab ldx #$1111
     jsl $E10000
 MEND

 MACRO
&lab _LoadSegName
&lab ldx #$0D11
     jsl $E10000
 MEND

 MACRO
&lab _LoadSegNum
&lab ldx #$0B11
     jsl $E10000
 MEND

 MACRO
&lab _Restart
&lab ldx #$0A11
     jsl $E10000
 MEND

 MACRO
&lab _UnloadSeg
&lab ldx #$0E11
     jsl $E10000
 MEND

 MACRO
&lab _UnloadSegNum
&lab ldx #$0C11
     jsl $E10000
 MEND

 MACRO
&lab _UserShutDown
&lab ldx #$1211
     jsl $E10000
 MEND

; File:  M16.Locator 
; 
; 
; Copyright Apple Computer, Inc. 1986, 1987, 1988 
; All Rights Reserved 
; 

 MACRO 
&lab _TLBootInit 
&lab ldx #$0101 
     jsl $E10000 
 MEND 

 MACRO 
&lab _TLStartUp 
&lab ldx #$0201 
     jsl $E10000 
 MEND 

 MACRO 
&lab _TLShutDown 
&lab ldx #$0301 
     jsl $E10000 
 MEND 

 MACRO 
&lab _TLVersion 
&lab ldx #$0401 
     jsl $E10000 
 MEND 

 MACRO 
&lab _TLReset 
&lab ldx #$0501 
     jsl $E10000 
 MEND 

 MACRO 
&lab _TLStatus 
&lab ldx #$0601 
     jsl $E10000 
 MEND 

 MACRO 
&lab _GetFuncPtr 
&lab ldx #$0B01 
     jsl $E10000 
 MEND 

 MACRO 
&lab _GetTSPtr 
&lab ldx #$0901 
     jsl $E10000 
 MEND 

 MACRO 
&lab _GetWAP 
&lab ldx #$0C01 
     jsl $E10000 
 MEND 

 MACRO 
&lab _LoadOneTool 
&lab ldx #$0F01 
     jsl $E10000 
 MEND 

 MACRO 
&lab _LoadTools 
&lab ldx #$0E01 
     jsl $E10000 
 MEND 

 MACRO 
&lab _MessageCenter 
&lab ldx #$1501 
     jsl $E10000 
 MEND 

 MACRO 
&lab _RestoreTextState 
&lab ldx #$1401 
     jsl $E10000 
 MEND 

 MACRO 
&lab _SaveTextState 
&lab ldx #$1301 
     jsl $E10000 
 MEND 

 MACRO 
&lab _SetDefaultTPT 
&lab ldx #$1601 
     jsl $E10000 
 MEND 

 MACRO 
&lab _SetTSPtr 
&lab ldx #$0A01 
     jsl $E10000 
 MEND 

 MACRO 
&lab _SetWAP 
&lab ldx #$0D01 
     jsl $E10000 
 MEND 

 MACRO 
&lab _TLMountVolume 
&lab ldx #$1101 
     jsl $E10000 
 MEND 

 MACRO 
&lab _TLTextMountVolume 
&lab ldx #$1201 
     jsl $E10000 
 MEND 

 MACRO 
&lab _UnloadOneTool 
&lab ldx #$1001 
     jsl $E10000 
 MEND 

; File: M16.Memory 
; 
; 
; Copyright Apple Computer, Inc. 1986, 1987, 1988 
; All Rights Reserved 
; 
; 

 MACRO 
&lab _MMBootInit 
&lab ldx #$0102 
     jsl $E10000 
 MEND 

 MACRO 
&lab _MMStartUp 
&lab ldx #$0202 
     jsl $E10000 
 MEND 

 MACRO 
&lab _MMShutDown 
&lab ldx #$0302 
     jsl $E10000 
 MEND 

 MACRO 
&lab _MMVersion 
&lab ldx #$0402 
     jsl $E10000 
 MEND 

 MACRO 
&lab _MMReset 
&lab ldx #$0502 
     jsl $E10000 
 MEND 

 MACRO 
&lab _MMStatus 
&lab ldx #$0602 
     jsl $E10000 
 MEND 

 MACRO 
&lab _BlockMove 
&lab ldx #$2B02 
     jsl $E10000 
 MEND 

 MACRO 
&lab _CheckHandle 
&lab ldx #$1E02 
     jsl $E10000 
 MEND 

 MACRO 
&lab _CompactMem 
&lab ldx #$1F02 
     jsl $E10000 
 MEND 

 MACRO 
&lab _DisposeAll 
&lab ldx #$1102 
     jsl $E10000 
 MEND 

 MACRO 
&lab _DisposeHandle 
&lab ldx #$1002 
     jsl $E10000 
 MEND 

 MACRO 
&lab _FindHandle 
&lab ldx #$1A02 
     jsl $E10000 
 MEND 

 MACRO 
&lab _FreeMem 
&lab ldx #$1B02 
     jsl $E10000 
 MEND 

 MACRO 
&lab _GetHandleSize 
&lab ldx #$1802 
     jsl $E10000 
 MEND 

 MACRO 
&lab _HandToHand 
&lab ldx #$2A02 
     jsl $E10000 
 MEND 

 MACRO 
&lab _HandToPtr 
&lab ldx #$2902 
     jsl $E10000 
 MEND 

 MACRO 
&lab _HLock 
&lab ldx #$2002 
     jsl $E10000 
 MEND 

 MACRO 
&lab _HLockAll 
&lab ldx #$2102 
     jsl $E10000 
 MEND 

 MACRO 
&lab _HUnlock 
&lab ldx #$2202 
     jsl $E10000 
 MEND 

 MACRO 
&lab _HUnlockAll 
&lab ldx #$2302 
     jsl $E10000 
 MEND 

 MACRO 
&lab _MaxBlock 
&lab ldx #$1C02 
     jsl $E10000 
 MEND 

 MACRO 
&lab _NewHandle 
&lab ldx #$0902 
     jsl $E10000 
 MEND 

 MACRO 
&lab _PtrToHand 
&lab ldx #$2802 
     jsl $E10000 
 MEND 

 MACRO 
&lab _PurgeAll 
&lab ldx #$1302 
     jsl $E10000 
 MEND 

 MACRO 
&lab _PurgeHandle 
&lab ldx #$1202 
     jsl $E10000 
 MEND 

 MACRO 
&lab _RealFreeMem 
&lab ldx #$2F02 
     jsl $E10000 
 MEND 

 MACRO 
&lab _ReallocHandle 
&lab ldx #$0A02 
     jsl $E10000 
 MEND 

 MACRO 
&lab _RestoreHandle 
&lab ldx #$0B02 
     jsl $E10000 
 MEND 

 MACRO 
&lab _SetHandleSize 
&lab ldx #$1902 
     jsl $E10000 
 MEND 

 MACRO 
&lab _SetPurge 
&lab ldx #$2402 
     jsl $E10000 
 MEND 

 MACRO 
&lab _SetPurgeAll 
&lab ldx #$2502 
     jsl $E10000 
 MEND 

 MACRO 
&lab _TotalMem 
&lab ldx #$1D02 
     jsl $E10000 
 MEND 

; File: M16.Menu
;
;
; Copyright Apple Computer, Inc. 1986, 1987
; All Rights Reserved
;
;

 MACRO
&lab _MenuBootInit
&lab ldx #$010F
     jsl $E10000
 MEND

 MACRO
&lab _MenuStartUp
&lab ldx #$020F
     jsl $E10000
 MEND

 MACRO
&lab _MenuShutDown
&lab ldx #$030F
     jsl $E10000
 MEND

 MACRO
&lab _MenuVersion
&lab ldx #$040F
     jsl $E10000
 MEND

 MACRO
&lab _MenuReset
&lab ldx #$050F
     jsl $E10000
 MEND

 MACRO
&lab _MenuStatus
&lab ldx #$060F
     jsl $E10000
 MEND

 MACRO
&lab _CalcMenuSize
&lab ldx #$1C0F
     jsl $E10000
 MEND

 MACRO
&lab _CheckMItem
&lab ldx #$320F
     jsl $E10000
 MEND

 MACRO
&lab _CountMItems
&lab ldx #$140F
     jsl $E10000
 MEND

 MACRO
&lab _DeleteMenu
&lab ldx #$0E0F
     jsl $E10000
 MEND

 MACRO
&lab _DeleteMItem
&lab ldx #$100F
     jsl $E10000
 MEND

 MACRO
&lab _DisableMItem
&lab ldx #$310F
     jsl $E10000
 MEND

 MACRO
&lab _DisposeMenu
&lab ldx #$2E0F
     jsl $E10000
 MEND

 MACRO
&lab _DrawMenuBar
&lab ldx #$2A0F
     jsl $E10000
 MEND

 MACRO
&lab _EnableMItem
&lab ldx #$300F
     jsl $E10000
 MEND

 MACRO
&lab _FixMenuBar
&lab ldx #$130F
     jsl $E10000
 MEND

 MACRO
&lab _FlashMenuBar
&lab ldx #$0C0F
     jsl $E10000
 MEND

 MACRO
&lab _GetBarColors
&lab ldx #$180F
     jsl $E10000
 MEND

 MACRO
&lab _GetMenuBar
&lab ldx #$0A0F
     jsl $E10000
 MEND

 MACRO
&lab _GetMenuFlag
&lab ldx #$200F
     jsl $E10000
 MEND

 MACRO
&lab _GetMenuMgrPort
&lab ldx #$1B0F
     jsl $E10000
 MEND

 MACRO
&lab _GetMenuTitle
&lab ldx #$220F
     jsl $E10000
 MEND

 MACRO
&lab _GetMHandle
&lab ldx #$160F
     jsl $E10000
 MEND

 MACRO
&lab _GetMItem
&lab ldx #$250F
     jsl $E10000
 MEND

 MACRO
&lab _GetMItemFlag
&lab ldx #$270F
     jsl $E10000
 MEND

 MACRO
&lab _GetMItemMark
&lab ldx #$340F
     jsl $E10000
 MEND

 MACRO
&lab _GetMItemStyle
&lab ldx #$360F
     jsl $E10000
 MEND

 MACRO
&lab _GetMTitleStart
&lab ldx #$1A0F
     jsl $E10000
 MEND

 MACRO
&lab _GetMTitleWidth
&lab ldx #$1E0F
     jsl $E10000
 MEND

 MACRO
&lab _GetSysBar
&lab ldx #$110F
     jsl $E10000
 MEND

 MACRO
&lab _HiliteMenu
&lab ldx #$2C0F
     jsl $E10000
 MEND

 MACRO
&lab _InitPalette
&lab ldx #$2F0F
     jsl $E10000
 MEND

 MACRO
&lab _InsertMenu
&lab ldx #$0D0F
     jsl $E10000
 MEND

 MACRO
&lab _InsertMItem
&lab ldx #$0F0F
     jsl $E10000
 MEND

 MACRO
&lab _MenuGlobal
&lab ldx #$230F
     jsl $E10000
 MEND

 MACRO
&lab _MenuKey
&lab ldx #$090F
     jsl $E10000
 MEND

 MACRO
&lab _MenuNewRes
&lab ldx #$290F
     jsl $E10000
 MEND

 MACRO
&lab _MenuRefresh
&lab ldx #$0B0F
     jsl $E10000
 MEND

 MACRO
&lab _MenuSelect
&lab ldx #$2B0F
     jsl $E10000
 MEND

 MACRO
&lab _NewMenu
&lab ldx #$2D0F
     jsl $E10000
 MEND

 MACRO
&lab _NewMenuBar
&lab ldx #$150F
     jsl $E10000
 MEND

 MACRO
&lab _SetBarColors
&lab ldx #$170F
     jsl $E10000
 MEND

 MACRO
&lab _SetMenuBar
&lab ldx #$390F
     jsl $E10000
 MEND

 MACRO
&lab _SetMenuFlag
&lab ldx #$1F0F
     jsl $E10000
 MEND

 MACRO
&lab _SetMenuID
&lab ldx #$370F
     jsl $E10000
 MEND

 MACRO
&lab _SetMenuTitle
&lab ldx #$210F
     jsl $E10000
 MEND

 MACRO
&lab _SetMItem
&lab ldx #$240F
     jsl $E10000
 MEND

 MACRO
&lab _SetMItemBlink
&lab ldx #$280F
     jsl $E10000
 MEND

 MACRO
&lab _SetMItemFlag
&lab ldx #$260F
     jsl $E10000
 MEND

 MACRO
&lab _SetMItemID
&lab ldx #$380F
     jsl $E10000
 MEND

 MACRO
&lab _SetMItemMark
&lab ldx #$330F
     jsl $E10000
 MEND

 MACRO
&lab _SetMItemName
&lab ldx #$3A0F
     jsl $E10000
 MEND

 MACRO
&lab _SetMItemStyle
&lab ldx #$350F
     jsl $E10000
 MEND

 MACRO
&lab _SetMTitleStart
&lab ldx #$190F
     jsl $E10000
 MEND

 MACRO
&lab _SetMTitleWidth
&lab ldx #$1D0F
     jsl $E10000
 MEND

 MACRO
&lab _SetSysBar
&lab ldx #$120F
     jsl $E10000
 MEND

; File:  M16.Midi 
; 
; 
; Copyright Apple computer, Inc.  1988 
; All Rights Reserved 
; 
; 

 MACRO 
&lab _MidiBootInit 
&lab ldx #$0120 
     jsl $E10000 
 MEND 

 MACRO 
&lab _MidiStartUp 
&lab ldx #$0220 
     jsl $E10000 
 MEND 

 MACRO 
&lab _MidiShutDown 
&lab ldx #$0320 
     jsl $E10000 
 MEND 

 MACRO 
&lab _MidiVersion 
&lab ldx #$0420 
     jsl $E10000 
 MEND 

 MACRO 
&lab _MidiReset 
&lab ldx #$0520 
     jsl $E10000 
 MEND 

 MACRO 
&lab _MidiStatus 
&lab ldx #$0620 
     jsl $E10000 
 MEND 

 MACRO 
&lab _MidiClock 
&lab ldx #$0B20 
     jsl $E10000 
 MEND 

 MACRO 
&lab _MidiControl 
&lab ldx #$0920 
     jsl $E10000 
 MEND 

 MACRO 
&lab _MidiDevice 
&lab ldx #$0A20 
     jsl $E10000 
 MEND 

 MACRO 
&lab _MidiInfo 
&lab ldx #$0C20 
     jsl $E10000 
 MEND 

 MACRO 
&lab _MidiInputPoll 
&lab jsl $E11DD8 
 MEND 

 MACRO 
&lab _MidiReadPacket 
&lab ldx #$0D20 
     jsl $E10000 
 MEND 

 MACRO 
&lab _MidiWritePacket 
&lab ldx #$0E20 
     jsl $E10000 
 MEND 

; File: M16.MiscTool
;
;
; Copyright Apple Computer, Inc. 1986, 1987
; All Rights Reserved
;
;

 MACRO
&lab _MTBootInit
&lab ldx #$0103
     jsl $E10000
 MEND

 MACRO
&lab _MTStartUp
&lab ldx #$0203
     jsl $E10000
 MEND

 MACRO
&lab _MTShutDown
&lab ldx #$0303
     jsl $E10000
 MEND

 MACRO
&lab _MTVersion
&lab ldx #$0403
     jsl $E10000
 MEND

 MACRO
&lab _MTReset
&lab ldx #$0503
     jsl $E10000
 MEND

 MACRO
&lab _MTStatus
&lab ldx #$0603
     jsl $E10000
 MEND

 MACRO
&lab _ClampMouse
&lab ldx #$1C03
     jsl $E10000
 MEND

 MACRO
&lab _ClearMouse
&lab ldx #$1B03
     jsl $E10000
 MEND

 MACRO
&lab _ClrHeartBeat
&lab ldx #$1403
     jsl $E10000
 MEND

 MACRO
&lab _DeleteID
&lab ldx #$2103
     jsl $E10000
 MEND

 MACRO
&lab _DelHeartBeat
&lab ldx #$1303
     jsl $E10000
 MEND

 MACRO
&lab _FWEntry
&lab ldx #$2403
     jsl $E10000
 MEND

 MACRO
&lab _GetAbsClamp
&lab ldx #$2B03
     jsl $E10000
 MEND

 MACRO
&lab _GetAddr
&lab ldx #$1603
     jsl $E10000
 MEND

 MACRO
&lab _GetIRQEnable
&lab ldx #$2903
     jsl $E10000
 MEND

 MACRO
&lab _GetMouseClamp
&lab ldx #$1D03
     jsl $E10000
 MEND

 MACRO
&lab _GetNewID
&lab ldx #$2003
     jsl $E10000
 MEND

 MACRO
&lab _GetTick
&lab ldx #$2503
     jsl $E10000
 MEND

 MACRO
&lab _GetVector
&lab ldx #$1103
     jsl $E10000
 MEND

 MACRO
&lab _HomeMouse
&lab ldx #$1A03
     jsl $E10000
 MEND

 MACRO
&lab _InitMouse
&lab ldx #$1803
     jsl $E10000
 MEND

 MACRO
&lab _IntSource
&lab ldx #$2303
     jsl $E10000
 MEND

 MACRO
&lab _Munger
&lab ldx #$2803
     jsl $E10000
 MEND

 MACRO
&lab _PackBytes
&lab ldx #$2603
     jsl $E10000
 MEND

 MACRO
&lab _PosMouse
&lab ldx #$1E03
     jsl $E10000
 MEND

 MACRO
&lab _ReadAsciiTime
&lab ldx #$0F03
     jsl $E10000
 MEND

 MACRO
&lab _ReadBParam
&lab ldx #$0C03
     jsl $E10000
 MEND

 MACRO
&lab _ReadBRam
&lab ldx #$0A03
     jsl $E10000
 MEND

 MACRO
&lab _ReadMouse
&lab ldx #$1703
     jsl $E10000
 MEND

 MACRO
&lab _ReadTimeHex
&lab ldx #$0D03
     jsl $E10000
 MEND

 MACRO
&lab _ServeMouse
&lab ldx #$1F03
     jsl $E10000
 MEND

 MACRO
&lab _SetAbsClamp
&lab ldx #$2A03
     jsl $E10000
 MEND

 MACRO
&lab _SetHeartBeat
&lab ldx #$1203
     jsl $E10000
 MEND

 MACRO
&lab _SetMouse
&lab ldx #$1903
     jsl $E10000
 MEND

 MACRO
&lab _SetVector
&lab ldx #$1003
     jsl $E10000
 MEND

 MACRO
&lab _StatusID
&lab ldx #$2203
     jsl $E10000
 MEND

 MACRO
&lab _SysBeep
&lab ldx #$2C03
     jsl $E10000
 MEND

 MACRO
&lab _SysFailMgr
&lab ldx #$1503
     jsl $E10000
 MEND

 MACRO
&lab _UnPackBytes
&lab ldx #$2703
     jsl $E10000
 MEND

 MACRO
&lab _WriteBParam
&lab ldx #$0B03
     jsl $E10000
 MEND

 MACRO
&lab _WriteBRam
&lab ldx #$0903
     jsl $E10000
 MEND

 MACRO
&lab _WriteTimeHex
&lab ldx #$0E03
     jsl $E10000
 MEND

; File: M16.noteseq
;
;
; Copyright Apple Computer, Inc. 1986, 1987, 1988
; All Rights Reserved
;

 MACRO
&lab _SeqBootInit
&lab ldx #$011A
     jsl $E10000
 MEND

 MACRO
&lab _SeqStartUp
&lab ldx #$021A
     jsl $E10000
 MEND

 MACRO
&lab _SeqShutDown
&lab ldx #$031A
     jsl $E10000
 MEND

 MACRO
&lab _SeqVersion
&lab ldx #$041A
     jsl $E10000
 MEND

 MACRO
&lab _SeqReset
&lab ldx #$051A
     jsl $E10000
 MEND

 MACRO
&lab _SeqStatus
&lab ldx #$061A
     jsl $E10000
 MEND

 MACRO
&lab _ClearIncr
&lab ldx #$0A1A
     jsl $E10000
 MEND

 MACRO
&lab _GetLoc
&lab ldx #$0C1A
     jsl $E10000
 MEND

 MACRO
&lab _GetTimer
&lab ldx #$0B1A
     jsl $E10000
 MEND

 MACRO
&lab _SeqAllNotesOff
&lab ldx #$0D1A
     jsl $E10000
 MEND

 MACRO
&lab _SetIncr
&lab ldx #$091A
     jsl $E10000
 MEND

 MACRO
&lab _SetInstTable
&lab ldx #$121A
     jsl $E10000
 MEND

 MACRO
&lab _SetTrkInfo
&lab ldx #$0E1A
     jsl $E10000
 MEND

 MACRO
&lab _StartInts
&lab ldx #$131A
     jsl $E10000
 MEND

 MACRO
&lab _StartSeq
&lab ldx #$0F1A
     jsl $E10000
 MEND

 MACRO
&lab _StepSeq
&lab ldx #$101A
     jsl $E10000
 MEND

 MACRO
&lab _StopInts
&lab ldx #$141A
     jsl $E10000
 MEND

 MACRO
&lab _StopSeq
&lab ldx #$111A
     jsl $E10000
 MEND
; File: M16.NoteSyn 
; 
; 
; Copyright Apple Computer, Inc. 1986, 1987, 1988 
; All Rights Reserved 
; 
; 

 MACRO 
&lab _NSBootInit 
&lab ldx #$0119 
     jsl $E10000 
 MEND 

 MACRO 
&lab _NSStartUp 
&lab ldx #$0219 
     jsl $E10000 
 MEND 

 MACRO 
&lab _NSShutDown 
&lab ldx #$0319 
     jsl $E10000 
 MEND 

 MACRO 
&lab _NSVersion 
&lab ldx #$0419 
     jsl $E10000 
 MEND 

 MACRO 
&lab _NSReset 
&lab ldx #$0519 
     jsl $E10000 
 MEND 

 MACRO 
&lab _NSStatus 
&lab ldx #$0619 
     jsl $E10000 
 MEND 

 MACRO 
&lab _AllocGen 
&lab ldx #$0919 
     jsl $E10000 
 MEND 

 MACRO 
&lab _DeallocGen 
&lab ldx #$0A19 
     jsl $E10000 
 MEND 

 MACRO 
&lab _NoteOn 
&lab ldx #$0B19 
     jsl $E10000 
 MEND 

 MACRO 
&lab _NoteOff 
&lab ldx #$0C19 
     jsl $E10000 
 MEND 

 MACRO 
&lab _AllNotesOff 
&lab ldx #$0D19 
     jsl $E10000 
 MEND 

 MACRO 
&lab _NSSetUpdateRate 
&lab ldx #$0E19 
     jsl $E10000 
 MEND 

 MACRO 
&lab _NSSetUserUpdateRtn 
&lab ldx #$0F19 
     jsl $E10000 
 MEND 

; File: M16.Print 
; 
; 
; Copyright Apple Computer, Inc. 1986, 1987, 1988 
; All Rights Reserved 
; 
; 

 MACRO 
&lab _PMBootInit 
&lab ldx #$0113 
     jsl $E10000 
 MEND 

 MACRO 
&lab _PMStartUp 
&lab ldx #$0213 
     jsl $E10000 
 MEND 

 MACRO 
&lab _PMShutDown 
&lab ldx #$0313 
     jsl $E10000 
 MEND 

 MACRO 
&lab _PMVersion 
&lab ldx #$0413 
     jsl $E10000 
 MEND 

 MACRO 
&lab _PMReset 
&lab ldx #$0513 
     jsl $E10000 
 MEND 

 MACRO 
&lab _PMStatus 
&lab ldx #$0613 
     jsl $E10000 
 MEND 

 MACRO 
&lab _LLDBitMap 
&lab ldx #$1C13 
     jsl $E10000 
 MEND 

 MACRO 
&lab _LLDControl 
&lab ldx #$1B13 
     jsl $E10000 
 MEND 

 MACRO 
&lab _LLDShutDown 
&lab ldx #$1A13 
     jsl $E10000 
 MEND 

 MACRO 
&lab _LLDStartUp 
&lab ldx #$1913 
     jsl $E10000 
 MEND 

 MACRO 
&lab _LLDText 
&lab ldx #$1D13 
     jsl $E10000 
 MEND 

 MACRO 
&lab _PMLoadDriver 
&lab ldx #$3513 
     jsl $E10000 
 MEND 

 MACRO 
&lab _PMUnloadDriver 
&lab ldx #$3413 
     jsl $E10000 
 MEND 

 MACRO
&lab _PMGetPortName
&lab ldx #$2913
	 jsl $E10000
 MEND

 MACRO 
&lab _PrChoosePrinter 
&lab ldx #$1613 
     jsl $E10000 
 MEND 

 MACRO 
&lab _PrChooser 
&lab ldx #$1613 
     jsl $E10000 
 MEND 

 MACRO 
&lab _PrCloseDoc 
&lab ldx #$0F13 
     jsl $E10000 
 MEND 

 MACRO 
&lab _PrClosePage 
&lab ldx #$1113 
     jsl $E10000 
 MEND 

 MACRO 
&lab _PrDefault 
&lab ldx #$0913 
     jsl $E10000 
 MEND 

 MACRO 
&lab _PrDriverVer 
&lab ldx #$2313 
     jsl $E10000 
 MEND 

 MACRO 
&lab _PrError 
&lab ldx #$1413 
     jsl $E10000 
 MEND 

 MACRO 
&lab _PrJobDialog 
&lab ldx #$0C13 
     jsl $E10000 
 MEND 

 MACRO 
&lab _PrOpenDoc 
&lab ldx #$0E13 
     jsl $E10000 
 MEND 

 MACRO 
&lab _PrOpenPage 
&lab ldx #$1013 
     jsl $E10000 
 MEND 

 MACRO 
&lab _PrPicFile 
&lab ldx #$1213 
     jsl $E10000 
 MEND 

 MACRO 
&lab _PrPixelMap 
&lab ldx #$0D13 
     jsl $E10000 
 MEND 

 MACRO 
&lab _PrPortVer 
&lab ldx #$2413 
     jsl $E10000 
 MEND 

 MACRO 
&lab _PrSetError 
&lab ldx #$1513 
     jsl $E10000 
 MEND 

 MACRO 
&lab _PrStlDialog 
&lab ldx #$0B13 
     jsl $E10000 
 MEND 

 MACRO 
&lab _PrValidate 
&lab ldx #$0A13 
     jsl $E10000 
 MEND 

; File: M16.ProDos
;
;
; Copyright Apple Computer, Inc. 1986, 1987, 1988
; All Rights Reserved
;
;



  MACRO
&lab _CREATE &params
&lab jsl $E100A8
	DC.W	1
	DC.L	&params
  MEND
 
  MACRO
&lab _DESTROY &params
&lab jsl $E100A8
	DC.W	2
	DC.L	&params
  MEND
 
  MACRO
&lab _CHANGE_PATH &params
&lab jsl $E100A8
	DC.W	4
	DC.L	&params
  MEND
 
  MACRO
&lab _SET_FILE_INFO &params
&lab jsl $E100A8
	DC.W	5
	DC.L	&params
  MEND
 
  MACRO
&lab _GET_FILE_INFO &params
&lab jsl $E100A8
	DC.W	6
	DC.L	&params
  MEND
 
  MACRO
&lab _VOLUME &params
&lab jsl $E100A8
	DC.W	8
	DC.L	&params
  MEND
 
  MACRO
&lab _SET_PREFIX &params
&lab jsl $E100A8
	DC.W	9
	DC.L	&params
  MEND
 
  MACRO
&lab _GET_PREFIX &params
&lab jsl $E100A8
	DC.W	$0A
	DC.L	&params
  MEND
 
  MACRO
&lab _CLEAR_BACKUP_BIT &params
&lab jsl $E100A8
	DC.W	$0B
	DC.L	&params
  MEND
 
  MACRO
&lab _OPEN &params
&lab jsl $E100A8
	DC.W	$10
	DC.L	&params
  MEND
 
  MACRO
&lab _NEWLINE &params
&lab jsl $E100A8
	DC.W	$11
	DC.L	&params
  MEND
 
  MACRO
&lab _READ &params
&lab jsl $E100A8
	DC.W	$12
	DC.L	&params
  MEND
 
  MACRO
&lab _WRITE &params
&lab jsl $E100A8
	DC.W	$13
	DC.L	&params
  MEND
 
  MACRO
&lab _CLOSE &params
&lab jsl $E100A8
	DC.W	$14
	DC.L	&params
  MEND
 
  MACRO
&lab _FLUSH &params
&lab jsl $E100A8
	DC.W	$15
	DC.L	&params
  MEND
 
  MACRO
&lab _SET_MARK &params
&lab jsl $E100A8
	DC.W	$16
	DC.L	&params
  MEND
 
  MACRO
&lab _GET_MARK &params
&lab jsl $E100A8
	DC.W	$17
	DC.L	&params
  MEND
 
  MACRO
&lab _SET_EOF &params
&lab jsl $E100A8
	DC.W	$18
	DC.L	&params
  MEND
 
  MACRO
&lab _GET_EOF &params
&lab jsl $E100A8
	DC.W	$19
	DC.L	&params
  MEND
 
  MACRO
&lab _SET_LEVEL &params
&lab jsl $E100A8
	DC.W	$1A
	DC.L	&params
  MEND
 
  MACRO
&lab _GET_LEVEL &params
&lab jsl $E100A8
	DC.W	$1B
	DC.L	&params
  MEND
 
  MACRO
&lab _GET_DIR_ENTRY &params
&lab jsl $E100A8
	DC.W	$1C
	DC.L	&params
  MEND
 
  MACRO
&lab _GET_DEV_NUM &params
&lab jsl $E100A8
	DC.W	$20
	DC.L	&params
  MEND
 
  MACRO
&lab _GET_LAST_DEV &params
&lab jsl $E100A8
	DC.W	$21
	DC.L	&params
  MEND
 
  MACRO
&lab _READ_BLOCK &params
&lab jsl $E100A8
	DC.W	$22
	DC.L	&params
  MEND
 
  MACRO
&lab _WRITE_BLOCK &params
&lab jsl $E100A8
	DC.W	$23
	DC.L	&params
  MEND
 
  MACRO
&lab _FORMAT &params
&lab jsl $E100A8
	DC.W	$24
	DC.L	&params
  MEND
 
  MACRO
&lab _ERASE_DISK &params
&lab jsl $E100A8
	DC.W	$25
	DC.L	&params
  MEND

  MACRO
&lab _GET_NAME &params
&lab jsl $E100A8
	DC.W	$27
	DC.L	&params
  MEND
 
  MACRO
&lab _GET_PATH_NAME &params
&lab jsl $E100A8
	DC.W	$27
	DC.L	&params
  MEND
 
  MACRO
&lab _GET_BOOT_VOL &params
&lab jsl $E100A8
	DC.W	$28
	DC.L	&params
  MEND
 
  MACRO
&lab _QUIT &params
&lab jsl $E100A8
	DC.W	$29
	DC.L	&params
  MEND
 
  MACRO
&lab _GET_VERSION &params
&lab jsl $E100A8
	DC.W	$2A
	DC.L	&params
  MEND
 
  MACRO
&lab _D_INFO &params
&lab jsl $E100A8
	DC.W	$2C
	DC.L	&params
  MEND
 
  MACRO
&lab _ALLOC_INTERRUPT &params
&lab jsl $E100A8
	DC.W	$31
	DC.L	&params
  MEND
 
  MACRO
&lab _DEALLOC_INTERRUPT &params
&lab jsl $E100A8
	DC.W	$32
	DC.L	&params
  MEND

          
; File: M16.QDAux 
; 
; 
; Copyright Apple Computer, Inc. 1986, 1987, 1988 
; All Rights Reserved 
; 
; 

 MACRO 
&lab _QDAuxBootInit 
&lab ldx #$0112 
     jsl $E10000 
 MEND 

 MACRO 
&lab _QDAuxStartUp 
&lab ldx #$0212 
     jsl $E10000 
 MEND 

 MACRO 
&lab _QDAuxShutDown 
&lab ldx #$0312 
     jsl $E10000 
 MEND 

 MACRO 
&lab _QDAuxVersion 
&lab ldx #$0412 
     jsl $E10000 
 MEND 

 MACRO 
&lab _QDAuxReset 
&lab ldx #$0512 
     jsl $E10000 
 MEND 

 MACRO 
&lab _QDAuxStatus 
&lab ldx #$0612 
     jsl $E10000 
 MEND 

 MACRO 
&lab _CopyPixels 
&lab ldx #$0912 
     jsl $E10000 
 MEND 

 MACRO 
&lab _DrawIcon 
&lab ldx #$0B12 
     jsl $E10000 
 MEND 

 MACRO 
&lab _SpecialRect 
&lab ldx #$0C12 
     jsl $E10000 
 MEND 

 MACRO 
&lab _WaitCursor 
&lab ldx #$0A12 
     jsl $E10000 
 MEND 

; File: M16.QuickDraw
;
;
; Copyright Apple Computer, Inc. 1986, 1987
; All Rights Reserved
;
;

 MACRO
&lab _QDBootInit
&lab ldx #$0104
     jsl $E10000
 MEND

 MACRO
&lab _QDStartUp
&lab ldx #$0204
     jsl $E10000
 MEND

 MACRO
&lab _QDShutDown
&lab ldx #$0304
     jsl $E10000
 MEND

 MACRO
&lab _QDVersion
&lab ldx #$0404
     jsl $E10000
 MEND

 MACRO
&lab _QDReset
&lab ldx #$0504
     jsl $E10000
 MEND

 MACRO
&lab _QDStatus
&lab ldx #$0604
     jsl $E10000
 MEND

 MACRO
&lab _AddPt
&lab ldx #$8004
     jsl $E10000
 MEND

 MACRO
&lab _CharBounds
&lab ldx #$AC04
     jsl $E10000
 MEND

 MACRO
&lab _CharWidth
&lab ldx #$A804
     jsl $E10000
 MEND

 MACRO
&lab _ClearScreen
&lab ldx #$1504
     jsl $E10000
 MEND

 MACRO
&lab _ClipRect
&lab ldx #$2604
     jsl $E10000
 MEND

 MACRO
&lab _ClosePicture
&lab ldx #$B904
     jsl $E10000
 MEND

 MACRO
&lab _ClosePoly
&lab ldx #$C204
     jsl $E10000
 MEND

 MACRO
&lab _ClosePort
&lab ldx #$1A04
     jsl $E10000
 MEND

 MACRO
&lab _CloseRgn
&lab ldx #$6E04
     jsl $E10000
 MEND

 MACRO
&lab _CopyRgn
&lab ldx #$6904
     jsl $E10000
 MEND

 MACRO
&lab _CStringBounds
&lab ldx #$AE04
     jsl $E10000
 MEND

 MACRO
&lab _CStringWidth
&lab ldx #$AA04
     jsl $E10000
 MEND

 MACRO
&lab _DiffRgn
&lab ldx #$7304
     jsl $E10000
 MEND

 MACRO
&lab _DisposeRgn
&lab ldx #$6804
     jsl $E10000
 MEND

 MACRO
&lab _DrawChar
&lab ldx #$A404
     jsl $E10000
 MEND

 MACRO
&lab _DrawCString
&lab ldx #$A604
     jsl $E10000
 MEND

 MACRO
&lab _DrawPicture
&lab ldx #$BA04
     jsl $E10000
 MEND

 MACRO
&lab _DrawString
&lab ldx #$A504
     jsl $E10000
 MEND

 MACRO
&lab _DrawText
&lab ldx #$A704
     jsl $E10000
 MEND

 MACRO
&lab _EmptyRect
&lab ldx #$5204
     jsl $E10000
 MEND

 MACRO
&lab _EmptyRgn
&lab ldx #$7804
     jsl $E10000
 MEND

 MACRO
&lab _EqualPt
&lab ldx #$8304
     jsl $E10000
 MEND

 MACRO
&lab _EqualRect
&lab ldx #$5104
     jsl $E10000
 MEND

 MACRO
&lab _EqualRgn
&lab ldx #$7704
     jsl $E10000
 MEND

 MACRO
&lab _EraseArc
&lab ldx #$6404
     jsl $E10000
 MEND

 MACRO
&lab _EraseOval
&lab ldx #$5A04
     jsl $E10000
 MEND

 MACRO
&lab _ErasePoly
&lab ldx #$BE04
     jsl $E10000
 MEND

 MACRO
&lab _EraseRect
&lab ldx #$5504
     jsl $E10000
 MEND

 MACRO
&lab _EraseRgn
&lab ldx #$7B04
     jsl $E10000
 MEND

 MACRO
&lab _EraseRRect
&lab ldx #$5F04
     jsl $E10000
 MEND

 MACRO
&lab _FillArc
&lab ldx #$6604
     jsl $E10000
 MEND

 MACRO
&lab _FillOval
&lab ldx #$5C04
     jsl $E10000
 MEND

 MACRO
&lab _FillPoly
&lab ldx #$C004
     jsl $E10000
 MEND

 MACRO
&lab _FillRect
&lab ldx #$5704
     jsl $E10000
 MEND

 MACRO
&lab _FillRgn
&lab ldx #$7D04
     jsl $E10000
 MEND

 MACRO
&lab _FillRRect
&lab ldx #$6104
     jsl $E10000
 MEND

 MACRO
&lab _ForceBufDims
&lab ldx #$CC04
     jsl $E10000
 MEND

 MACRO
&lab _FrameArc
&lab ldx #$6204
     jsl $E10000
 MEND

 MACRO
&lab _FrameOval
&lab ldx #$5804
     jsl $E10000
 MEND

 MACRO
&lab _FramePoly
&lab ldx #$BC04
     jsl $E10000
 MEND

 MACRO
&lab _FrameRect
&lab ldx #$5304
     jsl $E10000
 MEND

 MACRO
&lab _FrameRgn
&lab ldx #$7904
     jsl $E10000
 MEND

 MACRO
&lab _FrameRRect
&lab ldx #$5D04
     jsl $E10000
 MEND

 MACRO
&lab _GetAddress
&lab ldx #$0904
     jsl $E10000
 MEND

 MACRO
&lab _GetArcRot
&lab ldx #$B104
     jsl $E10000
 MEND

 MACRO
&lab _GetBackColor
&lab ldx #$A304
     jsl $E10000
 MEND

 MACRO
&lab _GetBackPat
&lab ldx #$3504
     jsl $E10000
 MEND

 MACRO
&lab _GetCharExtra
&lab ldx #$D504
     jsl $E10000
 MEND

 MACRO
&lab _GetClip
&lab ldx #$2504
     jsl $E10000
 MEND

 MACRO
&lab _GetClipHandle
&lab ldx #$C704
     jsl $E10000
 MEND

 MACRO
&lab _GetColorEntry
&lab ldx #$1104
     jsl $E10000
 MEND

 MACRO
&lab _GetColorTable
&lab ldx #$0F04
     jsl $E10000
 MEND

 MACRO
&lab _GetCursorAdr
&lab ldx #$8F04
     jsl $E10000
 MEND

 MACRO
&lab _GetFGSize
&lab ldx #$CF04
     jsl $E10000
 MEND

 MACRO
&lab _GetFont
&lab ldx #$9504
     jsl $E10000
 MEND

 MACRO
&lab _GetFontFlags
&lab ldx #$9904
     jsl $E10000
 MEND

 MACRO
&lab _GetFontGlobals
&lab ldx #$9704
     jsl $E10000
 MEND

 MACRO
&lab _GetFontID
&lab ldx #$D104
     jsl $E10000
 MEND

 MACRO
&lab _GetFontInfo
&lab ldx #$9604
     jsl $E10000
 MEND

 MACRO
&lab _GetFontLore
&lab ldx #$D904
     jsl $E10000
 MEND

 MACRO
&lab _GetForeColor
&lab ldx #$A104
     jsl $E10000
 MEND

 MACRO
&lab _GetGrafProcs
&lab ldx #$4504
     jsl $E10000
 MEND

 MACRO
&lab _GetMasterSCB
&lab ldx #$1704
     jsl $E10000
 MEND

 MACRO
&lab _GetPen
&lab ldx #$2904
     jsl $E10000
 MEND

 MACRO
&lab _GetPenMask
&lab ldx #$3304
     jsl $E10000
 MEND

 MACRO
&lab _GetPenMode
&lab ldx #$2F04
     jsl $E10000
 MEND

 MACRO
&lab _GetPenPat
&lab ldx #$3104
     jsl $E10000
 MEND

 MACRO
&lab _GetPenSize
&lab ldx #$2D04
     jsl $E10000
 MEND

 MACRO
&lab _GetPenState
&lab ldx #$2B04
     jsl $E10000
 MEND

 MACRO
&lab _GetPicSave
&lab ldx #$3F04
     jsl $E10000
 MEND

 MACRO
&lab _GetPixel
&lab ldx #$8804
     jsl $E10000
 MEND

 MACRO
&lab _GetPolySave
&lab ldx #$4304
     jsl $E10000
 MEND

 MACRO
&lab _GetPort
&lab ldx #$1C04
     jsl $E10000
 MEND

 MACRO
&lab _GetPortLoc
&lab ldx #$1E04
     jsl $E10000
 MEND

 MACRO
&lab _GetPortRect
&lab ldx #$2004
     jsl $E10000
 MEND

 MACRO
&lab _GetRgnSave
&lab ldx #$4104
     jsl $E10000
 MEND

 MACRO
&lab _GetROMFont
&lab ldx #$D804
     jsl $E10000
 MEND

 MACRO
&lab _GetSCB
&lab ldx #$1304
     jsl $E10000
 MEND

 MACRO
&lab _GetSpaceExtra
&lab ldx #$9F04
     jsl $E10000
 MEND

 MACRO
&lab _GetStandardSCB
&lab ldx #$0C04
     jsl $E10000
 MEND

 MACRO
&lab _GetSysField
&lab ldx #$4904
     jsl $E10000
 MEND

 MACRO
&lab _GetSysFont
&lab ldx #$B304
     jsl $E10000
 MEND

 MACRO
&lab _GetTextFace
&lab ldx #$9B04
     jsl $E10000
 MEND

 MACRO
&lab _GetTextMode
&lab ldx #$9D04
     jsl $E10000
 MEND

 MACRO
&lab _GetTextSize
&lab ldx #$D304
     jsl $E10000
 MEND

 MACRO
&lab _GetUserField
&lab ldx #$4704
     jsl $E10000
 MEND

 MACRO
&lab _GetVisHandle
&lab ldx #$C904
     jsl $E10000
 MEND

 MACRO
&lab _GetVisRgn
&lab ldx #$B504
     jsl $E10000
 MEND

 MACRO
&lab _GlobalToLocal
&lab ldx #$8504
     jsl $E10000
 MEND

 MACRO
&lab _GrafOff
&lab ldx #$0B04
     jsl $E10000
 MEND

 MACRO
&lab _GrafOn
&lab ldx #$0A04
     jsl $E10000
 MEND

 MACRO
&lab _HideCursor
&lab ldx #$9004
     jsl $E10000
 MEND

 MACRO
&lab _HidePen
&lab ldx #$2704
     jsl $E10000
 MEND

 MACRO
&lab _InflateTextBuffer
&lab ldx #$D704
     jsl $E10000
 MEND

 MACRO
&lab _InitColorTable
&lab ldx #$0D04
     jsl $E10000
 MEND

 MACRO
&lab _InitCursor
&lab ldx #$CA04
     jsl $E10000
 MEND

 MACRO
&lab _InitPort
&lab ldx #$1904
     jsl $E10000
 MEND

 MACRO
&lab _InsetRect
&lab ldx #$4C04
     jsl $E10000
 MEND

 MACRO
&lab _InsetRgn
&lab ldx #$7004
     jsl $E10000
 MEND

 MACRO
&lab _InvertArc
&lab ldx #$6504
     jsl $E10000
 MEND

 MACRO
&lab _InvertOval
&lab ldx #$5B04
     jsl $E10000
 MEND

 MACRO
&lab _InvertPoly
&lab ldx #$BF04
     jsl $E10000
 MEND

 MACRO
&lab _InvertRect
&lab ldx #$5604
     jsl $E10000
 MEND

 MACRO
&lab _InvertRgn
&lab ldx #$7C04
     jsl $E10000
 MEND

 MACRO
&lab _InvertRRect
&lab ldx #$6004
     jsl $E10000
 MEND

 MACRO
&lab _KillPicture
&lab ldx #$BB04
     jsl $E10000
 MEND

 MACRO
&lab _KillPoly
&lab ldx #$C304
     jsl $E10000
 MEND

 MACRO
&lab _Line
&lab ldx #$3D04
     jsl $E10000
 MEND

 MACRO
&lab _LineTo
&lab ldx #$3C04
     jsl $E10000
 MEND

 MACRO
&lab _LocalToGlobal
&lab ldx #$8404
     jsl $E10000
 MEND

 MACRO
&lab _MapPoly
&lab ldx #$C504
     jsl $E10000
 MEND

 MACRO
&lab _MapPt
&lab ldx #$8A04
     jsl $E10000
 MEND

 MACRO
&lab _MapRect
&lab ldx #$8B04
     jsl $E10000
 MEND

 MACRO
&lab _MapRgn
&lab ldx #$8C04
     jsl $E10000
 MEND

 MACRO
&lab _Move
&lab ldx #$3B04
     jsl $E10000
 MEND

 MACRO
&lab _MovePortTo
&lab ldx #$2204
     jsl $E10000
 MEND

 MACRO
&lab _MoveTo
&lab ldx #$3A04
     jsl $E10000
 MEND

 MACRO
&lab _NewRgn
&lab ldx #$6704
     jsl $E10000
 MEND

 MACRO
&lab _NotEmptyRect
&lab ldx #$5204
     jsl $E10000
 MEND

 MACRO
&lab _ObscureCursor
&lab ldx #$9204
     jsl $E10000
 MEND

 MACRO
&lab _OffsetPoly
&lab ldx #$C404
     jsl $E10000
 MEND

 MACRO
&lab _OffsetRect
&lab ldx #$4B04
     jsl $E10000
 MEND

 MACRO
&lab _OffsetRgn
&lab ldx #$6F04
     jsl $E10000
 MEND

 MACRO
&lab _OpenPicture
&lab ldx #$B704
     jsl $E10000
 MEND

 MACRO
&lab _OpenPoly
&lab ldx #$C104
     jsl $E10000
 MEND

 MACRO
&lab _OpenPort
&lab ldx #$1804
     jsl $E10000
 MEND

 MACRO
&lab _OpenRgn
&lab ldx #$6D04
     jsl $E10000
 MEND

 MACRO
&lab _PaintArc
&lab ldx #$6304
     jsl $E10000
 MEND

 MACRO
&lab _PaintOval
&lab ldx #$5904
     jsl $E10000
 MEND

 MACRO
&lab _PaintPixels
&lab ldx #$7F04
     jsl $E10000
 MEND

 MACRO
&lab _PaintPoly
&lab ldx #$BD04
     jsl $E10000
 MEND

 MACRO
&lab _PaintRect
&lab ldx #$5404
     jsl $E10000
 MEND

 MACRO
&lab _PaintRgn
&lab ldx #$7A04
     jsl $E10000
 MEND

 MACRO
&lab _PaintRRect
&lab ldx #$5E04
     jsl $E10000
 MEND

 MACRO
&lab _PenNormal
&lab ldx #$3604
     jsl $E10000
 MEND

 MACRO
&lab _PicComment
&lab ldx #$B804
     jsl $E10000
 MEND

 MACRO
&lab _PPToPort
&lab ldx #$D604
     jsl $E10000
 MEND

 MACRO
&lab _Pt2Rect
&lab ldx #$5004
     jsl $E10000
 MEND

 MACRO
&lab _PtInRect
&lab ldx #$4F04
     jsl $E10000
 MEND

 MACRO
&lab _PtInRgn
&lab ldx #$7504
     jsl $E10000
 MEND

 MACRO
&lab _Random
&lab ldx #$8604
     jsl $E10000
 MEND

 MACRO
&lab _RectInRgn
&lab ldx #$7604
     jsl $E10000
 MEND

 MACRO
&lab _RectRgn
&lab ldx #$6C04
     jsl $E10000
 MEND

 MACRO
&lab _RestoreBufDims
&lab ldx #$CE04
     jsl $E10000
 MEND

 MACRO
&lab _SaveBufDims
&lab ldx #$CD04
     jsl $E10000
 MEND

 MACRO
&lab _ScalePt
&lab ldx #$8904
     jsl $E10000
 MEND

 MACRO
&lab _ScrollRect
&lab ldx #$7E04
     jsl $E10000
 MEND

 MACRO
&lab _SectRect
&lab ldx #$4D04
     jsl $E10000
 MEND

 MACRO
&lab _SectRgn
&lab ldx #$7104
     jsl $E10000
 MEND

 MACRO
&lab _SetAllSCBs
&lab ldx #$1404
     jsl $E10000
 MEND

 MACRO
&lab _SetArcRot
&lab ldx #$B004
     jsl $E10000
 MEND

 MACRO
&lab _SetBackColor
&lab ldx #$A204
     jsl $E10000
 MEND

 MACRO
&lab _SetBackPat
&lab ldx #$3404
     jsl $E10000
 MEND

 MACRO
&lab _SetBufDims
&lab ldx #$CB04
     jsl $E10000
 MEND

 MACRO
&lab _SetCharExtra
&lab ldx #$D404
     jsl $E10000
 MEND

 MACRO
&lab _SetClip
&lab ldx #$2404
     jsl $E10000
 MEND

 MACRO
&lab _SetClipHandle
&lab ldx #$C604
     jsl $E10000
 MEND

 MACRO
&lab _SetColorEntry
&lab ldx #$1004
     jsl $E10000
 MEND

 MACRO
&lab _SetColorTable
&lab ldx #$0E04
     jsl $E10000
 MEND

 MACRO
&lab _SetCursor
&lab ldx #$8E04
     jsl $E10000
 MEND

 MACRO
&lab _SetEmptyRgn
&lab ldx #$6A04
     jsl $E10000
 MEND

 MACRO
&lab _SetFont
&lab ldx #$9404
     jsl $E10000
 MEND

 MACRO
&lab _SetFontFlags
&lab ldx #$9804
     jsl $E10000
 MEND

 MACRO
&lab _SetFontID
&lab ldx #$D004
     jsl $E10000
 MEND

 MACRO
&lab _SetForeColor
&lab ldx #$A004
     jsl $E10000
 MEND

 MACRO
&lab _SetGrafProcs
&lab ldx #$4404
     jsl $E10000
 MEND

 MACRO
&lab _SetIntUse
&lab ldx #$B604
     jsl $E10000
 MEND

 MACRO
&lab _SetMasterSCB
&lab ldx #$1604
     jsl $E10000
 MEND

 MACRO
&lab _SetOrigin
&lab ldx #$2304
     jsl $E10000
 MEND

 MACRO
&lab _SetPenMask
&lab ldx #$3204
     jsl $E10000
 MEND

 MACRO
&lab _SetPenMode
&lab ldx #$2E04
     jsl $E10000
 MEND

 MACRO
&lab _SetPenPat
&lab ldx #$3004
     jsl $E10000
 MEND

 MACRO
&lab _SetPenSize
&lab ldx #$2C04
     jsl $E10000
 MEND

 MACRO
&lab _SetPenState
&lab ldx #$2A04
     jsl $E10000
 MEND

 MACRO
&lab _SetPicSave
&lab ldx #$3E04
     jsl $E10000
 MEND

 MACRO
&lab _SetPolySave
&lab ldx #$4204
     jsl $E10000
 MEND

 MACRO
&lab _SetPort
&lab ldx #$1B04
     jsl $E10000
 MEND

 MACRO
&lab _SetPortLoc
&lab ldx #$1D04
     jsl $E10000
 MEND

 MACRO
&lab _SetPortRect
&lab ldx #$1F04
     jsl $E10000
 MEND

 MACRO
&lab _SetPortSize
&lab ldx #$2104
     jsl $E10000
 MEND

 MACRO
&lab _SetPt
&lab ldx #$8204
     jsl $E10000
 MEND

 MACRO
&lab _SetRandSeed
&lab ldx #$8704
     jsl $E10000
 MEND

 MACRO
&lab _SetRect
&lab ldx #$4A04
     jsl $E10000
 MEND

 MACRO
&lab _SetRectRgn
&lab ldx #$6B04
     jsl $E10000
 MEND

 MACRO
&lab _SetRgnSave
&lab ldx #$4004
     jsl $E10000
 MEND

 MACRO
&lab _SetSCB
&lab ldx #$1204
     jsl $E10000
 MEND

 MACRO
&lab _SetSolidBackPat
&lab ldx #$3804
     jsl $E10000
 MEND

 MACRO
&lab _SetSolidPenPat
&lab ldx #$3704
     jsl $E10000
 MEND

 MACRO
&lab _SetSpaceExtra
&lab ldx #$9E04
     jsl $E10000
 MEND

 MACRO
&lab _SetStdProcs
&lab ldx #$8D04
     jsl $E10000
 MEND

 MACRO
&lab _SetSysField
&lab ldx #$4804
     jsl $E10000
 MEND

 MACRO
&lab _SetSysFont
&lab ldx #$B204
     jsl $E10000
 MEND

 MACRO
&lab _SetTextFace
&lab ldx #$9A04
     jsl $E10000
 MEND

 MACRO
&lab _SetTextMode
&lab ldx #$9C04
     jsl $E10000
 MEND

 MACRO
&lab _SetTextSize
&lab ldx #$D204
     jsl $E10000
 MEND

 MACRO
&lab _SetUserField
&lab ldx #$4604
     jsl $E10000
 MEND

 MACRO
&lab _SetVisHandle
&lab ldx #$C804
     jsl $E10000
 MEND

 MACRO
&lab _SetVisRgn
&lab ldx #$B404
     jsl $E10000
 MEND

 MACRO
&lab _ShowCursor
&lab ldx #$9104
     jsl $E10000
 MEND

 MACRO
&lab _ShowPen
&lab ldx #$2804
     jsl $E10000
 MEND

 MACRO
&lab _SolidPattern
&lab ldx #$3904
     jsl $E10000
 MEND

 MACRO
&lab _StringBounds
&lab ldx #$AD04
     jsl $E10000
 MEND

 MACRO
&lab _StringWidth
&lab ldx #$A904
     jsl $E10000
 MEND

 MACRO
&lab _SubPt
&lab ldx #$8104
     jsl $E10000
 MEND

 MACRO
&lab _TextBounds
&lab ldx #$AF04
     jsl $E10000
 MEND

 MACRO
&lab _TextWidth
&lab ldx #$AB04
     jsl $E10000
 MEND

 MACRO
&lab _UnionRect
&lab ldx #$4E04
     jsl $E10000
 MEND

 MACRO
&lab _UnionRgn
&lab ldx #$7204
     jsl $E10000
 MEND

 MACRO
&lab _XorRgn
&lab ldx #$7404
     jsl $E10000
 MEND













;-----------------------------------------------------------
; FILE:  M16.SANE
;
;
; Copyright Apple Computer, Inc. 1986, 1987
; All Rights Reserved
;
;
;
;  These macros give assembly language access to 65816 SANE.
; NOTE: To use these macros you must also include E16.SANE in your 
;       source file.
;-----------------------------------------------------------
; Operation macros: operands should already be on the stack,
; with the destination address on top.  Generally the suffix
; X, D, S, C, I, or L determines the format of the source
; operand - extended, double, single, comp, integer or longint.
;-----------------------------------------------------------
;
;-----------------------------------------------------------
; Toolset macros.
;-----------------------------------------------------------
;
 MACRO
&lab _SANEBootInit
&lab ldx #$010A
     jsl $E10000
 MEND

 MACRO
&lab _SANEStartup
&lab ldx #$020A
     jsl $E10000
 MEND

 MACRO
&lab _SANEShutDown
&lab ldx #$030A
     jsl $E10000
 MEND

 MACRO
&lab _SANEVersion
&lab ldx #$040A
     jsl $E10000
 MEND

 MACRO
&lab _SANEReset
&lab ldx #$050A
     jsl $E10000
 MEND

 MACRO
&lab _SANEStatus
&lab ldx #$060A
     jsl $E10000
 MEND

 MACRO
&lab _SANEFP816
&lab ldx #$090A
     jsl $E10000
 MEND

 MACRO
&lab _SANEDecStr816
&lab ldx #$0A0A
     jsl $E10000
 MEND

 MACRO
&lab _SANEElems816
&lab ldx #$0B0A
     jsl $E10000
 MEND
       
;-----------------------------------------------------------
; Addition.
;-----------------------------------------------------------
        MACRO
&lab    FADDX
&lab    FOPRF   FFEXT+FOADD
        MEND

        MACRO
&lab    FADDD
&lab    FOPRF   FFDBL+FOADD
        MEND

        MACRO
&lab    FADDS
&lab    FOPRF   FFSGL+FOADD
        MEND

        MACRO
&lab    FADDC
&lab    FOPRF   FFCOMP+FOADD
        MEND

        MACRO
&lab    FADDI
&lab    FOPRF   FFINT+FOADD
        MEND

        MACRO
&lab    FADDL
&lab    FOPRF   FFLNG+FOADD
        MEND

;-----------------------------------------------------------
; Subtraction.
;-----------------------------------------------------------
        MACRO
&lab    FSUBX
&lab    FOPRF   FFEXT+FOSUB
        MEND

        MACRO
&lab    FSUBD
&lab    FOPRF   FFDBL+FOSUB
        MEND

        MACRO
&lab    FSUBS
&lab    FOPRF   FFSGL+FOSUB
        MEND

        MACRO
&lab    FSUBC
&lab    FOPRF   FFCOMP+FOSUB
        MEND

        MACRO
&lab    FSUBI
&lab    FOPRF   FFINT+FOSUB
        MEND

        MACRO
&lab    FSUBL
&lab    FOPRF   FFLNG+FOSUB
        MEND

;-----------------------------------------------------------
; Multiplication.
;-----------------------------------------------------------
        MACRO
&lab    FMULX
&lab    FOPRF   FFEXT+FOMUL
        MEND

        MACRO
&lab    FMULD
&lab    FOPRF   FFDBL+FOMUL
        MEND

        MACRO
&lab    FMULS
&lab    FOPRF   FFSGL+FOMUL
        MEND

        MACRO
&lab    FMULC
&lab    FOPRF   FFCOMP+FOMUL
        MEND

        MACRO
&lab    FMULI
&lab    FOPRF   FFINT+FOMUL
        MEND

        MACRO
&lab    FMULL
&lab    FOPRF   FFLNG+FOMUL
        MEND

;-----------------------------------------------------------
; Division.
;-----------------------------------------------------------
        MACRO
&lab    FDIVX
&lab    FOPRF   FFEXT+FODIV
        MEND

        MACRO
&lab    FDIVD
&lab    FOPRF   FFDBL+FODIV
        MEND

        MACRO
&lab    FDIVS
&lab    FOPRF   FFSGL+FODIV
        MEND

        MACRO
&lab    FDIVC
&lab    FOPRF   FFCOMP+FODIV
        MEND

        MACRO
&lab    FDIVI
&lab    FOPRF   FFINT+FODIV
        MEND

        MACRO
&lab    FDIVL
&lab    FOPRF   FFLNG+FODIV
        MEND

;-----------------------------------------------------------
; Square root.
;-----------------------------------------------------------
        MACRO
&lab    FSQRTX
&lab    FOPRF  FOSQRT
        MEND

;-----------------------------------------------------------
; Round to integer, according to the current rounding mode.
;-----------------------------------------------------------
        MACRO
&lab    FRINTX
&lab    FOPRF  FORTI
        MEND

;-----------------------------------------------------------
; Truncate to integer, using round toward zero.
;-----------------------------------------------------------
        MACRO
&lab    FTINTX
&lab    FOPRF   FOTTI
        MEND

;-----------------------------------------------------------
; Remainder.  
;-----------------------------------------------------------
        MACRO
&lab    FREMX
&lab    FOPRF   FFEXT+FOREM
        MEND

        MACRO
&lab    FREMD
&lab    FOPRF   FFDBL+FOREM
        MEND

        MACRO
&lab    FREMS
&lab    FOPRF   FFSGL+FOREM
        MEND

        MACRO
&lab    FREMC
&lab    FOPRF   FFCOMP+FOREM
        MEND

        MACRO
&lab    FREMI
&lab    FOPRF   FFINT+FOREM
        MEND

        MACRO
&lab    FREML
&lab    FOPRF   FFLNG+FOREM
        MEND

;-----------------------------------------------------------
; Logb. 
;-----------------------------------------------------------
        MACRO
&lab    FLOGBX
&lab    FOPRF   FOLOGB
        MEND

;-----------------------------------------------------------
; Scalb.  
;-----------------------------------------------------------
        MACRO
&lab    FSCALBX
&lab    FOPRF   FOSCALB
        MEND

;-----------------------------------------------------------
; Copy-sign.
;-----------------------------------------------------------
        MACRO
&lab    FCPYSGNX
&lab    FOPRF   FFEXT+FOCPYSGN
        MEND

        MACRO
&lab    FCPYSGND
&lab    FOPRF   FFDBL+FOCPYSGN
        MEND

        MACRO
&lab    FCPYSGNS
&lab    FOPRF   FFSGL+FOCPYSGN
        MEND

        MACRO
&lab    FCPYSGNC
&lab    FOPRF   FFCOMP+FOCPYSGN
        MEND

        MACRO
&lab    FCPYSGNI
&lab    FOPRF   FFINT+FOCPYSGN
        MEND

        MACRO
&lab    FCPYSGNL
&lab    FOPRF   FFLNG+FOCPYSGN
        MEND

;-----------------------------------------------------------
; Negate.
;-----------------------------------------------------------
        MACRO
&lab    FNEGX
&lab    FOPRF   FONEG
        MEND

;-----------------------------------------------------------
; Absolute value.
;-----------------------------------------------------------
        MACRO
&lab    FABSX
&lab    FOPRF   FOABS
        MEND

;-----------------------------------------------------------
; Next-after.  NOTE:  both operands are of the
; the same format, as specified by the usual suffix.
;-----------------------------------------------------------
        MACRO
&lab    FNEXTS
&lab    FOPRF   FFSGL+FONEXT
        MEND

        MACRO
&lab    FNEXTD
&lab    FOPRF   FFDBL+FONEXT
        MEND

        MACRO
&lab    FNEXTX
&lab    FOPRF   FFEXT+FONEXT
        MEND

;-----------------------------------------------------------
; Conversion to extended.
;-----------------------------------------------------------
        MACRO
&lab    FX2X
&lab    FOPRF   FFEXT+FOZ2X
        MEND

        MACRO
&lab    FD2X
&lab    FOPRF   FFDBL+FOZ2X
        MEND

        MACRO
&lab    FS2X
&lab    FOPRF   FFSGL+FOZ2X
        MEND

        MACRO                           ; 16-bit integer, by address
&lab    FI2X
&lab    FOPRF   FFINT+FOZ2X
        MEND

        MACRO                           ; 32-bit integer, by address
&lab    FL2X
&lab    FOPRF   FFLNG+FOZ2X
        MEND

        MACRO
&lab    FC2X
&lab    FOPRF   FFCOMP+FOZ2X
        MEND

;-----------------------------------------------------------
; Conversion from extended.
;-----------------------------------------------------------
        MACRO
&lab    FX2D
&lab    FOPRF   FFDBL+FOX2Z
        MEND

        MACRO
&lab    FX2S
&lab    FOPRF   FFSGL+FOX2Z
        MEND

        MACRO
&lab    FX2I
&lab    FOPRF   FFINT+FOX2Z
        MEND

        MACRO
&lab    FX2L
&lab    FOPRF   FFLNG+FOX2Z
        MEND

        MACRO
&lab    FX2C
&lab    FOPRF   FFCOMP+FOX2Z
        MEND

;-----------------------------------------------------------
; Binary to decimal conversion.
;-----------------------------------------------------------
        MACRO
&lab    FX2DEC
&lab    FOPRF   FFEXT+FOB2D
        MEND

        MACRO
&lab    FD2DEC
&lab    FOPRF   FFDBL+FOB2D
        MEND

        MACRO
&lab    FS2DEC
&lab    FOPRF   FFSGL+FOB2D
        MEND

        MACRO
&lab    FC2DEC
&lab    FOPRF   FFCOMP+FOB2D
        MEND

        MACRO
&lab    FI2DEC
&lab    FOPRF   FFINT+FOB2D
        MEND

        MACRO
&lab    FL2DEC
&lab    FOPRF   FFLNG+FOB2D
        MEND

;-----------------------------------------------------------
; Decimal to binary conversion.
;-----------------------------------------------------------
        MACRO
&lab    FDEC2X
&lab    FOPRF   FFEXT+FOD2B
        MEND

        MACRO
&lab    FDEC2D
&lab    FOPRF   FFDBL+FOD2B
        MEND

        MACRO
&lab    FDEC2S
&lab    FOPRF   FFSGL+FOD2B
        MEND

        MACRO
&lab    FDEC2C
&lab    FOPRF   FFCOMP+FOD2B
        MEND

        MACRO
&lab    FDEC2I
&lab    FOPRF   FFINT+FOD2B
        MEND

        MACRO
&lab    FDEC2L
&lab    FOPRF   FFLNG+FOD2B
        MEND

;-----------------------------------------------------------
; Compare, not signaling invalid on unordered.
;-----------------------------------------------------------
        MACRO
&lab    FCMPX
&lab    FOPRF   FFEXT+FOCMP
        MEND

        MACRO
&lab    FCMPD
&lab    FOPRF   FFDBL+FOCMP
        MEND

        MACRO
&lab    FCMPS
&lab    FOPRF   FFSGL+FOCMP
        MEND

        MACRO
&lab    FCMPC
&lab    FOPRF   FFCOMP+FOCMP
        MEND

        MACRO
&lab    FCMPI
&lab    FOPRF   FFINT+FOCMP
        MEND

        MACRO
&lab    FCMPL
&lab    FOPRF   FFLNG+FOCMP
        MEND

;-----------------------------------------------------------
; Compare, signaling invalid on unordered.
;-----------------------------------------------------------
        MACRO
&lab    FCPXX
&lab    FOPRF   FFEXT+FOCPX
        MEND

        MACRO
&lab    FCPXD
&lab    FOPRF   FFDBL+FOCPX
        MEND

        MACRO
&lab    FCPXS
&lab    FOPRF   FFSGL+FOCPX
        MEND

        MACRO
&lab    FCPXC
&lab    FOPRF   FFCOMP+FOCPX
        MEND
       
        MACRO
&lab    FCPXI
&lab    FOPRF   FFINT+FOCPX
        MEND

        MACRO
&lab    FCPXL
&lab    FOPRF   FFLNG+FOCPX
        MEND

;-----------------------------------------------------------
; The following macros define a set of so-called floating
; branches.  They presume that the appropriate compare 
; operation, macro FCMPz or FCPXz, precedes.
;----------------------------------------------------------
        MACRO                           ; branch equal
&lab    FBEQ    &N1
&lab    BEQ     &N1
        MEND
       
        MACRO                           ; branch less
&lab    FBLT    &N1
&lab    BMI     &N1
        MEND
       
        MACRO                           ; branch less or equal
&lab    FBLE    &N1
&lab    BMI     &N1
        BEQ     &N1
        MEND
       
        MACRO                           ; branch greater
&lab    FBGT    &N1
&lab    BVS     &N1
        MEND
       
        MACRO                           ; branch greater or equal
&lab    FBGE    &N1
&lab    BVS     &N1
        BEQ     &N1
        MEND
       
        MACRO                           ; branch less or unordered
&lab    FBULT   &N1
&lab    BMI     &N1
        BVS     *+4
        BNE     &N1
        MEND
       
        MACRO                           ; branch unordered, less, or equal
&lab    FBULE   &N1
&lab    BMI     &N1
        BEQ     &N1
        BVC     &N1
        MEND
       
        MACRO                           ; branch unordered or greater
&lab    FBUGT   &N1
&lab    BVS     &N1
        BMI     *+4
        BNE     &N1
        MEND
       
        MACRO                           ; branch unordered, greater, or equal
&lab    FBUGE   &N1
&lab    BVS     &N1
        BEQ     &N1
        BPL     &N1
        MEND
       
        MACRO                           ; branch unordered
&lab    FBU     &N1
&lab    BVS     *+6
        BMI     *+4
        BNE     &N1 
        MEND
       
        MACRO                           ; branch ordered
&lab    FBO     &N1
&lab    BMI     &N1
        BVS     &N1
        BEQ     &N1
        MEND
       
        MACRO                           ; branch not equal
&lab    FBNE    &N1
&lab    BMI     &N1
        BVS     &N1
        BNE     &N1
        MEND
       
        MACRO                           ; branch unordered or equal
&lab    FBUE    &N1
&lab    BEQ     &N1
        BMI     *+4
        BVC     &N1
        MEND
       
        MACRO                           ; branch less or greater
&lab    FBLG    &N1
&lab    BMI     &N1
        BVS     &N1
        MEND

        MACRO
&lab    FCLASSS
&lab    FOPRF   FFSGL+FOCLASS
        MEND

        MACRO
&lab    FCLASSD
&lab    FOPRF   FFDBL+FOCLASS
        MEND

        MACRO
&lab    FCLASSX
&lab    FOPRF   FFEXT+FOCLASS
        MEND

        MACRO
&lab    FCLASSC
&lab    FOPRF   FFCOMP+FOCLASS
        MEND

        MACRO
&lab    FCLASSI
&lab    FOPRF   FFINT+FOCLASS
        MEND

        MACRO
&lab    FCLASSL
&lab    FOPRF   FFLNG+FOCLASS
        MEND

;-----------------------------------------------------------
; The following macros provide branches based on the 
; the result of a FCLASSz macro.
;-----------------------------------------------------------
        MACRO                           ; branch signaling NaN
&lab    FBSNAN  &N1
&lab    TXA
        ASL     A
        CMP     #2*FCSNAN
        BEQ     &N1
        MEND

        MACRO                           ; branch quiet NaN
&lab    FBQNAN  &N1
&lab    TXA
        ASL     A
        CMP     #2*FCQNAN
        BEQ     &N1
        MEND

        MACRO                           ; branch infinite
&lab    FBINF   &N1
&lab    TXA
        ASL     A
        CMP     #2*FCINF
        BEQ     &N1
        MEND

        MACRO                           ; branch zero
&lab    FBZERO  &N1
&lab    TXA
        ASL     A
        CMP     #2*FCZERO
        BEQ     &N1
        MEND

        MACRO                           ; branch normal
&lab    FBNORM  &N1
&lab    TXA
        ASL     A
        BEQ     &N1
        MEND

        MACRO                           ; branch denormal
&lab    FBDENORM &N1
&lab    TXA
        ASL     A
        CMP     #2*FCDENORM
        BEQ     &N1
        MEND

        MACRO                           ; branch non-zero num (norm or denorm)
&lab    FBNZENUM &N1
&lab    TXA
        XBA
        ASL     A
        BCC     &N1
        MEND
       
        MACRO                           ; branch number (zero, norm, or denorm)
&lab    FBNUM   &N1
&lab    TXA
        INC     A
        XBA
        ASL     A
        BCC     &N1
        MEND
       
        MACRO                           ; branch minus sign
&lab    FBMINUS &N1
&lab    BMI     &N1
        MEND

        MACRO                           ; branch plus sign
&lab    FBPLUS  &N1
&lab    BPL     &N1
        MEND

;-----------------------------------------------------------
; Get and set environment.
;-----------------------------------------------------------
        MACRO
&lab    FGETENV
&lab    FOPRF   FOGETENV
        MEND

        MACRO
&lab    FSETENV
&lab    FOPRF   FOSETENV
        MEND

;-----------------------------------------------------------
; Test and set exception. 
;-----------------------------------------------------------
        MACRO
&lab    FTESTXCP
&lab    FOPRF   FOTESTXCP
        MEND

        MACRO
&lab    FSETXCP
&lab    FOPRF   FOSETXCP
        MEND

;----------------------------------------------------------
; Procedure entry and exit.
;----------------------------------------------------------
        MACRO
&lab    FPROCENTRY
&lab    FOPRF   FOPROCENTRY
        MEND

        MACRO
&lab    FPROCEXIT
&lab    FOPRF   FOPROCEXIT
        MEND

;-----------------------------------------------------------
; Get and set halt vector.
;-----------------------------------------------------------
        MACRO
&lab    FGETHV
&lab    FOPRF   FOGETHV
        MEND

        MACRO
&lab    FSETHV
&lab    FOPRF   FOSETHV
        MEND
       
;-----------------------------------------------------------
; Elementary function macros.
;-----------------------------------------------------------
        MACRO                           ; natural (base-e) log
&lab    FLNX
&lab    FOPRE   FOLNX
        MEND

        MACRO                           ; base-2 log
&lab    FLOG2X
&lab    FOPRE   FOLOG2X
        MEND

        MACRO                           ; ln (1 + x)
&lab    FLN1X
&lab    FOPRE   FOLN1X
        MEND

        MACRO                           ; log2 (1 + x)
&lab    FLOG21X
&lab    FOPRE   FOLOG21X
        MEND

        MACRO                           ; base-e exponential
&lab    FEXPX
&lab    FOPRE   FOEXPX
        MEND

        MACRO                           ; base-2 exponential
&lab    FEXP2X
&lab    FOPRE   FOEXP2X
        MEND

        MACRO                           ; exp (x) - 1
&lab    FEXP1X
&lab    FOPRE   FOEXP1X
        MEND

        MACRO                           ; exp2 (x) - 1
&lab    FEXP21X
&lab    FOPRE   FOEXP21X
        MEND

        MACRO                           ; integer exponential
&lab    FXPWRI
&lab    FOPRE   FOXPWRI
        MEND

        MACRO                           ; general exponential
&lab    FXPWRY
&lab    FOPRE   FOXPWRY
        MEND

        MACRO                           ; compound
&lab    FCOMPOUND
&lab    FOPRE   FOCOMPOUND
        MEND

        MACRO                           ; annuity
&lab    FANNUITY
&lab    FOPRE   FOANNUITY
        MEND
       
        MACRO                           ; arctangent
&lab    FATANX
&lab    FOPRE   FOATANX
        MEND

        MACRO                           ; sine
&lab    FSINX
&lab    FOPRE   FOSINX
        MEND

        MACRO                           ; cosine
&lab    FCOSX
&lab    FOPRE   FOCOSX
        MEND

        MACRO                           ; tangent
&lab    FTANX
&lab    FOPRE   FOTANX
        MEND
       
        MACRO                           ; random number generator
&lab    FRANDX
&lab    FOPRE   FORANDX
        MEND
       
;-----------------------------------------------------------
; Scanner and formatter function macros.
;-----------------------------------------------------------
        MACRO                           ; Pascal string to decimal record
&lab    FPSTR2DEC
&lab    FOPRD   FOPSTR2DEC
        MEND
       
        MACRO                           ; C string to decimal record
&lab    FCSTR2DEC
&lab    FOPRD   FOCSTR2DEC
        MEND
       
        MACRO                           ; decimal record to (Pascal) string
&lab    FDEC2STR
&lab    FOPRD   FODEC2STR
        MEND

;-----------------------------------------------------------
; Auxiliary macros.
;-----------------------------------------------------------
        MACRO                           ; call FP
&lab    FOPRF   &N1
&lab    PEA     &N1
        LDX     #SANEtsNum+256*FPNum
        JSL     $E10000
        MEND

        MACRO                           ; call DecStr
&lab    FOPRD   &N1
&lab    PEA     &N1
        LDX     #SANEtsNum+256*DecStrNum
        JSL     $E10000
        MEND

        MACRO                           ; call Elems
&lab    FOPRE   &N1
&lab    PEA     &N1
        LDX     #SANEtsNum+256*ElemNum
        JSL     $E10000
        MEND
; File: M16.Scheduler
;
;
; Copyright Apple Computer, Inc. 1986, 1987
; All Rights Reserved
;
;

 MACRO
&lab _SchBootInit
&lab ldx #$0107
     jsl $E10000
 MEND

 MACRO
&lab _SchStartUp
&lab ldx #$0207
     jsl $E10000
 MEND

 MACRO
&lab _SchShutDown
&lab ldx #$0307
     jsl $E10000
 MEND

 MACRO
&lab _SchVersion
&lab ldx #$0407
     jsl $E10000
 MEND

 MACRO
&lab _SchReset
&lab ldx #$0507
     jsl $E10000
 MEND

 MACRO
&lab _SchStatus
&lab ldx #$0607
     jsl $E10000
 MEND

 MACRO
&lab _SchAddTask
&lab ldx #$0907
     jsl $E10000
 MEND

 MACRO
&lab _SchFlush
&lab ldx #$0A07
     jsl $E10000
 MEND

; File: M16.Scrap
;
;
; Copyright Apple Computer, Inc. 1986, 1987
; All Rights Reserved
;
;

 MACRO
&lab _ScrapBootInit
&lab ldx #$0116
     jsl $E10000
 MEND

 MACRO
&lab _ScrapStartUp
&lab ldx #$0216
     jsl $E10000
 MEND

 MACRO
&lab _ScrapShutDown
&lab ldx #$0316
     jsl $E10000
 MEND

 MACRO
&lab _ScrapVersion
&lab ldx #$0416
     jsl $E10000
 MEND

 MACRO
&lab _ScrapReset
&lab ldx #$0516
     jsl $E10000
 MEND

 MACRO
&lab _ScrapStatus
&lab ldx #$0616
     jsl $E10000
 MEND

 MACRO
&lab _GetScrap
&lab ldx #$0D16
     jsl $E10000
 MEND

 MACRO
&lab _GetScrapCount
&lab ldx #$1216
     jsl $E10000
 MEND

 MACRO
&lab _GetScrapHandle
&lab ldx #$0E16
     jsl $E10000
 MEND

 MACRO
&lab _GetScrapPath
&lab ldx #$1016
     jsl $E10000
 MEND

 MACRO
&lab _GetScrapSize
&lab ldx #$0F16
     jsl $E10000
 MEND

 MACRO
&lab _GetScrapState
&lab ldx #$1316
     jsl $E10000
 MEND

 MACRO
&lab _LoadScrap
&lab ldx #$0A16
     jsl $E10000
 MEND

 MACRO
&lab _PutScrap
&lab ldx #$0C16
     jsl $E10000
 MEND

 MACRO
&lab _SetScrapPath
&lab ldx #$1116
     jsl $E10000
 MEND

 MACRO
&lab _UnloadScrap
&lab ldx #$0916
     jsl $E10000
 MEND

 MACRO
&lab _ZeroScrap
&lab ldx #$0B16
     jsl $E10000
 MEND

; File: M16.Sound
;
;
; Copyright Apple Computer, Inc. 1986, 1987
; All Rights Reserved
;
;

 MACRO
&lab _SoundBootInit
&lab ldx #$0108
     jsl $E10000
 MEND

 MACRO
&lab _SoundStartUp
&lab ldx #$0208
     jsl $E10000
 MEND

 MACRO
&lab _SoundShutDown
&lab ldx #$0308
     jsl $E10000
 MEND

 MACRO
&lab _SoundVersion
&lab ldx #$0408
     jsl $E10000
 MEND

 MACRO
&lab _SoundReset
&lab ldx #$0508
     jsl $E10000
 MEND

 MACRO
&lab _SoundToolStatus
&lab ldx #$0608
     jsl $E10000
 MEND

 MACRO
&lab _FFGeneratorStatus
&lab ldx #$1108
     jsl $E10000
 MEND

 MACRO
&lab _FFSoundDoneStatus
&lab ldx #$1408
     jsl $E10000
 MEND

 MACRO
&lab _FFSoundStatus
&lab ldx #$1008
     jsl $E10000
 MEND

 MACRO
&lab _FFStartSound
&lab ldx #$0E08
     jsl $E10000
 MEND

 MACRO
&lab _FFStopSound
&lab ldx #$0F08
     jsl $E10000
 MEND

 MACRO
&lab _GetSoundVolume
&lab ldx #$0C08
     jsl $E10000
 MEND

 MACRO
&lab _GetTableAddress
&lab ldx #$0B08
     jsl $E10000
 MEND

 MACRO
&lab _ReadRamBlock
&lab ldx #$0A08
     jsl $E10000
 MEND

 MACRO
&lab _SetSoundMIRQV
&lab ldx #$1208
     jsl $E10000
 MEND

 MACRO
&lab _SetSoundVolume
&lab ldx #$0D08
     jsl $E10000
 MEND

 MACRO
&lab _SetUserSoundIRQV
&lab ldx #$1308
     jsl $E10000
 MEND

 MACRO
&lab _WriteRamBlock
&lab ldx #$0908
     jsl $E10000
 MEND

; File: M16.StdFile
;
;
; Copyright Apple Computer, Inc. 1986, 1987
; All Rights Reserved
;
;

 MACRO
&lab _SFBootInit
&lab ldx #$0117
     jsl $E10000
 MEND

 MACRO
&lab _SFStartUp
&lab ldx #$0217
     jsl $E10000
 MEND

 MACRO
&lab _SFShutDown
&lab ldx #$0317
     jsl $E10000
 MEND

 MACRO
&lab _SFVersion
&lab ldx #$0417
     jsl $E10000
 MEND

 MACRO
&lab _SFReset
&lab ldx #$0517
     jsl $E10000
 MEND

 MACRO
&lab _SFStatus
&lab ldx #$0617
     jsl $E10000
 MEND

 MACRO
&lab _SFAllCaps
&lab ldx #$0D17
     jsl $E10000
 MEND

 MACRO
&lab _SFGetFile
&lab ldx #$0917
     jsl $E10000
 MEND

 MACRO
&lab _SFPGetFile
&lab ldx #$0B17
     jsl $E10000
 MEND

 MACRO
&lab _SFPPutFile
&lab ldx #$0C17
     jsl $E10000
 MEND

 MACRO
&lab _SFPutFile
&lab ldx #$0A17
     jsl $E10000
 MEND

; File:  M16.SysCalls 
; 
; 
; Copyright Apple computer, Inc.  1988 
; All Rights Reserved 
; 
; 
 


  MACRO 
&lab _AllocInterrupt_C0 &params 
&lab jsl $E100A8 
 dc i2"$0031" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _BindIntGS &params 
&lab jsl $E100A8 
 dc i2"$2031" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _ChangePath_C0 &params 
&lab jsl $E100A8 
 dc i2"$0004" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _ChangePathGS &params 
&lab jsl $E100A8 
 dc i2"$2004" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _ClearBackupBit_C0 &params 
&lab jsl $E100A8 
 dc i2"$000B" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _ClearBackupBitGS &params 
&lab jsl $E100A8 
 dc i2"$200B" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _Close_C0 &params 
&lab jsl $E100A8 
 dc i2"$0014" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _CloseGS &params 
&lab jsl $E100A8 
 dc i2"$2014" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _Create_C0 &params 
&lab jsl $E100A8 
 dc i2"$0001" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _CreateGS &params 
&lab jsl $E100A8 
 dc i2"$2001" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _DControlGS &params 
&lab jsl $E100A8 
 dc i2"$202E" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _DeallocInterrupt_C0 &params 
&lab jsl $E100A8 
 dc i2"$0032" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _Destroy_C0 &params 
&lab jsl $E100A8 
 dc i2"$0002" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _DestroyGS &params 
&lab jsl $E100A8 
 dc i2"$2002" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _DInfo_C0 &params 
&lab jsl $E100A8 
 dc i2"$002C" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _DInfoGS &params 
&lab jsl $E100A8 
 dc i2"$202C" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _DReadGS &params 
&lab jsl $E100A8 
 dc i2"$202F" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _DStatusGS &params 
&lab jsl $E100A8 
 dc i2"$202D" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _DWriteGS &params 
&lab jsl $E100A8 
 dc i2"$2030" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _EraseDisk_C0 &params 
&lab jsl $E100A8 
 dc i2"$0025" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _EraseDiskGS &params 
&lab jsl $E100A8 
 dc i2"$2025" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _ExpandPathGS &params 
&lab jsl $E100A8 
 dc i2"$200E" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _Flush_C0 &params 
&lab jsl $E100A8 
 dc i2"$0015" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _FlushGS &params 
&lab jsl $E100A8 
 dc i2"$2015" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _Format_C0 &params 
&lab jsl $E100A8 
 dc i2"$0024" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _FormatGS &params 
&lab jsl $E100A8 
 dc i2"$2024" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _GetBootVol_C0 &params 
&lab jsl $E100A8 
 dc i2"$0027" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _GetBootVolGS &params 
&lab jsl $E100A8 
 dc i2"$2028" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _GetDevNumber_C0 &params 
&lab jsl $E100A8 
 dc i2"$0020" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _GetDevNumberGS &params 
&lab jsl $E100A8 
 dc i2"$2020" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _GetDirEntry_C0 &params 
&lab jsl $E100A8 
 dc i2"$001C" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _GetDirEntryGS &params 
&lab jsl $E100A8 
 dc i2"$201C" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _GetEOF_C0 &params 
&lab jsl $E100A8 
 dc i2"$0019" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _GetEOFGS &params 
&lab jsl $E100A8 
 dc i2"$2019" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _GetFileInfo_C0 &params 
&lab jsl $E100A8 
 dc i2"$0006" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _GetFileInfoGS &params 
&lab jsl $E100A8 
 dc i2"$2006" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _GetFSTInfoGS &params 
&lab jsl $E100A8 
 dc i2"$202B" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _GetLastDev_C0 &params 
&lab jsl $E100A8 
 dc i2"$0021" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _GetLevel_C0 &params 
&lab jsl $E100A8 
 dc i2"$001B" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _GetLevelGS &params 
&lab jsl $E100A8 
 dc i2"$201B" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _GetMark_C0 &params 
&lab jsl $E100A8 
 dc i2"$0017" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _GetMarkGS &params 
&lab jsl $E100A8 
 dc i2"$2017" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _Getname_C0 &params 
&lab jsl $E100A8 
 dc i2"$0027" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _GetNameGS &params 
&lab jsl $E100A8 
 dc i2"$2027" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _GetPrefix_C0 &params 
&lab jsl $E100A8 
 dc i2"$000A" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _GetPrefixGS &params 
&lab jsl $E100A8 
 dc i2"$200A" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _GetVersion_C0 &params 
&lab jsl $E100A8 
 dc i2"$002A" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _GetVersionGS &params 
&lab jsl $E100A8 
 dc i2"$202A" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _Newline_C0 &params 
&lab jsl $E100A8 
 dc i2"$0011" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _NewlineGS &params 
&lab jsl $E100A8 
 dc i2"$2011" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _NullGS &params 
&lab jsl $E100A8 
 dc i2"$200D" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _Open_C0 &params 
&lab jsl $E100A8 
 dc i2"$0010" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _OpenGS &params 
&lab jsl $E100A8 
 dc i2"$2010" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _Quit_C0 &params 
&lab jsl $E100A8 
 dc i2"$0029" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _QuitGS &params 
&lab jsl $E100A8 
 dc i2"$2029" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _ReadBlock_C0 &params 
&lab jsl $E100A8 
 dc i2"$0022" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _Read_C0 &params 
&lab jsl $E100A8 
 dc i2"$0012" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _ReadGS &params 
&lab jsl $E100A8 
 dc i2"$2012" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _SetEOF_C0 &params 
&lab jsl $E100A8 
 dc i2"$0018" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _SetEOFGS &params 
&lab jsl $E100A8 
 dc i2"$2018" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _SetFileInfo_C0 &params 
&lab jsl $E100A8 
 dc i2"$0005" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _SetFileInfoGS &params 
&lab jsl $E100A8 
 dc i2"$2005" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _SetLevel_C0 &params 
&lab jsl $E100A8 
 dc i2"$001A" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _SetLevelGS &params 
&lab jsl $E100A8 
 dc i2"$201A" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _SetMark_C0 &params 
&lab jsl $E100A8 
 dc i2"$0016" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _SetMarkGS &params 
&lab jsl $E100A8 
 dc i2"$2016" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _SetPrefix_C0 &params 
&lab jsl $E100A8 
 dc i2"$0009" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _SetPrefixGS &params 
&lab jsl $E100A8 
 dc i2"$2009" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _UnbindIntGS &params 
&lab jsl $E100A8 
 dc i2"$2032" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _Volume_C0 &params 
&lab jsl $E100A8 
 dc i2"$0008" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _VolumeGS &params 
&lab jsl $E100A8 
 dc i2"$2008" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _WriteBlock_C0 &params 
&lab jsl $E100A8 
 dc i2"$0023" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _Write_C0 &params 
&lab jsl $E100A8 
 dc i2"$0013" 
 dc i4"&params" 
  MEND 

  MACRO 
&lab _WriteGS &params 
&lab jsl $E100A8 
 dc i2"$2013" 
 dc i4"&params" 
  MEND 


; File: M16.Textool
;
;
; Copyright Apple Computer, Inc. 1986, 1987
; All Rights Reserved
;
;

 MACRO
&lab _TextBootInit
&lab ldx #$010C
     jsl $E10000
 MEND

 MACRO
&lab _TextStartUp
&lab ldx #$020C
     jsl $E10000
 MEND

 MACRO
&lab _TextShutDown
&lab ldx #$030C
     jsl $E10000
 MEND

 MACRO
&lab _TextVersion
&lab ldx #$040C
     jsl $E10000
 MEND

 MACRO
&lab _TextReset
&lab ldx #$050C
     jsl $E10000
 MEND

 MACRO
&lab _TextStatus
&lab ldx #$060C
     jsl $E10000
 MEND

 MACRO
&lab _CtlTextDev
&lab ldx #$160C
     jsl $E10000
 MEND

 MACRO
&lab _ErrWriteBlock
&lab ldx #$1F0C
     jsl $E10000
 MEND

 MACRO
&lab _ErrWriteChar
&lab ldx #$190C
     jsl $E10000
 MEND

 MACRO
&lab _ErrWriteCString
&lab ldx #$210C
     jsl $E10000
 MEND

 MACRO
&lab _ErrWriteLine
&lab ldx #$1B0C
     jsl $E10000
 MEND

 MACRO
&lab _ErrWriteString
&lab ldx #$1D0C
     jsl $E10000
 MEND

 MACRO
&lab _GetErrGlobals
&lab ldx #$0E0C
     jsl $E10000
 MEND

 MACRO
&lab _GetErrorDevice
&lab ldx #$140C
     jsl $E10000
 MEND

 MACRO
&lab _GetInGlobals
&lab ldx #$0C0C
     jsl $E10000
 MEND

 MACRO
&lab _GetInputDevice
&lab ldx #$120C
     jsl $E10000
 MEND

 MACRO
&lab _GetOutGlobals
&lab ldx #$0D0C
     jsl $E10000
 MEND

 MACRO
&lab _GetOutputDevice
&lab ldx #$130C
     jsl $E10000
 MEND

 MACRO
&lab _InitTextDev
&lab ldx #$150C
     jsl $E10000
 MEND

 MACRO
&lab _ReadChar
&lab ldx #$220C
     jsl $E10000
 MEND

 MACRO
&lab _ReadLine
&lab ldx #$240C
     jsl $E10000
 MEND

 MACRO
&lab _SetErrGlobals
&lab ldx #$0B0C
     jsl $E10000
 MEND

 MACRO
&lab _SetErrorDevice
&lab ldx #$110C
     jsl $E10000
 MEND

 MACRO
&lab _SetInGlobals
&lab ldx #$090C
     jsl $E10000
 MEND

 MACRO
&lab _SetInputDevice
&lab ldx #$0F0C
     jsl $E10000
 MEND

 MACRO
&lab _SetOutGlobals
&lab ldx #$0A0C
     jsl $E10000
 MEND

 MACRO
&lab _SetOutputDevice
&lab ldx #$100C
     jsl $E10000
 MEND

 MACRO
&lab _StatusTextDev
&lab ldx #$170C
     jsl $E10000
 MEND

 MACRO
&lab _TextReadBlock
&lab ldx #$230C
     jsl $E10000
 MEND

 MACRO
&lab _TextWriteBlock
&lab ldx #$1E0C
     jsl $E10000
 MEND

 MACRO
&lab _WriteChar
&lab ldx #$180C
     jsl $E10000
 MEND

 MACRO
&lab _WriteCString
&lab ldx #$200C
     jsl $E10000
 MEND

 MACRO
&lab _WriteLine
&lab ldx #$1A0C
     jsl $E10000
 MEND

 MACRO
&lab _WriteString
&lab ldx #$1C0C
     jsl $E10000
 MEND

; File: M16.Window
;
;
; Copyright Apple Computer, Inc. 1986, 1987
; All Rights Reserved
;
;

 MACRO
&lab _WindBootInit
&lab ldx #$010E
     jsl $E10000
 MEND

 MACRO
&lab _WindStartUp
&lab ldx #$020E
     jsl $E10000
 MEND

 MACRO
&lab _WindShutDown
&lab ldx #$030E
     jsl $E10000
 MEND

 MACRO
&lab _WindVersion
&lab ldx #$040E
     jsl $E10000
 MEND

 MACRO
&lab _WindReset
&lab ldx #$050E
     jsl $E10000
 MEND

 MACRO
&lab _WindStatus
&lab ldx #$060E
     jsl $E10000
 MEND

 MACRO
&lab _BeginUpdate
&lab ldx #$1E0E
     jsl $E10000
 MEND

 MACRO
&lab _BringToFront
&lab ldx #$240E
     jsl $E10000
 MEND

 MACRO
&lab _CheckUpdate
&lab ldx #$0A0E
     jsl $E10000
 MEND

 MACRO
&lab _CloseWindow
&lab ldx #$0B0E
     jsl $E10000
 MEND

 MACRO
&lab _Desktop
&lab ldx #$0C0E
     jsl $E10000
 MEND

 MACRO
&lab _DragWindow
&lab ldx #$1A0E
     jsl $E10000
 MEND

 MACRO
&lab _EndInfoDrawing
&lab ldx #$510E
     jsl $E10000
 MEND

 MACRO
&lab _EndUpdate
&lab ldx #$1F0E
     jsl $E10000
 MEND

 MACRO
&lab _FindWindow
&lab ldx #$170E
     jsl $E10000
 MEND

 MACRO
&lab _FrontWindow
&lab ldx #$150E
     jsl $E10000
 MEND

 MACRO
&lab _GetContentDraw
&lab ldx #$480E
     jsl $E10000
 MEND

 MACRO
&lab _GetContentOrigin
&lab ldx #$3E0E
     jsl $E10000
 MEND

 MACRO
&lab _GetContentRgn
&lab ldx #$2F0E
     jsl $E10000
 MEND

 MACRO
&lab _GetDataSize
&lab ldx #$400E
     jsl $E10000
 MEND

 MACRO
&lab _GetDefProc
&lab ldx #$310E
     jsl $E10000
 MEND

 MACRO
&lab _GetFirstWindow
&lab ldx #$520E
     jsl $E10000
 MEND

 MACRO
&lab _GetFrameColor
&lab ldx #$100E
     jsl $E10000
 MEND

 MACRO
&lab _GetInfoDraw
&lab ldx #$4A0E
     jsl $E10000
 MEND

 MACRO
&lab _GetInfoRefCon
&lab ldx #$350E
     jsl $E10000
 MEND

 MACRO
&lab _GetMaxGrow
&lab ldx #$420E
     jsl $E10000
 MEND

 MACRO
&lab _GetNextWindow
&lab ldx #$2A0E
     jsl $E10000
 MEND

 MACRO
&lab _GetPage
&lab ldx #$460E
     jsl $E10000
 MEND

 MACRO
&lab _GetRectInfo
&lab ldx #$4F0E
     jsl $E10000
 MEND

 MACRO
&lab _GetScroll
&lab ldx #$440E
     jsl $E10000
 MEND

 MACRO
&lab _GetStructRgn
&lab ldx #$2E0E
     jsl $E10000
 MEND

 MACRO
&lab _GetSysWFlag
&lab ldx #$4C0E
     jsl $E10000
 MEND

 MACRO
&lab _GetUpdateRgn
&lab ldx #$300E
     jsl $E10000
 MEND

 MACRO
&lab _GetWControls
&lab ldx #$330E
     jsl $E10000
 MEND

 MACRO
&lab _GetWFrame
&lab ldx #$2C0E
     jsl $E10000
 MEND

 MACRO
&lab _GetWKind
&lab ldx #$2B0E
     jsl $E10000
 MEND

 MACRO
&lab _GetWMgrPort
&lab ldx #$200E
     jsl $E10000
 MEND

 MACRO
&lab _GetWRefCon
&lab ldx #$290E
     jsl $E10000
 MEND

 MACRO
&lab _GetWTitle
&lab ldx #$0E0E
     jsl $E10000
 MEND

 MACRO
&lab _GetZoomRect
&lab ldx #$370E
     jsl $E10000
 MEND

 MACRO
&lab _GrowWindow
&lab ldx #$1B0E
     jsl $E10000
 MEND

 MACRO
&lab _HideWindow
&lab ldx #$120E
     jsl $E10000
 MEND

 MACRO
&lab _HiliteWindow
&lab ldx #$220E
     jsl $E10000
 MEND

 MACRO
&lab _InvalRect
&lab ldx #$3A0E
     jsl $E10000
 MEND

 MACRO
&lab _InvalRgn
&lab ldx #$3B0E
     jsl $E10000
 MEND

 MACRO
&lab _MoveWindow
&lab ldx #$190E
     jsl $E10000
 MEND

 MACRO
&lab _NewWindow
&lab ldx #$090E
     jsl $E10000
 MEND

 MACRO
&lab _PinRect
&lab ldx #$210E
     jsl $E10000
 MEND

 MACRO
&lab _RefreshDesktop
&lab ldx #$390E
     jsl $E10000
 MEND

 MACRO
&lab _SelectWindow
&lab ldx #$110E
     jsl $E10000
 MEND

 MACRO
&lab _SendBehind
&lab ldx #$140E
     jsl $E10000
 MEND

 MACRO
&lab _SetContentDraw
&lab ldx #$490E
     jsl $E10000
 MEND

 MACRO
&lab _SetContentOrigin
&lab ldx #$3F0E
     jsl $E10000
 MEND

 MACRO
&lab _SetContentOrigin2
&lab ldx #$570E
     jsl $E10000
 MEND

 MACRO
&lab _SetDataSize
&lab ldx #$410E
     jsl $E10000
 MEND

 MACRO
&lab _SetDefProc
&lab ldx #$320E
     jsl $E10000
 MEND

 MACRO
&lab _SetFrameColor
&lab ldx #$0F0E
     jsl $E10000
 MEND

 MACRO
&lab _SetInfoDraw
&lab ldx #$160E
     jsl $E10000
 MEND

 MACRO
&lab _SetInfoRefCon
&lab ldx #$360E
     jsl $E10000
 MEND

 MACRO
&lab _SetMaxGrow
&lab ldx #$430E
     jsl $E10000
 MEND

 MACRO
&lab _SetOriginMask
&lab ldx #$340E
     jsl $E10000
 MEND

 MACRO
&lab _SetPage
&lab ldx #$470E
     jsl $E10000
 MEND

 MACRO
&lab _SetScroll
&lab ldx #$450E
     jsl $E10000
 MEND

 MACRO
&lab _SetSysWindow
&lab ldx #$4B0E
     jsl $E10000
 MEND

 MACRO
&lab _SetWFrame
&lab ldx #$2D0E
     jsl $E10000
 MEND

 MACRO
&lab _SetWindowIcons
&lab ldx #$4E0E
     jsl $E10000
 MEND

 MACRO
&lab _SetWRefCon
&lab ldx #$280E
     jsl $E10000
 MEND

 MACRO
&lab _SetWTitle
&lab ldx #$0D0E
     jsl $E10000
 MEND

 MACRO
&lab _SetZoomRect
&lab ldx #$380E
     jsl $E10000
 MEND

 MACRO
&lab _ShowHide
&lab ldx #$230E
     jsl $E10000
 MEND

 MACRO
&lab _ShowWindow
&lab ldx #$130E
     jsl $E10000
 MEND

 MACRO
&lab _SizeWindow
&lab ldx #$1C0E
     jsl $E10000
 MEND

 MACRO
&lab _StartDrawing
&lab ldx #$4D0E
     jsl $E10000
 MEND

 MACRO
&lab _StartInfoDrawing
&lab ldx #$500E
     jsl $E10000
 MEND

 MACRO
&lab _TaskMaster
&lab ldx #$1D0E
     jsl $E10000
 MEND

 MACRO
&lab _TrackGoAway
&lab ldx #$180E
     jsl $E10000
 MEND

 MACRO
&lab _TrackZoom
&lab ldx #$260E
     jsl $E10000
 MEND

 MACRO
&lab _ValidRect
&lab ldx #$3C0E
     jsl $E10000
 MEND

 MACRO
&lab _ValidRgn
&lab ldx #$3D0E
     jsl $E10000
 MEND

 MACRO
&lab _WindDragRect
&lab ldx #$530E
     jsl $E10000
 MEND

 MACRO
&lab _WindNewRes
&lab ldx #$250E
     jsl $E10000
 MEND

 MACRO
&lab _WindowGlobal
&lab ldx #$560E
     jsl $E10000
 MEND

 MACRO
&lab _ZoomWindow
&lab ldx #$270E
     jsl $E10000
 MEND

 MACRO
&lab _GetWindowMgrGlobals
&lab ldx #$580E
     jsl $E10000
 MEND
 MACRO
&lab _StartFrameDrawing
&lab ldx #$5A0E
     jsl $E10000
 MEND
 MACRO
&lab _EndFrameDrawing
&lab ldx #$5B0E
     jsl $E10000
 MEND
 MACRO
&lab _DrawInfoBar
&lab ldx #$550E
     jsl $E10000
 MEND
 MACRO
&lab _ResizeWindow
&lab ldx #$5C0E
     jsl $E10000
 MEND
 MACRO
&lab _AlertWindow
&lab ldx #$590E
     jsl $E10000
 MEND
; File: M16.ALIAS
;
;
; Copyright Apple Computer, Inc. 1986
; All Rights Reserved
;


; Memory Manager Aliases

 MACRO
&lab _DisposHandle
&lab ldx #2+256*16
 jsl $E10000
 MEND


; QuickDraw Aliases

 MACRO
&lab _PenSize
&lab ldx #4+256*44
 jsl $E10000
 MEND
 
 MACRO
&lab _PenMode
&lab ldx #4+256*46
 jsl $E10000
 MEND
 
 MACRO
&lab _PenPat
&lab ldx #4+256*48
 jsl $E10000
 MEND
 
 MACRO
&lab _BackPat
&lab ldx #4+256*52
 jsl $E10000
 MEND
 
 MACRO
&lab _TextFace
&lab ldx #4+256*154
 jsl $E10000
 MEND
 
 MACRO
&lab _TextMode
&lab ldx #4+256*156
 jsl $E10000
 MEND
 
 MACRO
&lab _SpaceExtra
&lab ldx #4+256*158
 jsl $E10000
 MEND

 MACRO
&lab _TextSize
&lab ldx #4+256*210
 jsl $E10000
 MEND



	MACRO
&lab	_SysDeath
&lab	ldx #$1503
	jsl $E10000
	MEND

	MACRO
&lab	_SysDeathMgr
&lab	ldx #$1503
	jsl $E10000
	MEND

	MACRO
&lab	_SystemDeath
&lab	ldx #$1503
	jsl $E10000
	MEND

;..............................................................................
;
;   StyleWare Macros`
;
;   Macros...:     AddWord, AddLong, SubWord, SubLong
;   Author...:     Mike Hibbetts, (2.0 conversion Scott Lindsey)
;   Date.....:     June 30, 1987 ... Oct 22,1988
;   Version..:     2.0
;
;        The following is a short description of the available addressing
;   modes that may be used with the math macros in m16.math.
;
;   Notes:    'a', 'x', and 'y' denote the 65816 registers.
;             's' denotes that an operand is to be either pulled or pushed.
;
;        For programmer based optimization, it should be noted that all zero
;   page indirect indexing is done out of the 'y' register, and all other
;   indexing is done out of the 'x' register. So, for example,
;
;                            AddLong   Addr:#4,[zp]:#4,>Long
;   is better coded as
;                            ldy       #4
;                            AddLong   Addr:y,[zp]:y,>Long,
;                                      (it saves on 1 'ldx')
;   and
;
;                            SubLong   Addr1:#offset1,>Long:#offset2,Addr3
;   is better coded as
;                            ldy       #offset2
;                            SubLong   Addr1:#offset1,>Long:y,Addr3.
;                                      (it saves on 3 'ldx' and costs 1 'ldy')
;
;        All other optimizations have been done internally to the macros.
;.............................................................................
;
;   Where
;
;   P = { Addr, Addr:#offset, Addr:offset, Addr:x, Addr:y,
;         [zp], [zp]:#offset, [zp]:offset, [zp]:y, zp:s
;         Long, Long:#offset, Long:offset, Long:x, s       },
;
;   Q = { a, x, y, #const } + P,
;
;   R = { #const } + P, and
;
;   T = { a, x, y } + P,
;
;        all
;
;                  AddWord   Q,R,T
;                  AddLong   Q,R,P
;                  SubWord   Q,R,T
;                  SubLong   Q,R,P
;
;                                      are allowed.
;
;-----------------------------------------------------------------------------
    MACRO
&lab     AddWord   &term1,&term2,&dest
&lab	; 
         Arith     2,adc,clc,&term1,&term2,&dest
    MEND
;----------------------------------------------------------------------------
    MACRO
&lab     AddLong   &term1,&term2,&dest
&lab	; 
         Arith     4,adc,clc,&term1,&term2,&dest
    MEND
;----------------------------------------------------------------------------
    MACRO
&lab     SubWord   &term1,&term2,&dest
&lab	; 
         Arith     2,sbc,sec,&term1,&term2,&dest
    MEND
;----------------------------------------------------------------------------
    MACRO
&lab     SubLong   &term1,&term2,&dest
&lab	; 
         Arith     4,sbc,sec,&term1,&term2,&dest
    MEND
;----------------------------------------------------------------------------
    MACRO
         Arith     &length,&op1,&op2,&term1,&term2,&dest

		 lcla      &same
         gbla      &Yinc
         gblc      &lastX
         lclc      &lastY
         lcla      &colon
         lcla      &stack1
         lcla      &pull1
         lcla      &pull2
         lcla      &OFFinc
         lcla      &zp1
         lcla      &zp2
         lcla      &zp3
         gblc      &pushed
         lclc      &addr1
         lclc      &off1
         lclc      &addr2
         lclc      &off2
         lclc      &addr3
         lclc      &off3
         lclc      &badreg
&badreg  SETC      'y'
         lclc      &jump1
         lclc      &jump2
         lclc      &jump3
		IF	&substr(&term1,1,1)­'[' GOTO .doterm12
&zp1     seta      1
.doterm12
&colon   seta      &pos(':',&term1)
		IF	&colon=0 GOTO .no1offset
&off1    SETC      &substr(&term1,&colon+1,&len(&term1)-&colon)
&addr1   SETC      &substr(&term1,1,&colon-1)
		GOTO .doterm21

.no1offset
&addr1   SETC      &term1
.doterm21
		IF	&substr(&term2,1,1)­'[' GOTO .doterm22
&zp2     seta      1
.doterm22
&colon   seta      &pos(':',&term2)
		IF	&colon=0 GOTO .no2offset
&off2    SETC      &substr(&term2,&colon+1,&len(&term2)-&colon)
&addr2   SETC      &substr(&term2,1,&colon-1)
		GOTO .dodest1

.no2offset
&addr2   SETC      &term2
.dodest1
		IF	&substr(&dest,1,1)­'[' GOTO .dodest2
&zp3     seta      1
&badreg  SETC      'x'
.dodest2
&colon   seta      &pos(':',&dest)
		IF	&colon=0 GOTO .no3offset
&off3    SETC      &substr(&dest,&colon+1,&len(&dest)-&colon)
&addr3   SETC      &substr(&dest,1,&colon-1)
		IF	&off3­'y' GOTO .start
&badreg  SETC      'x'
		GOTO .start

.no3offset
&addr3   SETC      &dest
		IF	&addr3­'y' GOTO .start
&badreg  SETC      'x'
.start
		IF	&zp1 GOTO .loadzp1
		IF	&len(&off1) GOTO .withoff11
		IF	&addr1='a' GOTO .loadR1
		IF	&addr1='x' GOTO .loadx1
		IF	&addr1='y' GOTO .loady1
		IF	&addr1='s' GOTO .loads1
         lda       &addr1
&jump1   SETC      '.load2'
		GOTO .loaded1

;        -----------------
.loadx1
         txa
		GOTO .loadR1

.loady1
         tya
.loadR1
&jump1   SETC      '.loadR2'
		GOTO .loaded1

;        -----------------
.loads1
		IF	&off2='s' GOTO .loads12
		IF	&off3='s' GOTO .loads12
		IF	&length='2' GOTO .loads11
&stack1  seta      1
.loads11
         pla
&jump1   SETC      '.loads2'
		GOTO .loaded1

;        -----------------
.loads12
         lda       1,s
&jump1   SETC      '.loads22'
&pull1   seta      1
		GOTO .loaded1

;        -----------------
.loadzp1
		IF	&len(&off1) GOTO .loadzpo1
         lda       &addr1
&jump1   SETC      '.loadzp2'
		GOTO .loaded1

;        -----------------
.loadzpo1
		IF	&off1='y' GOTO .loadzpy1
&jump1   SETC      '.loadzpo2'
		IF	(&off2­'y') and (&off3­'y') GOTO .loadzpo12
         phy
&pushed  SETC      'y'
&jump1   SETC      '.loadzpo22'
.loadzpo12
         ldy       &off1
         lda       &addr1,y
&lastY   SETC      &off1
		GOTO .loaded1

;        ------------------
.loadzpy1
         lda       &addr1,&off1
&jump1   SETC      '.loadzpy2'
		GOTO .loaded1

;        ------------------
.withoff11
		IF	&off1='x' GOTO .loffx1
		IF	&off1='y' GOTO .loffy1
		IF	&off1='s' GOTO .loffs1
&jump1   SETC      '.loadoff2'
		IF	(&off2­'x') and (&off3­'x') GOTO .withoff112
         phx
&pushed  SETC      'x'
&jump1   SETC      '.loadoff22'
.withoff112
         ldx       &off1
         lda       &addr1,x
&lastX   SETC      &off1
		GOTO .loaded1

;        -----------------
.loffx1
         lda       &addr1,x
&jump1   SETC      '.loffx2'
		GOTO .loaded1

;        -------------------
.loffy1
         lda       &addr1,y
&jump1   SETC      '.loffy2'
		GOTO .loaded1

;        -------------------
.loffs1
         lda       &addr1,s
&jump1   SETC      '.loffs2'
.loaded1
         &op2
		IF	&zp2 GOTO .addzp1
		IF	&len(&off2) GOTO .withoff12
		IF	&addr2='s' GOTO .adds11
         &op1      &addr2
&jump2   SETC      '.add2'
		GOTO .added1

;        -----------------
.adds11
         STreset
&pull2   seta      1
		IF	&pull1 GOTO .adds12
		IF	&stack1 GOTO .adds13
         &op1      1,s
&jump2   SETC      '.adds21'
		GOTO .added1

;        -----------------
.adds12
         &op1      1+&length,s
&jump2   SETC      '.adds22'
		GOTO .added1

;        -----------------
.adds13
         &op1      3,s
&jump2   SETC      '.adds21'
		GOTO .added1

;        -----------------
.addzp1
		IF	&len(&off2) GOTO .addzpo1
         &op1      &addr2
&jump2   SETC      '.addzp2'
		GOTO .added1

;        -----------------
.addzpo1
		IF	&off2='y' GOTO .addzpy1
		IF	&len(&pushed) GOTO .addzpo12
		IF	&off3='y' GOTO .addzpo11
		IF	(&off1­'y') or (&length='2') GOTO .addzpo12
.addzpo11
         phy
&pushed  SETC      'y'
.addzpo12
         DoLoad      1,y,&off2
         &op1      &addr2,y
&jump2   SETC      '.addzpo2'
		GOTO .added1

;        ------------------
.addzpy1
		IF	&pushed­'y' GOTO .loadzpy12
         ply
&pushed  SETC      ''
&lastY   SETC      ''
.loadzpy12
         &op1      &addr2,&off2
&jump2   SETC      '.addzpy2'
		GOTO .added1

;        ------------------
.withoff12
		IF	&off2='x' GOTO .aoffx1
		IF	&off2='y' GOTO .aoffy1
		IF	&off2='s' GOTO .aoffs1
		IF	&len(&pushed) GOTO .withoff122
		IF	&off3='x' GOTO .withoff121
		IF	(&off1­'x') or (&length='2') GOTO .withoff122
.withoff121
         phx
&pushed  SETC      'x'
.withoff122
         DoLoad      1,x,&off2
         &op1      &addr2,x
&jump2   SETC      '.addoff2'
		GOTO .added1

;        -----------------
.aoffx1
		IF	&pushed­'x' GOTO .aoffx12
         plx
&pushed  SETC      ''
&lastX   SETC      ''
.aoffx12
         &op1      &addr2,x
&jump2   SETC      '.aoffx2'
		GOTO .added1

;        -------------------
.aoffy1
		IF	&pushed­'y' GOTO .aoffy12
         ply
&pushed  SETC      ''
&lastY   SETC      ''
.aoffy12
         &op1      &addr2,y
&jump2   SETC      '.aoffy2'
		GOTO .added1

;        -------------------
.aoffs1
         STreset
         &op1      &addr2,s
&jump2   SETC      '.aoffs2'
.added1
		IF	&zp3 GOTO .storezp1
		IF	&len(&off3) GOTO .withoff13
		IF	&addr3='a' GOTO .storeR1
		IF	&addr3='x' GOTO .storex1
		IF	&addr3='y' GOTO .storey1
		IF	&addr3='s' GOTO .stores1
         sta       &addr3
&jump3   SETC      '.store2'
		GOTO .stored1

;        ------------------
.storex1
         tax
		GOTO .storeR1

.storey1
         tay
.storeR1
&jump3   SETC      '.error1'
		GOTO .stored1

;        ------------------
.stores1
         STreset
		IF	&pull1 or &pull2 GOTO .stores12
		IF	&stack1 GOTO .stores13
		IF	&length='2' GOTO .stores111
         pha
.stores111
         pha
&jump3   SETC      '.stores2'
		GOTO .stored1

;        -----------------
.stores12
		IF	&stack1 GOTO .stores14
         sta       1,s
&jump3   SETC      '.stores2'
&pull1   seta      0
&pull2   seta      0
		GOTO .stored1

;        -----------------
.stores13
         pha
&jump1   SETC      '.loads22'
&jump3   SETC      '.stores2'
		GOTO .stored1

;        -----------------
.stores14
         sta       3,s
&jump3   SETC      '.stores2'
&pull1   seta      0
&pull2   seta      0
		GOTO .stored1

;        ------------------
.storezp1
		IF	&len(&off3) GOTO .storezpo1
         sta       &addr3
&jump3   SETC      '.storezp2'
		GOTO .stored1

;        -----------------
.storezpo1
		IF	&off3='y' GOTO .storezpy1
		IF	&len(&pushed) or (&length='2') GOTO .storezpo12
		IF	(&off1­'y') and (&off2­'y') GOTO .storezpo12
         phy
&pushed  SETC      'y'
.storezpo12
         DOLoad      1,y,&off3
         sta       &addr3,y
&jump3   SETC      '.storezpo2'
		GOTO .stored1

;        ------------------
.storezpy1
		IF	&pushed­'y' GOTO .storezpy12
         ply
&pushed  SETC      ''
&lastY   SETC      ''
.storezpy12
         sta       &addr3,&off3
&jump3   SETC      '.storezpy2'
		GOTO .stored1

;        ------------------
.withoff13
		IF	&off3='x' GOTO .soffx1
		IF	&off3='y' GOTO .soffy1
		IF	&off3='s' GOTO .soffs1
		IF	&len(&pushed) or (&length='2') GOTO .withoff132
		IF	(&off1­'x') and (&off2­'x') GOTO .withoff132
         phx
&pushed  SETC      'x'
.withoff132
         DoLoad      1,x,&off3
         sta       &addr3,x
&jump3   SETC      '.storeoff2'
		GOTO .stored1

;        -----------------
.soffx1
		IF	&pushed­'x' GOTO .soffx12
         plx
&pushed  SETC      ''
&lastX   SETC      ''
.soffx12
         sta       &addr3,x
&jump3   SETC      '.soffx2'
		GOTO .stored1

;        -------------------
.soffy1
		IF	&pushed­'y' GOTO .soffy12
         ply
&pushed  SETC      ''
&lastY   SETC      ''
.soffy12
         sta       &addr3,y
&jump3   SETC      '.soffy2'
		GOTO .stored1

;        -------------------
.soffs1
         STreset
         sta       &addr3,s
&jump3   SETC      '.soffs2'
.stored1
		IF	&length='2' GOTO .stored2
		GOTO &jump1

;--------------------------------------------------------------
.load2
         HighByte  lda,&addr1
		GOTO .loaded2

;        -----------------
.loadR2
         lda       #0
		GOTO .loaded2

;        -----------------
.loads2
         STreset
         pla
		GOTO .loaded2

;        -----------------
.loads22
         STreset
         lda       3,s
		GOTO .loaded2

;        -----------------
.loadzp2
		IF	&len(&pushed) GOTO .loadzp22
		IF	(&off2­'y') and (&off3­'y') GOTO .loadzp22
         phy
&pushed  SETC      'y'
.loadzp22
         Load      1,y,#2
         lda       &addr1,y
		GOTO .loaded2

;        -----------------
.loadzpo22
		IF	&len(&pushed) GOTO .loadzpo2
         phy
&pushed  SETC      'y'
.loadzpo2
         Load      2,y,&off1
         lda       &addr1,y
		GOTO .loaded2

;        ------------------
.loadzpy2
		IF	&pushed­'y' GOTO .loadzpy21
         ply
&pushed  SETC      ''
&lastY   SETC      ''
.loadzpy21
         doY
         lda       &addr1,&off1
		GOTO .loaded2

;        ------------------
.loadoff22
		IF	&len(&pushed) GOTO .loadoff2
         phx
&pushed  SETC      'x'
.loadoff2 
         DoLoad      1,x,&off1
         lda       &addr1+2,x
		GOTO .loaded2

;        -----------------
.loffx2
		IF	&pushed­'x' GOTO .loffx21
         plx
&pushed  SETC      ''
&lastX   SETC      ''
.loffx21
         lda       &addr1+2,x
		GOTO .loaded2

;        -------------------
.loffy2
		IF	&pushed­'y' GOTO .loffy21
         ply
&pushed  SETC      ''
&lastY   SETC      ''
.loffy21
		IF	&Yinc GOTO .loffy22
         lda       &addr1+2,y
		GOTO .loaded2

;        -------------------
.loffy22
         lda       &addr1,y
		GOTO .loaded2

;        -------------------
.loffs2
         STreset
         lda       &addr1+2,s
.loaded2
		GOTO &jump2

;------------------------------
;------------------------------
.add2
         HighByte  &op1,&addr2
		GOTO .added2

;        -----------------
.adds21
         STreset
         &op1      3,s
		GOTO .added2

;        -----------------
.adds22
         &op1      3+&length,s
		GOTO .added2

;        -----------------
.addzp2
		IF	&len(&pushed) or (&off3­'y') GOTO .addzp22
         phy
&pushed  SETC      'y'
.addzp22
         DoLoad      1,y,#2
         &op1      &addr2,y
		GOTO .added2

;        -----------------
.addzpo2
		IF	&len(&pushed) or (&off3­'y') GOTO .addzpo22
         phy
&pushed  SETC      'y'
.addzpo22
         DoLoad      2,y,&off2
         &op1      &addr2,y
		GOTO .added2

;        ------------------
.addzpy2
		IF	&pushed­'y' GOTO .addzpy22
         ply
&pushed  SETC      ''
&lastY   SETC      ''
.addzpy22
         doY
         &op1      &addr2,&off2
		GOTO .added2

;        ------------------
.addoff2
		IF	&len(&pushed) or (&off3­'x') GOTO .addoff22
         phx
&pushed  SETC      'x'
.addoff22
         DoLoad      1,x,&off2
         &op1      &addr2+2,x
		GOTO .added2

;        -----------------
.aoffx2
		IF	&pushed­'x' GOTO .aoffx22
         plx
&pushed  SETC      ''
&lastX   SETC      ''
.aoffx22
         &op1      &addr2+2,x
		GOTO .added2

;        -------------------
.aoffy2
		IF	&pushed­'y' GOTO .aoffy22
         ply
&pushed  SETC      ''
&lastY   SETC      ''
.aoffy22
		IF	&Yinc GOTO .aoffy23
         &op1      &addr2+2,y
		GOTO .added2

;        -------------------
.aoffy23
         &op1      &addr2,y
		GOTO .added2

;        -------------------
.aoffs2
         STreset
         &op1      &addr2+2,s
.added2
		GOTO &jump3

;------------------------------
;------------------------------
.error1
         MNOTE     'Register cannot hold long integer.',4
		GOTO .stored2

;        ------------------
.store2
         HighByte  sta,&addr3
		GOTO .stored2

;        ------------------
.stores2
         STreset
         sta       3,s
		GOTO .stored2

;        -----------------
.storezp2
         DoLoad      1,y,#2
         sta       &addr3,y
		GOTO .stored2

;        -----------------
.storezpo2
         DoLoad      2,y,&off3
         sta       &addr3,y
		GOTO .stored2

;        ------------------
.storezpy2
		IF	&pushed­'y' GOTO .storezpy22
         ply
&pushed  SETC      ''
&lastY   SETC      ''
.storezpy22
         doY
         sta       &addr3,&off3
		GOTO .stored2

;        ------------------
.storeoff2
         DoLoad      1,x,&off3
         sta       &addr3+2,x
		GOTO .stored2

;        -----------------
.soffx2
		IF	&pushed­'x' GOTO .soffx22
         plx
&pushed  SETC      ''
&lastX   SETC      ''
.soffx22
         sta       &addr3+2,x
		GOTO .stored2

;        -------------------
.soffy2
		IF	&pushed­'y' GOTO .soffy22
         ply
&pushed  SETC      ''
&lastY   SETC      ''
.soffy22
		IF	&Yinc GOTO .soffy23
         sta       &addr3+2,y
		GOTO .stored2

;        -------------------
.soffy23
         sta       &addr3,y
		GOTO .stored2

;        -------------------
.soffs2
         STreset
         sta       &addr3+2,s
.stored2
		IF	&pull1=0 GOTO .stored210
		IF	&length='2' GOTO .stored205
         pl&badreg
.stored205
         pl&badreg
.stored210
		IF	&pull2=0 GOTO .stored220
		IF	&length='2' GOTO .stored215
         pl&badreg
.stored215
         pl&badreg
.stored220
    MEND
;------------------------------------------------------------------------------
    MACRO
         HighByte  &oper,&loc
         lclc      &c
         lclc      &rest
		IF	&substr(&loc,1,1)='#' GOTO .b
         &oper     &loc+2
         MEXIT
.b
&rest    SETC      &substr(&loc,2,&len(&loc)-1)
         &oper     #^&rest
    MEND
;--------------------------------------------------------
    MACRO
         DoLoad      &half,&reg,&value
		IF	&half='1' GOTO .c
		IF	&substr(&value,1,1)='#' GOTO .a
         Check     &reg,&value
		IF	&same GOTO .e
         ld&reg    &value
         in&reg
         in&reg
&OFFinc  seta      1
         MEXIT
.e
		IF	&OFFinc GOTO .done
         in&reg
         in&reg
&OFFinc  seta      1
         MEXIT
.a
         Check     &reg,&value+2
		IF	&same GOTO .done
         ld&reg    &value+2
&OFFinc  seta      1
         MEXIT
.c
         Check     &reg,&value
		IF	&same GOTO .done
         ld&reg    &value
.done
         MEND
;-----------------------------------------------------
    MACRO
         doY
		GBLA &Yinc
		IF	&Yinc GOTO .done
&Yinc    seta      1
         iny
         iny
.done
         MEND
;-------------------------------------------------
    MACRO
         STreset
		 
		 GBLC &pushed
		 GBLC &lastX
		IF	&len(&pushed)=0 GOTO .done
		IF	&pushed='y' GOTO .d
         plx
&pushed  SETC      ''
&lastX   SETC      ''
         MEXIT
.d
         ply
&pushed  SETC      ''
&lastY   SETC      ''
.done
    MEND
;-------------------------------------------------
    MACRO
         Check     &reg,&string
         lcla      &search
		IF	&reg='y' GOTO .regy
		IF	&len(&lastx)­&len(&string) GOTO .nomatchx
&search  seta      &pos(&string,&lastx)
		IF	&search=0 GOTO .nomatchx
		GOTO .match

.regy
		IF	&len(&lasty)­&len(&string) GOTO .nomatchy
&search  ASEARCH   &lasty,&string,1
		IF	&search=0 GOTO .nomatchy
.match
&same    seta      1
         MEXIT
.nomatchx
&same    seta      0
&lastX   SETC      &string
         MEXIT
.nomatchy
&same    seta      0
&lastY   SETC      &string
    MEND
;------------------------------------------------------
;...............................................................
;
;        Addwl - add word quickly to long word in place
;...............................................................
         MACRO
&lab     addwl     &a1,&a2
&lab	; 
		IF	(&a1='a' or &a1='A') GOTO .a
         lda       &a1
.a
         clc
         adc       &a2
         sta       &a2
         bcc       ~b&sysindex
         inc       &a2+2
~b&sysindex	; 
         mend
;...............................................................
;
;        Subwl - sub word quickly to long word in place
;...............................................................
         MACRO
&lab     subwl     &a1,&a2
&lab	; 
		IF	(&a1='a' or &a1='A') GOTO .a
         lda       &a2
.a
         sec
         sbc       &a1
         sta       &a2
         bcs       ~b&sysindex
         dec       &a2+2
~b&sysindex	; 
         mend
;------------------------------------------------------
         MACRO
&lab     mul2
&lab	; 
         asl a
         MEND
         MACRO
&lab     mul4 &param
&lab	; 
         asl &param
         asl &param
         MEND
         MACRO
&lab     mul8
&lab	; 
         asl a
         asl a
         asl a
         MEND
         MACRO
&lab     mul16
&lab	; 
         asl a
         asl a
         asl a
         asl a
         MEND
         MACRO
&lab     mul32
&lab	; 
         asl a
         asl a
         asl a
         asl a
         asl a
         MEND
         MACRO
&lab     div2
&lab	; 
         lsr a
         MEND
         MACRO
&lab     div4 &op
&lab	; 
         lsr &op
         lsr &op
         MEND
         MACRO
&lab     div8
&lab	; 
         lsr a
         lsr a
         lsr a
         MEND
         MACRO
&lab     div16
&lab	; 
         lsr a
         lsr a
         lsr a
         lsr a
         MEND
         MACRO
&lab     div32
&lab	; 
         lsr a
         lsr a
         lsr a
         lsr a
         lsr a
         MEND
	PRINT POP
