Commit 44381c2e authored by David Cotton's avatar David Cotton
Browse files

========

	Altered to work with HdrSrc 0.46

Detail:
=======
 	HdrSrc 0.46 now includes the macros defined in the hdr.Cvars local
file in it's Hdr:Macros file. Hence have altered this component to use the
global header rather than the local copy. Also altered it so its hdr.SWINames
file no longer attempts to define the AddSWI macro, which is also defined in
hdr:Macros.

Admin:
======
	tedted that it builds.

Version 0.23. Tagged as 'Gadgets-0_23'
parent a09e83ad
/* (0.22)
/* (0.23)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 0.22
#define Module_MajorVersion_CMHG 0.23
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 23 Jun 1999
#define Module_Date_CMHG 18 Oct 1999
#define Module_MajorVersion "0.22"
#define Module_Version 22
#define Module_MajorVersion "0.23"
#define Module_Version 23
#define Module_MinorVersion ""
#define Module_Date "23 Jun 1999"
#define Module_Date "18 Oct 1999"
#define Module_FullVersion "0.22"
#define Module_FullVersion "0.23"
; Copyright 1997 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.
;
; hdr.CVars
;
; Define macros for Assembler source.
;
;**************************************************************************
; ExternVar $var
;
; Declare external C variables.
;
MACRO
ImportVar $var
IMPORT $var
$var._Indirect DCD $var
MEND
;**************************************************************************
; GlobalVar $var
;
; Declare external C variables.
;
MACRO
ExportVar $var
EXPORT $var
$var._Indirect DCD $var
MEND
;**************************************************************************
; StaticBaseFromSL $reg, $cc
;
; Set $reg to point to the base of the static data area using SL set up
; from C call.
;
MACRO
$label StaticBaseFromSL $reg, $cc
$label LDR$cc $reg, [sl, #-536]
MEND
;**************************************************************************
; StaticBaseFromSP $reg, $cc
;
; Set $reg to point to the base of the static data area using stack frame
; placed at Mb boundary below SP by C call.
;
MACRO
$label StaticBaseFromSP $reg, $cc
$label MOV$cc $reg, sp, LSR #20
MOV$cc $reg, $reg, LSL #20
LDR$cc $reg, [$reg, #4]
MEND
;**************************************************************************
; StaticBaseFromWP $reg, $cc
;
; Set $reg to point to the base of the static data area using private word
; contents only ie. workspace pointer.
;
MACRO
$label StaticBaseFromWP $reg, $pw, $cc
$label LDR$cc $reg, [$pw, #8]
MEND
;**************************************************************************
; LDRVar $reg, $base, $var, $cc
;
; Load the contents of an external C variable.
;
MACRO
$label LDRVar $reg, $base, $var, $cc
$label LDR$cc $reg, $var._Indirect
LDR$cc $reg, [$base, $reg]
MEND
;**************************************************************************
; STRVar $reg, $base, $var, $w1, $cc
;
; Set the contents of an external C variable.
;
MACRO
$label STRVar $reg, $base, $var, $w1, $cc
$label LDR$cc $w1, $var._Indirect
STR$cc $reg, [$base, $w1]
MEND
;**************************************************************************
; ADRVar $reg, $base, $var, $cc
;
; Set $reg to point to the static variable $var.
;
MACRO
$label ADRVar $reg, $base, $var, $cc
$label LDR$cc $reg, $var._Indirect
ADD$cc $reg, $base, $reg
MEND
END
......@@ -27,21 +27,6 @@
Auto_Error_SWI_bit_number * 17
Auto_Error_SWI_bit * 1 :SHL: Auto_Error_SWI_bit_number
;
; The following macro defines the SWI names using the '*' directive and the
; '#' directive to increment the SWI number
;
GBLS SWIClass
MACRO
AddSWI $SWIName,$value
[ "$value" = ""
$SWIClass._$SWIName # 1
|
$SWIClass._$SWIName * $value
]
X$SWIClass._$SWIName * $SWIClass._$SWIName + Auto_Error_SWI_bit
MEND
;
; Now for the SWI name table - using the '^' directive to build a table
......
......@@ -17,6 +17,8 @@
AREA |C$$code|, CODE, READONLY
GET hdr:ListOpts
GET hdr:Macros
GET hdr.SWINames
; APCS compliant
......
......@@ -18,6 +18,8 @@
AREA |C$$code|, CODE, READONLY
GET hdr:ListOpts
GET hdr:Macros
GET hdr.SWINames
IMPORT _scrolllist_redraw
......
......@@ -17,6 +17,8 @@
AREA |C$$code|, CODE, READONLY
GET hdr:ListOpts
GET hdr:Macros
GET hdr.SWINames
; APCS compliant
......
......@@ -19,8 +19,9 @@
AREA |C$$code|, CODE, READONLY
GET hdr:ListOpts
GET hdr:Macros
GET hdr.SWINames
GET hdr.CVars
; APCS compliant
; SVC mode compatible (a4/r3 used as link register)
......
......@@ -12,6 +12,8 @@
; See the License for the specific language governing permissions and
; limitations under the License.
;
GET hdr:ListOpts
GET hdr:Macros
GET hdr.SWINames
AREA |C$$Code|, READONLY, CODE
......
......@@ -14,6 +14,8 @@
;
AREA |C$$code|, CODE, READONLY
GET hdr:ListOpts
GET hdr:Macros
GET hdr.SWINames
; Gets the graphics window
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment