; 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      pdriver_draw_page
        ADD     sp, sp, #8
        B       |L0000ac.J5.x|
|L000050.J4.x|
        MOV     a4, #0
        STMFD   sp!, {a4}
        MOV     a4, #0
        MOV     a3, #0
        MOV     a2, #0
        MOV     a1, #0
        BL      colourtrans_set_gcol
        ADD     sp, sp, #4
        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      font_paint
        ADD     sp, sp, #16
        ADD     a2, sp, #16
        MOV     a1, sp
        MOV     a3, #0
        BL      pdriver_get_rectangle
|L0000ac.J5.x|
        LDR     a1, [sp, #16]
        CMPS    a1, #0
        BNE     |L000050.J4.x|
        LDMEA   fp, {v1,fp,sp,pc}^
