Commit ad90fb99 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Add support for RAM variant

Usual boiler plate code to register with ResourceFS. Tested briefly on a Risc PC.

Version 5.61. Tagged as 'NetPrint-5_61'
parent 487539da
| Copyright 2016 Castle Technology 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.
|
Dir <Obey$Dir>
amu_machine standalone THROWBACK=-throwback
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.60"
Module_Version SETA 560
Module_MajorVersion SETS "5.61"
Module_Version SETA 561
Module_MinorVersion SETS ""
Module_Date SETS "26 Jun 2016"
Module_ApplicationDate SETS "26-Jun-16"
Module_Date SETS "24 Aug 2016"
Module_ApplicationDate SETS "24-Aug-16"
Module_ComponentName SETS "NetPrint"
Module_ComponentPath SETS "castle/RiscOS/Sources/FileSys/NetPrint"
Module_FullVersion SETS "5.60"
Module_HelpVersion SETS "5.60 (26 Jun 2016)"
Module_FullVersion SETS "5.61"
Module_HelpVersion SETS "5.61 (24 Aug 2016)"
END
/* (5.60)
/* (5.61)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 5.60
#define Module_MajorVersion_CMHG 5.61
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 26 Jun 2016
#define Module_Date_CMHG 24 Aug 2016
#define Module_MajorVersion "5.60"
#define Module_Version 560
#define Module_MajorVersion "5.61"
#define Module_Version 561
#define Module_MinorVersion ""
#define Module_Date "26 Jun 2016"
#define Module_Date "24 Aug 2016"
#define Module_ApplicationDate "26-Jun-16"
#define Module_ApplicationDate "24-Aug-16"
#define Module_ComponentName "NetPrint"
#define Module_ComponentPath "castle/RiscOS/Sources/FileSys/NetPrint"
#define Module_FullVersion "5.60"
#define Module_HelpVersion "5.60 (26 Jun 2016)"
#define Module_LibraryVersionInfo "5:60"
#define Module_FullVersion "5.61"
#define Module_HelpVersion "5.61 (24 Aug 2016)"
#define Module_LibraryVersionInfo "5:61"
......@@ -34,6 +34,7 @@
GET Hdr:Symbols
GET Hdr:Proc
GET Hdr:HostFS
GET Hdr:ResourceFS
GET VersionASM
......@@ -43,6 +44,10 @@ OldOs SETL {FALSE}
UseMsgTrans SETL {TRUE}
GBLL ReleaseVersion
ReleaseVersion SETL {TRUE}
[ :LNOT: :DEF: standalone
GBLL standalone
standalone SETL {FALSE} ; Build-in Messages file and i/f to ResourceFS
]
[ :LNOT: :DEF: international_help
GBLL international_help
international_help SETL {TRUE} ; Default to RISC OS 3.60+ internationalisation
......@@ -243,6 +248,13 @@ InitCode ROUT
SoftStart
[ Debug
DLINE "Space claimed, Name booted"
]
[ UseMsgTrans
[ standalone
ADRL r0, ResourceFilesList
SWI XResourceFS_RegisterFiles
Pull pc, VS
]
]
ADR r0, Data
ADR r1, InitData
......@@ -315,8 +327,12 @@ ServiceTable
DCD 0
DCD ServiceMain - Module_BaseAddr
ASSERT Service_ReAllocatePorts > Service_FSRedeclare
ASSERT Service_ResourceFSStarting > Service_ReAllocatePorts
DCD Service_FSRedeclare
DCD Service_ReAllocatePorts
[ standalone
DCD Service_ResourceFSStarting
]
DCD 0
DCD ServiceTable - Module_BaseAddr
......@@ -324,10 +340,17 @@ Service ROUT
MOV r0, r0
TEQ r1, #Service_FSRedeclare
TEQNE r1, #Service_ReAllocatePorts
[ standalone
TEQNE r1, #Service_ResourceFSStarting
]
MOVNE pc, lr
ServiceMain
TEQ r1, #Service_FSRedeclare
BEQ DoReDeclare
[ standalone
TEQ r1, #Service_ResourceFSStarting
BEQ DoResourceFSStarting
]
DoReAllocatePorts
Push "r0, lr"
MOV r0, #Port_PrinterServerData
......@@ -347,6 +370,15 @@ DoReDeclare
SWI XOS_FSControl ; No way to return the error
Pull "r0-r3, pc"
[ standalone
DoResourceFSStarting
Push "r0, lr"
ADRL r0, ResourceFilesList
MOV lr, pc ; Make a return link
MOV pc, r2 ; Enter ResourceFS
Pull "r0, pc"
]
DieCode ROUT
LDR wp, [ r12 ]
Push "r7-r11, lr" ; Save registers corrupted in internal routines!
......@@ -363,6 +395,10 @@ DieCode ROUT
ST r1, MessageBlockAddress ; Mark it as closed
TEQ r0, #0
SWINE XMessageTrans_CloseFile ; Close it if it was open
[ standalone
ADRL r0, ResourceFilesList
SWI XResourceFS_DeregisterFiles
]
] ; UseMsgTrans
MOV r0, #Port_PrinterServerData
SWI XEconet_ReleasePort
......@@ -545,8 +581,14 @@ MessageFileName
GET Commands.s
GET FileSystem.s
[ Debug :LOR: OSSDebug :LOR: DuplicateDebug
[ standalone
ResourceFilesList
ResourceFile $MergedMsgs, Resources.NetPrint.Messages
DCD 0
]
[ Debug :LOR: OSSDebug :LOR: DuplicateDebug
InsertDebugRoutines
]
]
END
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