; 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.
;
; -*- Mode: Assembler -*-
;* Shared library kernel for Arthur/Brazil: static data layout
;* Lastedit: 09 Apr 90 10:25:45 by Harry Meekings *
;
; Copyright (C) Acorn Computers Ltd., 1988.
;

StaticData
imageBase               Variable
rtsDataBase             Variable
rtsDataLimit            Variable

errorR12                Variable
errorBuffer             Variable
errorNumber             Variable
errorString             Variable        25

registerDump            Variable        16

; Handler values on entry, to be restored on exit
oldAbortHandlers        Variable        4

oldExitHandler          Variable        2       ; handler, r12
oldMemoryLimit          Variable

oldErrorHandler         Variable                ; handler, r0, buffer
oldErrorR0              Variable
oldErrorBuffer          Variable

oldCallBackHandler      Variable        3       ; handler, r12, buffer
oldEscapeHandler        Variable        2       ; handler, r12
oldEventHandler         Variable        2       ; handler, r12

oldUpCallHandler        Variable        2       ; handler, r12

; Stuff used for _kernel_system
languageEnvSave         Variable        3       ; (fp, sp, sl over _system)

hadEscape               VariableByte
;******************* beware : position of this byte is fixed ***************
;                             (used in stubs)
kallocExtendsWS         VariableByte
inTrapHandler           VariableByte
beingDebugged           VariableByte
fpPresent               VariableByte    ; zero if not
initialised             InitByte 1
callbackInactive        VariableByte
unused_byte_2           VariableByte

IIHandlerInData         Variable        3
PAHandlerInData         Variable        3
DAHandlerInData         Variable        3
AEHandlerInData         Variable        3

eventCode               Variable
eventUserR13            Variable
eventRegisters          Variable        12      ; r0-r10 and r13
fastEventStack          Variable        64
fastEventStackEnd       Variable        0

heapTop                 Variable
heapLimit               Variable

allocProc               Variable
freeProc                Variable

returnCode              Variable

moduleDataWord          Variable

APCS_A_Client           VariableByte
escapeSeen              VariableByte
unwinding               VariableByte
underDesktop            VariableByte

heapBase                Variable

ArgString               Variable
heapExtender            Variable
knownSlotSize           Variable
initSlotSize            Variable

lk_RestoreOSHandlers    Variable
extendChunk             Variable
rootStackChunk          Variable

; Tmp space for expanding PC value in fatal error handler
; 3 words overlaid with returnCodeLimit
pc_hex_buff             Variable        0
; Tmp space for reading RC Limit in _kernel_exit - Reuse.
returnCodeLimit         Variable        3

; Tmp space for expanding reg. dump address in fatal error handler - Reuse
reg_hex_buff            Variable        3

disable_stack_extension ExportedVariable 1

unused                  Variable        16

        END