; Copyright 1996 Acorn Computers Ltd
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
;     http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;
x
        MOV     ip, sp
        STMFD   sp!, {a1,a2,v1,fp,ip,lr,pc}
        SUB     fp, ip, #4
        CMPS    sp, sl
        BLLT    |x$stack_overflow|
        MOV     v1, a2
        SUB     sp, sp, #20
        MOV     a4, #0
        ADD     a3, sp, #16
        STMFD   sp!, {a3,a4}
        MOV     a3, a1
        ADD     a2, sp, #8
        MOV     a4, #0
        MOV     a1, #1
        BL      xpdriver_draw_page
        ADD     sp, sp, #8
        CMPS    a1, #0
        BNE     |L0000d8.J19.x|
        B       |L0000cc.J8.x|
|L000058.J7.x|
        MOV     a4, #0
        STMFD   sp!, {a4}
        MOV     a4, #0
        MOV     a3, #0
        MOV     a2, #0
        MOV     a1, #0
        BL      xcolourtrans_set_gcol
        ADD     sp, sp, #4
        CMPS    a1, #0
        BNE     |L0000d8.J19.x|
        MOV     a4, #0
        MOV     a3, #0
        MOV     a2, #0
        MOV     a1, #0
        STMFD   sp!, {a1,a2,a3,a4}
        MOV     a2, v1
        MOV     a4, #0
        MOV     a3, #0
        MOV     a1, #0
        BL      xfont_paint
        ADD     sp, sp, #16
        CMPS    a1, #0
        BNE     |L0000d8.J19.x|
        ADD     a2, sp, #16
        MOV     a1, sp
        MOV     a3, #0
        BL      xpdriver_get_rectangle
        CMPS    a1, #0
        BNE     |L0000d8.J19.x|
|L0000cc.J8.x|
        LDR     a2, [sp, #16]
        CMPS    a2, #0
        BNE     |L000058.J7.x|
|L0000d8.J19.x|
        LDMEA   fp, {v1,fp,sp,pc}^
