;
; CDDL HEADER START
;
; The contents of this file are subject to the terms of the
; Common Development and Distribution License (the "Licence").
; You may not use this file except in compliance with the Licence.
;
; You can obtain a copy of the licence at RISC OS path @.^.LICENCE
; or  http://www.riscosdev.com/lanman98/LICENCE.CDDL
; See the Licence for the specific language governing permissions
; and limitations under the Licence.
;
; When distributing Covered Code, include this CDDL HEADER in each
; file and include the Licence file. If applicable, add the
; following below this CDDL HEADER, with the fields enclosed by
; brackets "[]" replaced with your own identifying information:
; Portions Copyright [yyyy] [name of copyright owner]
; 
; CDDL HEADER END
;
 
; Portions Copyright 1996 Warm Silence Software Ltd. 

; Armalyser analysis of ADFS::HardDisc.$.Develop.C_C++.Port32.Doing.WSS.RiscOS.Lib.!FSLIB.src.Veneer


; Generated by Armalyser 0.46a (21-Aug-2003)
; From ADFS::HardDisc.$.Develop.C_C++.Port32.Doing.WSS.RiscOS.Lib.!FSLIB.src.Veneer
; Assemble with ObjAsm -ABSolute and link with Link -bin

; 26 and 32 bit neutral version for ARM 6 onwards

        ORG      &0

        ENTRY


|Veneer|
        STMFD   R13!,{R0-R9,R14}                ; Entry Point, Main entry point, (Referenced)
        MOV     R10,R13,LSR #20
        MOV     R10,R10,LSL #20
        MOV     R2,R11
        MOV     R0,R13
        LDMIA   R10,{R4,R5}
        MOV     R1,R12
        LDR     R12,[R12,#0]
        LDMIB   R12,{R11,R12}
        STMIA   R10,{R11,R12}
        ADD     R10,R10,#&87,30                 ; =&21C
        MOV     R11,#0
        MOV     R14,PC
        LDR     PC,|Address|                    ; -> Dynamic branch
        SUB     R10,R10,#&87,30                 ; =&21C
        STMIA   R10,{R4,R5}
	MOVS    R12,R0
        LDMFD   R13!,{R0-R9,R14}
        BNE     Veneer_Err
        TEQ     PC,PC
        BICNES  PC,R14,#&01,4                   ; =1<<28, CAUTION: not 32bit safe (uses PSR), manipulation of PSR in address?. Dynamic branch
        MSR	CPSR_f,#0
	MOV     PC,R14
|Veneer_Err|
        MOV     R0,R12
        TEQ     PC,PC
        ORRNES  PC,R14,#&01,4                   ; =1<<28, CAUTION: not 32bit safe (uses PSR). Ends
        MSR 	CPSR_f,#&01,4
	MOV     PC,R14

|Address|
        DCD     &00000000                       ; Address r/- (referenced)


        END

