        CASE ON         ; Enable case sensitivity for labels

;   Imported addresses
        IMPORT  G0317_
        IMPORT  G0318_
        IMPORT  G0321_

;   Forward addresses and entries
        ENTRY   L0C0031
        ENTRY   L0C00B3
        ENTRY   L0C00B5
        ENTRY   L0C00B7
        ENTRY   L0C00B9
        ENTRY   L0C00BB

        EXPORT  F2177_ 
F2177_ PROC
L09001E_TaskHeader      DC.B    $00,$00,$00,$00 ; 00 link pointer
L090022_TaskCount       DC.B    $01,$00 ; count
        DC.B    $5a,$a5 ; signature
        REP        #$30
        LDA        #$01
        STA        >L090022_TaskCount
L09002F LDA        #0                           ; C0_FALSE
        STA        >L0C0031
        LDA        >G0317_                      ; G0317_i_WaitForInputVerticalBlankCount
        INC        A
        STA        >G0317_                      ; G0317_i_WaitForInputVerticalBlankCount
        CMP        >G0318_                      ; G0318_i_WaitForInputMaximumVerticalBlankCount
        BCC        L09004C
        LDA        #1                           ; C1_TRUE
        STA        >G0321_                      ; G0321_B_StopWaitingForPlayerInput
L09004C SEP        #$30
        RTL
        EXPORT  L0C0031
L0C0031
        DC.B    $00,$00
        ENDP

        EXPORT  F0007_sub1_ 
F0007_sub1_ PROC
        CLC
        LDA        >L0C00B3
        ADC        >L0C00BB
        STA        >L0C00B3
        LDA        >L0C00B5
        ADC        #$0000
        STA        >L0C00B5
        CLC
        LDA        >L0C00B7
        ADC        >L0C00BB
        STA        >L0C00B7
        LDA        >L0C00B9
        ADC        #$0000
        STA        >L0C00B9
        SEP        #$30
        LDA        >L0C00B5
        STA        >L0C0086+2
        LDA        >L0C00B9
        STA        >L0C0086+1
        REP        #$30
        LDA        >L0C00B3
        TAX
        LDA        >L0C00B7
        TAY
        LDA        >L0C00BB
        PHB
L0C0086 MVP        $00,$00
        PLB
        RTL
        ENDP

        EXPORT  F0007_sub2_ 
F0007_sub2_ PROC
        SEP        #$30
        LDA        >L0C00B5
        STA        >L0C00AE+2
        LDA        >L0C00B9
        STA        >L0C00AE+1
        REP        #$30
        LDA        >L0C00B3
        TAX
        LDA        >L0C00B7
        TAY
        LDA        >L0C00BB
        PHB
L0C00AE MVN        $00,$00
        PLB
        RTL
        ENDP

        EXPORT  F0007_Data 
F0007_Data PROC
        EXPORT  L0C00B3
L0C00B3
        DC.B    $00,$00
        EXPORT  L0C00B5
L0C00B5
        DC.B    $00,$00
        EXPORT  L0C00B7
L0C00B7
        DC.B    $00,$00
        EXPORT  L0C00B9
L0C00B9
        DC.B    $00,$00
        EXPORT  L0C00BB
L0C00BB
        DC.B    $00,$00         ; Maybe DS.B    $02 ? ANOMALY_IIGS These 2 bytes appear as 'Reserved Space' in the original OMF segment header
        ENDP
        END
