Commit 7b0df87b authored by Stewart Brodie's avatar Stewart Brodie
Browse files

Updated build structure to use the shared AAsmModule makefile.

  Updated to build using objasm instead of aasm.
  Sources changed to be objasm-compatible.
Admin:
  Requires Library 0.71 or later.
  Requires BuildSys 3.06 or later.
  Requires Env 0.65 or later.

Version 0.57. Tagged as 'DeviceFS-0_57'
parent 4da19499
......@@ -19,77 +19,17 @@
# ***********************************
# Date Name Description
# ---- ---- -----------
# 25-May-94 AMcC Created.
# 07-Mar-01 SNB Recreated
#
#
# Paths
#
EXP_HDR = <export$dir>
C_EXP_HDR = <cexport$dir>.Interface.h
#
# Generic options:
#
MKDIR = cdir
AS = aasm
CP = copy
RM = remove
CCFLAGS = -c -depend !Depend -IC:
ASFLAGS = -depend !Depend $(THROWBACK) -Stamp -quit -module -To $@ -From
CPFLAGS = ~cfr~v
#
# Program specific options:
#
COMPONENT = DeviceFS
SOURCE = s.DeviceFS
TARGET = rm.DeviceFS
TARGETSA = rm.DeviceFSSA
EXPORTS = ${EXP_HDR}.${COMPONENT} \
${C_EXP_HDR}.${COMPONENT}
RESOURCES = LocalRes:Messages
#
# Generic rules:
#
rom: ${TARGET}
@echo ${COMPONENT}: rom module built
export: ${EXPORTS}
@echo ${COMPONENT}: export complete
install_rom: ${TARGET}
${CP} ${TARGET} ${INSTDIR}.${COMPONENT} ${CPFLAGS}
@echo ${COMPONENT}: rom module installed
clean:
${RM} ${TARGET}
${RM} ${TARGETSA}
@echo ${COMPONENT}: cleaned
resources:
${MKDIR} ${RESDIR}.${COMPONENT}
TokenCheck LocalRes:Messages
${CP} LocalRes:Messages ${RESDIR}.${COMPONENT}.Messages ${CPFLAGS}
@echo ${COMPONENT}: resource files copied
HEADER1 = DeviceFS
${TARGET}: ${SOURCE}
${AS} ${ASFLAGS} ${SOURCE}
${EXP_HDR}.${COMPONENT}: hdr.${COMPONENT}
${CP} hdr.${COMPONENT} $@ ${CPFLAGS}
${C_EXP_HDR}.${COMPONENT}: hdr.${COMPONENT}
perl Build:Hdr2H hdr.${COMPONENT} $@
#
# Makes a stand-alone version with messages bound in
#
standalone: ${TARGETSA}
@echo ${COMPONENT}: standalone module built
# C headers to generate from the assembler sources
ASMCHEADER1 = DeviceFS
EXPORTS = ${C_EXP_HDR}.${ASMCHEADER1}
${TARGETSA}: s.StandAlone ${RESOURCES}
${AS} ${ASFLAGS} s.StandAlone
include StdTools
include AAsmModule
# Dynamic dependencies:
......@@ -14,4 +14,4 @@
|
Dir <Obey$Dir>
amu_machine clean
ifthere Run:stripdepnd then stripdepnd <obey$Dir>.Makefile
stripdepnd Makefile
......@@ -11,14 +11,14 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "0.56"
Module_Version SETA 56
Module_MajorVersion SETS "0.57"
Module_Version SETA 57
Module_MinorVersion SETS ""
Module_Date SETS "23 Feb 2001"
Module_ApplicationDate2 SETS "23-Feb-01"
Module_ApplicationDate4 SETS "23-Feb-2001"
Module_Date SETS "16 Mar 2001"
Module_ApplicationDate2 SETS "16-Mar-01"
Module_ApplicationDate4 SETS "16-Mar-2001"
Module_ComponentName SETS "DeviceFS"
Module_ComponentPath SETS "RiscOS/Sources/HWSupport/DeviceFS"
Module_FullVersion SETS "0.56"
Module_HelpVersion SETS "0.56 (23 Feb 2001)"
Module_FullVersion SETS "0.57"
Module_HelpVersion SETS "0.57 (16 Mar 2001)"
END
/* (0.56)
/* (0.57)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 0.56
#define Module_MajorVersion_CMHG 0.57
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 23 Feb 2001
#define Module_Date_CMHG 16 Mar 2001
#define Module_MajorVersion "0.56"
#define Module_Version 56
#define Module_MajorVersion "0.57"
#define Module_Version 57
#define Module_MinorVersion ""
#define Module_Date "23 Feb 2001"
#define Module_Date "16 Mar 2001"
#define Module_ApplicationDate2 "23-Feb-01"
#define Module_ApplicationDate4 "23-Feb-2001"
#define Module_ApplicationDate2 "16-Mar-01"
#define Module_ApplicationDate4 "16-Mar-2001"
#define Module_ComponentName "DeviceFS"
#define Module_ComponentPath "RiscOS/Sources/HWSupport/DeviceFS"
#define Module_FullVersion "0.56"
#define Module_HelpVersion "0.56 (23 Feb 2001)"
#define Module_FullVersion "0.57"
#define Module_HelpVersion "0.57 (16 Mar 2001)"
......@@ -176,8 +176,10 @@
GET s.Errors
GET s.Macros
[ :LNOT: :DEF: standalonemessages
GBLL standalonemessages
[ :DEF: standalone
standalonemessages SETL standalone
|
standalonemessages SETL {FALSE}
]
......@@ -334,6 +336,7 @@ debugtransmitchar SETL true :LAND: debug
;
; Now define module header.
;
AREA |DeviceFS$$Code|, CODE, READONLY, PIC
module_start & 0
& init -module_start ; initialisation code
......@@ -411,7 +414,7 @@ ModuleFlags DCD ModuleFlag_32bit
; is, then we reset the workspace as required.
;
init ENTRY
init Entry
LDR r2, [wp]
TEQ r2, #0 ; do we need to claim any workspace?
BNE %10
......@@ -462,7 +465,7 @@ init ENTRY
; any extra workspace and removing the filing system reference.
;
final ENTRY
final Entry
LDR wp, [wp] ; -> workspace
LDR r0, Flags
......@@ -647,7 +650,7 @@ swidespatch ROUT
; is granted, infact the callback is removed (via OS_RemoveCallBack).
;
StartCallBack ENTRY "r0,r1"
StartCallBack Entry "r0,r1"
ADR r0, callback ; -> callback routine
MOV r1, wp
SWI XOS_AddCallBack
......@@ -660,7 +663,7 @@ StartCallBack ENTRY "r0,r1"
; this routine is called as the callback utility.
;
callback ENTRY "r0,r1"
callback Entry "r0,r1"
LDR r0, Flags
BIC r0, r0, #f_CallBackPending
STR r0, Flags ; clear the callback bit
......@@ -716,7 +719,7 @@ callback ENTRY "r0,r1"
; remove all currently associated devices and then return.
;
Register ENTRY "r0-pr"
Register Entry "r0-pr"
MOV pr, #0 ; no parent record yet
Debug register, "global flags word",r0
......@@ -813,7 +816,7 @@ Register ENTRY "r0-pr"
; have been removed, this should close all file objects.
;
Deregister ENTRY "r0-dr"
Deregister Entry "r0-dr"
MOV pr, r0 ; pr -> parent record (we hope!)
LDR r0, [pr, #parent_ValidationWord]
......@@ -905,7 +908,7 @@ Deregister ENTRY "r0-dr"
; the list of devices specified to be registered - eh?!
;
RegisterObj ENTRY "r0-pr"
RegisterObj Entry "r0-pr"
MOV pr, r0 ; r0 -> parent record
LDR r0, [pr, #parent_ValidationWord]
......@@ -971,7 +974,7 @@ RegisterObj ENTRY "r0-pr"
; required system variables are defined.
;
registerdev ENTRY "r0-r7, fr, dr"
registerdev Entry "r0-r7, fr, dr"
LDR r2, [r1, #dr_DeviceNameOffset]
ADD r2, r2, r1 ; -> device name
......@@ -1210,7 +1213,7 @@ registerdev ENTRY "r0-r7, fr, dr"
; unset all associated system variables and tidy up memory as required.
;
DeregisterObj ENTRY "r0-pr"
DeregisterObj Entry "r0-pr"
MOV pr, r0 ; setup parent record
......@@ -1268,7 +1271,7 @@ DeregisterObj ENTRY "r0-pr"
; used currently.
;
deregisterdev ENTRY "r0, r2-r5, pr"
deregisterdev Entry "r0, r2-r5, pr"
Debug deregister, "device to be deregister", r1
Debug deregister, "parent is", pr
......@@ -1514,7 +1517,7 @@ CallDevice ROUT
; device.
;
Threshold ENTRY "r0-r3"
Threshold Entry "r0-r3"
LDR r0, [r1, #file_BufferHandle]
CMP r0, #-1 ; is the object buffered?
ADREQL r0, ErrorBlock_DeviceFS_MustBeBuffered
......@@ -1547,7 +1550,7 @@ Threshold ENTRY "r0-r3"
; file handle and then issue and event to the actual device.
;
SetupThreshold ENTRY "r0-r3"
SetupThreshold Entry "r0-r3"
LDR r3, Flags
TST r3, #f_UpCallV ; do I currently own the UpCallV?
EXIT NE ; yes, so don't claim again
......@@ -1575,7 +1578,7 @@ SetupThreshold ENTRY "r0-r3"
; devicefs.
;
RemoveThreshold ENTRY "r0-r3"
RemoveThreshold Entry "r0-r3"
LDR r3, Flags
TST r3, #f_UpCallV ; do I currently have an claim on UpCallV
EXIT EQ ; and then return
......@@ -1679,7 +1682,7 @@ UpCall ROUT
; away.
;
ReceivedChar ENTRY "r0-r3, fr, r9"
ReceivedChar Entry "r0-r3, fr, r9"
SavePSR lr
BIC lr, lr, #C_bit ; clear C bit from saved PSR
......@@ -1753,7 +1756,7 @@ ReceivedChar ENTRY "r0-r3, fr, r9"
; is buffered, if not then it will attempt to read the transmit.
;
TransmitChar ENTRY "r1-r3, fr, r9"
TransmitChar Entry "r1-r3, fr, r9"
SavePSR lr
BIC lr, lr, #C_bit :OR: V_bit ; clear C and V from return PSR
......@@ -1898,7 +1901,7 @@ CopyNoTerm LDRB r2, [r0], #1
; Nzcv if r1 < r2
;
CompareStrings ENTRY "r0-r3"
CompareStrings Entry "r0-r3"
10
CMP r1, r0 ; if reached end of comparison
EXIT EQ ; then say they're equal
......@@ -1923,7 +1926,7 @@ CompareStrings ENTRY "r0-r3"
; Attempt to open the messages file.
OpenMessages ENTRY "r0-r3"
OpenMessages Entry "r0-r3"
LDR r3, Flags
TST r3, #f_WeHaveMessages ; do we have an open messages block?
......@@ -1941,7 +1944,7 @@ OpenMessages ENTRY "r0-r3"
; Attempt to close the messages file.
CloseMessages ENTRY "r0"
CloseMessages Entry "r0"
LDR r0, Flags
TST r0, #f_WeHaveMessages ; do we have any messages?
EXIT EQ ; and return if not!
......@@ -1957,7 +1960,7 @@ CloseMessages ENTRY "r0"
; Generate an error based on the error token given. Does not assume that
; the messages file is open. Will attempt to open it, then look it up.
MakeErrorWithFS_name ENTRY "r1-r7"
MakeErrorWithFS_name Entry "r1-r7"
ADRL r4, fs_name
B MakeErrorEntry
......
......@@ -33,7 +33,7 @@ close SETD false ;sets the close debug flag, somehow not visable from version
; perform an escape check, set r0 -> error block if escape is pressed.
;
checkescape ENTRY
checkescape Entry
[ Use0PageForESC
MOV lr, #0
LDRB lr, [lr, #ESC_Status]
......@@ -66,7 +66,7 @@ checkescape ENTRY
; errors are reported and no global states are setup.
;
StartFSystem ENTRY "r0-r3"
StartFSystem Entry "r0-r3"
MOV r0, #FSControl_AddFS
ADRL r1, module_start ; -> base of module
LDR r2, =fs_control -module_start ; = offset of block from module base
......@@ -116,7 +116,7 @@ fs_badop
; removes it and returns no errors if it went wrong.
;
RemoveFSystem ENTRY "r0-r1"
RemoveFSystem Entry "r0-r1"
MOV r0, #FSControl_RemoveFS
ADRL r1, fs_name ; -> fs name to be removed
SWI XOS_FSControl
......@@ -142,7 +142,7 @@ RemoveFSystem ENTRY "r0-r1"
; structure has changed.
;
IssueUpCall ENTRY "r0-r9"
IssueUpCall Entry "r0-r9"
MOV r9, r0 ; = reason code
LDR r8, fs_infoword ; = fsystem information word
MOV r6, #0 ; = no special fields
......@@ -561,7 +561,7 @@ wakeup EntryS "r0-r3"
[ wakeup_data_present
; wake up code, this is called when some data is inserted into a dormant RX buffer.
wakeup_rx ENTRY "r0-r9" ; Stack everything, in case CallAVector corrupts it
wakeup_rx Entry "r0-r9" ; Stack everything, in case CallAVector corrupts it
ASSERT (IRQ_mode :AND: :NOT: SVC_mode) = 0
......@@ -585,7 +585,7 @@ wakeup_rx ENTRY "r0-r9" ; Stack everything, in case CallAVector corrupts it
]
; detach code, this is called when someone tries to deregister the buffer, or link it some other device
detach ENTRY "r0-r2"
detach Entry "r0-r2"
MOV r1, #Service_DeviceFSCloseRequest
LDR r2, [r8, #file_FSwitchHandle] ; get file handle
SWI XOS_ServiceCall
......@@ -607,7 +607,7 @@ detach ENTRY "r0-r2"
; out: EQ => succeeded in closing enough
; NE => failed to close enough
RequestCloseInputs ENTRY "r0-r3,r5"
RequestCloseInputs Entry "r0-r3,r5"
Debug open, "RequestCloseInputs called"
......@@ -669,7 +669,7 @@ RequestCloseStreams
; or extracting a character from the buffer.
;
fs_get ENTRY "r0-r2, fr,pr"
fs_get Entry "r0-r2, fr,pr"
Debug fs, "fs_get"
......@@ -792,7 +792,7 @@ checkfileTXOK ALTENTRY
; data into a buffer (if applicable), writing the RXTX word with this
; piece of data and then waking the device up.
fs_put ENTRY "r0-r2, fr, r9"
fs_put Entry "r0-r2, fr, r9"
Debug fs, "fs_put"
......@@ -930,7 +930,7 @@ fs_args ROUT
; handle ioctl's
args_ioctl ROUT
ENTRY "r0-r3, fr,pr"
Entry "r0-r3, fr,pr"
LDR r0, [r2, #0] ; load ioctl reason codes and flags
BIC r0, r0, #&ff00ffff
......@@ -1009,7 +1009,7 @@ ioctl_miscop_nonblock
; handle checking of the file extent
args_ext ENTRY "r0-r1,r3-r6, fr"
args_ext Entry "r0-r1,r3-r6, fr"
MOV fr, r1 ; -> file record
......@@ -1070,13 +1070,13 @@ args_ext ENTRY "r0-r1,r3-r6, fr"
; that r1 on entry contains the internal handle passed to and from fileswitch to
; the filing system.
checkeof ENTRY "r2" ; internal routine,
checkeof Entry "r2" ; internal routine,
BL args_eof
CMPVC r2, #1 ; exits CS for EOF, else CC
EXIT
args_eof ENTRY "r0,r1,r3-r6, fr"
args_eof Entry "r0,r1,r3-r6, fr"
Debug eof, "args_eof called"
......@@ -1138,7 +1138,7 @@ args_eof ENTRY "r0,r1,r3-r6, fr"
; quick exit from these operations.
;
args_flush ENTRY "r1-r3,fr"
args_flush Entry "r1-r3,fr"
Debug flush, "Entered Flush"
ADDS fr, r1, #0 ; clear V!
......@@ -1177,7 +1177,7 @@ args_loadexec MOV r2, #0
; unlinking the device from the buffer and then closing down the device.
;
fs_close ENTRY "dr, pr"
fs_close Entry "dr, pr"
Debug close,"Closing file"
Debug fs, "fs_close"
......@@ -1187,7 +1187,7 @@ fs_close ENTRY "dr, pr"
EXIT
removefileblock ENTRY "r0-r5, dr, pr" ; attempt to zap record at 'FR'
removefileblock Entry "r0-r5, dr, pr" ; attempt to zap record at 'FR'
Debug close,"removing file block"
......@@ -1409,7 +1409,7 @@ fs_func ROUT
; r4 = index of next item to read (-1 if you were at end and didn't return any this call ie r3=0)
file_enumdir ENTRY "r0-r2, r5-r7, dr, pr"
file_enumdir Entry "r0-r2, r5-r7, dr, pr"
CMP r3, #0 ; if asking for none
EXIT EQ ; then return straight away
......@@ -1601,7 +1601,7 @@ file_enumdir ENTRY "r0-r2, r5-r7, dr, pr"
; in: R1 -> wildcarded pathname
; out: R1 -> pathname, with "$." removed
skipdollar ENTRY
skipdollar Entry
LDRB lr, [r1]
CMP lr, #"$"
EXIT NE
......@@ -1646,7 +1646,7 @@ fs_gbpb ROUT
; read a largish lump from the device.
gbpb_get ENTRY "r0-r3, fr, r9, pr"
gbpb_get Entry "r0-r3, fr, r9, pr"
MOV fr, r1 ; -> file record
LDR pr, [fr, #file_Parent]
......@@ -1732,7 +1732,7 @@ gbpb_get ENTRY "r0-r3, fr, r9, pr"
; Give a huge lump of data to the device.
gbpb_put ENTRY "r0-r3, fr, r9"
gbpb_put Entry "r0-r3, fr, r9"
[ false
Push "r0-r3"
......@@ -1899,7 +1899,7 @@ purgeoutputbuffer EntryS "r0-r2,r9"
; specified is a sub-path of a device (eg $.Parallel.Fred), return object
; type object_subdevice.
findobject ENTRY "r1,r6,r7"
findobject Entry "r1,r6,r7"
BL skipdollar
......@@ -1992,7 +1992,7 @@ findobject ENTRY "r1,r6,r7"
; contents.
;
HandleSpecial ENTRY "r0-r6"
HandleSpecial Entry "r0-r6"
BL DecodeSpecial
STRVS r0, [sp]
......
......@@ -14,21 +14,11 @@
;
; > Sources.ResFiles
;
MACRO
$lab MyFileA $name
$lab ResourceFile $name, Apps.!$ApplicationName..$name
MEND
MACRO
$lab MyFileR $name
$lab ResourceFile Resources.<Locale>.$name, Resources.$ApplicationName..$name
$lab ResourceFile $MergedMsgs, Resources.$ApplicationName..$name
MEND
; Insert here the names of the files to be put into Resources:$.Apps.!<app>
; The source files are held in the DataFiles directory
; eg. MyFileA !Run
; Insert here the names of the files to be put into Resources:$.Resources.<app>
; The source files are held in the DataFiles directory
......
; 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.
;
; > StandAlone
; Makes version of DeviceFS with messages bound in
GBLL standalonemessages
standalonemessages SETL {TRUE}
LNK s.DeviceFS
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