 MACRO
&lab _FixAppleMenu
&lab ldx #$1E05
 jsl $E10000
 MEND
 MACRO
&lab _QuitGS &params
&lab jsl $E100A8
 dc i2"$2029"
 dc i4"&params"
 MEND
 MACRO
&lab _Int2Hex
&lab ldx #$220B
 jsl $E10000
 MEND
 MACRO
&lab _ShutDownTools
&lab ldx #$1901
 jsl $E10000
 MEND
 MACRO
&lab _StartUpTools
&lab ldx #$1801
 jsl $E10000
 MEND
 MACRO
&lab _TLShutDown
&lab ldx #$0301
 jsl $E10000
 MEND
 MACRO
&lab _TLStartUp
&lab ldx #$0201
 jsl $E10000
 MEND
 MACRO
&lab _MMShutDown
&lab ldx #$0302
 jsl $E10000
 MEND
 MACRO
&lab _MMStartUp
&lab ldx #$0202
 jsl $E10000
 MEND
 MACRO
&lab _DisableMItem
&lab ldx #$310F
 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 _HiliteMenu
&lab ldx #$2C0F
 jsl $E10000
 MEND
 MACRO
&lab _NewMenuBar2
&lab ldx #$430F
 jsl $E10000
 MEND
 MACRO
&lab _SetMenuBar
&lab ldx #$390F
 jsl $E10000
 MEND
 MACRO
&lab _SetMenuFlag
&lab ldx #$1F0F
 jsl $E10000
 MEND
 MACRO
&lab _SetSysBar
&lab ldx #$120F
 jsl $E10000
 MEND
 MACRO
&lab _SysBeep
&lab ldx #$2C03
 jsl $E10000
 MEND
 MACRO
&lab _GrafOff
&lab ldx #$0B04
 jsl $E10000
 MEND
 MACRO
&lab _InitCursor
&lab ldx #$CA04
 jsl $E10000
 MEND
 MACRO
&lab _ReadChar
&lab ldx #$220C
 jsl $E10000
 MEND
 MACRO
&lab _WriteCString
&lab ldx #$200C
 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 _AlertWindow
&lab ldx #$590E
 jsl $E10000
 MEND
 MACRO
&lab _FrontWindow
&lab ldx #$150E
 jsl $E10000
 MEND
 MACRO
&lab _GetWKind
&lab ldx #$2B0E
 jsl $E10000
 MEND
 MACRO
&lab _RefreshDesktop
&lab ldx #$390E
 jsl $E10000
 MEND
 MACRO
&lab _TaskMaster
&lab ldx #$1D0E
 jsl $E10000
 MEND
