 MACRO
&lab _BlockMove
&lab ldx #$2B02
 jsl $E10000
 MEND
 MACRO
&lab _CheckHandle
&lab ldx #$1E02
 jsl $E10000
 MEND
 MACRO
&lab _DisposeHandle
&lab ldx #$1002
 jsl $E10000
 MEND
 MACRO
&lab _GetHandleSize
&lab ldx #$1802
 jsl $E10000
 MEND
 MACRO
&lab _MMStartUp
&lab ldx #$0202
 jsl $E10000
 MEND
 MACRO
&lab _NewHandle
&lab ldx #$0902
 jsl $E10000
 MEND
 MACRO
&lab _PtrToHand
&lab ldx #$2802
 jsl $E10000
 MEND
 MACRO
&lab _PrDefault
&lab ldx #$0913
 jsl $E10000
 MEND
 MACRO
&lab _PrValidate
&lab ldx #$0A13
 jsl $E10000
 MEND
 MACRO
&lab _ClosePicture
&lab ldx #$B904
 jsl $E10000
 MEND
 MACRO
&lab _KillPicture
&lab ldx #$BB04
 jsl $E10000
 MEND
 MACRO
&lab _OpenPicture
&lab ldx #$B704
 jsl $E10000
 MEND
 MACRO
&lab _WaitCursor
&lab ldx #$0A12
 jsl $E10000
 MEND
 MACRO
&lab _ClosePort
&lab ldx #$1A04
 jsl $E10000
 MEND
 MACRO
&lab _GetCursorAdr
&lab ldx #$8F04
 jsl $E10000
 MEND
 MACRO
&lab _GetMasterSCB
&lab ldx #$1704
 jsl $E10000
 MEND
 MACRO
&lab _GetPort
&lab ldx #$1C04
 jsl $E10000
 MEND
 MACRO
&lab _InitPort
&lab ldx #$1904
 jsl $E10000
 MEND
 MACRO
&lab _NewRgn
&lab ldx #$6704
 jsl $E10000
 MEND
 MACRO
&lab _OpenPort
&lab ldx #$1804
 jsl $E10000
 MEND
 MACRO
&lab _PPToPort
&lab ldx #$D604
 jsl $E10000
 MEND
 MACRO
&lab _RectRgn
&lab ldx #$6C04
 jsl $E10000
 MEND
 MACRO
&lab _SetClip
&lab ldx #$2404
 jsl $E10000
 MEND
 MACRO
&lab _SetCursor
&lab ldx #$8E04
 jsl $E10000
 MEND
 MACRO
&lab _SetPort
&lab ldx #$1B04
 jsl $E10000
 MEND
 MACRO
&lab _SetVisRgn
&lab ldx #$B404
 jsl $E10000
 MEND
 MACRO
&lab pulllong &addr1,&addr2
&lab ANOP
 AIF C:&addr1=0,.a
 AIF C:&addr2=0,.b
 LCLC &C
&C AMID &addr1,1,1
 AIF "&C"="[",.zeropage
 pullword &addr1
 sta &addr2
 pullword &addr1+2
 sta &addr2+2
 MEXIT
.a
 pullword
 pullword
 MEXIT
.b
 pullword &addr1
 pullword &addr1+2
 MEXIT
.zeropage
 ldy #&addr2
 pullword &addr1,y
 ldy #&addr2+2
 pullword &addr1,y
 MEND
 MACRO
&lab pullword &SYSOPR
&lab ANOP
 pla
 AIF C:&SYSOPR=0,.end
 sta &SYSOPR
.end
 MEND
 MACRO
&lab pushlong &addr,&offset
&lab ANOP
 LCLC &C
 LCLC &REST
&C AMID &addr,1,1
 AIF "&C"="#",.immediate
 AIF "&C"="[",.zeropage
 AIF C:&offset=0,.nooffset
 AIF "&offset"="s",.stack
 pushword &addr+2,&offset
 pushword &addr,&offset
 MEXIT
.nooffset
 pushword &addr+2
 pushword &addr
 MEXIT
.immediate
&REST AMID &addr,2,L:&addr-1
 dc I1'$F4',I2'(&REST)|-16'
 dc I1'$F4',I2'&REST'
 MEXIT
.stack
 pushword &addr+2,s
 pushword &addr+2,s
 MEXIT
.zeropage
 ldy #&offset+2
 pushword &addr,y
 ldy #&offset
 pushword &addr,y
 MEND
 MACRO
&lab pushword &SYSOPR
&lab ANOP
 AIF C:&SYSOPR=0,.b
 LCLC &C
&C AMID "&SYSOPR",1,1
 AIF ("&C"="#").AND.(S:LONGA),.immediate
 lda &SYSOPR
 pha
 MEXIT
.b
 pha
 MEXIT
.immediate
 LCLC &REST
 LCLA &BL
&BL ASEARCH "&SYSOPR"," ",1
 AIF &BL>0,.a
&BL SETA L:&SYSOPR+1
.a
&REST AMID "&SYSOPR",2,&BL-2
 dc I1'$F4',I2'&REST'
 MEND
 MACRO
&lab str &string
&lab dc i1'L:&string',C'&string'
 MEND
 MACRO
&lab longm
&lab ANOP
 rep #%00100000
 longa on
 MEND
 MACRO
&lab shortm
&lab ANOP
 sep #%00100000
 longa off
 MEND
 MACRO
&lab _CloseGS &params
&lab jsl $E100A8
 dc i2"$2014"
 dc i4"&params"
 MEND
 MACRO
&lab _CreateGS &params
&lab jsl $E100A8
 dc i2"$2001"
 dc i4"&params"
 MEND
 MACRO
&lab _GetFileInfoGS &params
&lab jsl $E100A8
 dc i2"$2006"
 dc i4"&params"
 MEND
 MACRO
&lab _OpenGS &params
&lab jsl $E100A8
 dc i2"$2010"
 dc i4"&params"
 MEND
 MACRO
&lab _WriteGS &params
&lab jsl $E100A8
 dc i2"$2013"
 dc i4"&params"
 MEND
 MACRO
&lab _DisposeRgn
&lab ldx #$6804
 jsl $E10000
 MEND
 MACRO
&lab _GetPortLoc
&lab ldx #$1E04
 jsl $E10000
 MEND
 MACRO
&lab _SetPortLoc
&lab ldx #$1D04
 jsl $E10000
 MEND
