Commits (4)
  • Robert Sprowson's avatar
    Clean up pass · 5eebac9d
    Robert Sprowson authored
    * Use Command macro to make the command name table
    * Rename ModuleBase to Module_BaseAddr (for Command macro)
    * Split messages into CmdHelp+Messages files
    * Use international_help switch passed in from makefile to decide which to build; remove "NewOS" and "N310OS" equivalents
    * Use Hdr:OsBytes to name OS_Byte value in R0
    * ASCII_UpperCase macro
    * Remove some unused headers
    * {TRUE} and {FALSE} from ObjAsm
    Not tagged.
    5eebac9d
  • Robert Sprowson's avatar
    Minor fixes · ca0a32b3
    Robert Sprowson authored
    Interface.s: Use error &1E6 for Bad SWI.
    HelpTexts: Use hardspaces to ensure the print server lines up with other *Configure values.
    Commands.s: Fix top-bit-set address bug where commands issued above 2G would be interpreted as a *Configure syntax request. Sort out confusion about internationalising configure commands - the 'PS' of the status report shouldn't be looked up since that would mean the *Configure command changed for each language.
    
    Tested on a high vectors ARMv7 with strict alignment checking enabled, printing a ~170k DrawFile through PrinterManager 1.83 through NetI 6.26 to !Spooler 1.10 via Ethernet physical link.
    
    Version 5.60. Tagged as 'NetPrint-5_60'
    ca0a32b3
  • Robert Sprowson's avatar
    Label rename · 487539da
    Robert Sprowson authored
    Name the NoSuchSWI label the same way the Err macro would do.
    Retagged as NetPrint-5_60.
    487539da
  • Robert Sprowson's avatar
    Add support for RAM variant · ad90fb99
    Robert Sprowson authored
    Usual boiler plate code to register with ResourceFS. Tested briefly on a Risc PC.
    
    Version 5.61. Tagged as 'NetPrint-5_61'
    ad90fb99
SUBT Strings for Help messages. => &.Arthur.NetPrint.HelpTexts
[ NetPrint_Inter_Help <> 0
[ international_help
HelpSetPS = "HNPRSPS",0
BadSetPSSyn = "SNPRSPS",0
SetPS_Help = "HNPRSPS",0
SetPS_Syntax = "SNPRSPS",0
HelpPS = "HNPRPS",0
BadPSSyn = "SNPRPS",0
PS_Help = "HNPRPS",0
PS_Syntax = "SNPRPS",0
HelpListPS = "HNPRLPS",0
BadListPSSyn = "SNPRLPS",0
ListPS_Help = "HNPRLPS",0
ListPS_Syntax = "SNPRLPS",0
HelpForConfigurePS = "HNPRCPS",0
SyntaxOfConfigurePS = "SNPRCPS",0
ConfigurePS_Help = "HNPRCPS",0
ConfigurePS_Syntax = "SNPRCPS",0
SyntaxOnlyOfConfigurePS = "ConfPS", 0
|
HelpSetPS
SetPS_Help
= "*"
= TokenEscapeChar,Token0
= " changes the current printer server name or number. "
......@@ -26,45 +26,45 @@ HelpSetPS
= "to the initialised state and will use configured state "
= "if the next open (or save) does not explicitly quote "
= "either a name or a number", 13
BadSetPSSyn
SetPS_Syntax
= "Syntax: *"
= TokenEscapeChar,Token0
= " [<printer server name>|<station number>]", 0
HelpPS
PS_Help
= "*"
= TokenEscapeChar,Token0
= " selects new default printer server for the next "
= "use of the printer server. If no argument is supplied "
= "the current printer server name and/or number are "
= "printed out, along with the status of that server.", 13
BadPSSyn
PS_Syntax
= "Syntax: *"
= TokenEscapeChar,Token0
= " [<printer server name>|<station number>]", 0
HelpListPS
ListPS_Help
= "*"
= TokenEscapeChar,Token0
= " shows the names of all the currently available printer "
= "servers. If the optional argument is supplied then the "
= "status of each server will also be displayed.", 13
BadListPSSyn
ListPS_Syntax
= "Syntax: *"
= TokenEscapeChar,Token0
= " [-full]", 0
HelpForConfigurePS
ConfigurePS_Help
= "*Configure PS sets the default name or number for the "
= "printer server. This name or number will be used if "
= "the first open (or save) does not explicitly quote "
= "either a name or a number", 13
SyntaxOfConfigurePS
ConfigurePS_Syntax
= "Syntax: *Configure "
[ :LNOT: UseMsgTrans
SyntaxOnlyOfConfigurePS
]
= "PS <printer server name>|<station number>", 0
= "PS", 31, 31, 31, 31, 31, 31, 31, 31, 31, "<printer server name>|<station number>", 0
[ UseMsgTrans
SyntaxOnlyOfConfigurePS = "ConfPS", 0
......
......@@ -14,16 +14,9 @@
#
# Makefile for NetPrint
#
# ***********************************
# *** C h a n g e L i s t ***
# ***********************************
# Date Name Description
# ---- ---- -----------
# 20-Dec-02 KJB Created.
#
COMPONENT = NetPrint
ROM_SOURCE = NewOS
ROM_SOURCE = Module.s
TOKHELPSRC = ${TOKENSOURCE}
HELPSRC = HelpTexts
......
| 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
TTL ==> &.Arthur.NetPrint.N310OS
GBLL OldOs
OldOs SETL {FALSE}
GBLL UseMsgTrans
UseMsgTrans SETL {TRUE}
GBLL UseInterHelp
UseInterHelp SETL {FALSE}
GBLS OsString
OsString SETS " (3.10)"
LNK s.Module
TTL ==> &.Arthur.NetPrint.NewOS
GBLL OldOs
OldOs SETL {FALSE}
GBLL UseMsgTrans
UseMsgTrans SETL {TRUE}
GBLL UseInterHelp
UseInterHelp SETL {TRUE}
GBLS OsString
OsString SETS ""
LNK s.Module
No preview for this file type
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.59"
Module_Version SETA 559
Module_MajorVersion SETS "5.61"
Module_Version SETA 561
Module_MinorVersion SETS ""
Module_Date SETS "14 Mar 2011"
Module_ApplicationDate SETS "14-Mar-11"
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.59"
Module_HelpVersion SETS "5.59 (14 Mar 2011)"
Module_FullVersion SETS "5.61"
Module_HelpVersion SETS "5.61 (24 Aug 2016)"
END
/* (5.59)
/* (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.59
#define Module_MajorVersion_CMHG 5.61
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 14 Mar 2011
#define Module_Date_CMHG 24 Aug 2016
#define Module_MajorVersion "5.59"
#define Module_Version 559
#define Module_MajorVersion "5.61"
#define Module_Version 561
#define Module_MinorVersion ""
#define Module_Date "14 Mar 2011"
#define Module_Date "24 Aug 2016"
#define Module_ApplicationDate "14-Mar-11"
#define Module_ApplicationDate "24-Aug-16"
#define Module_ComponentName "NetPrint"
#define Module_ComponentPath "castle/RiscOS/Sources/FileSys/NetPrint"
#define Module_FullVersion "5.59"
#define Module_HelpVersion "5.59 (14 Mar 2011)"
#define Module_LibraryVersionInfo "5:59"
#define Module_FullVersion "5.61"
#define Module_HelpVersion "5.61 (24 Aug 2016)"
#define Module_LibraryVersionInfo "5:61"
......@@ -15,42 +15,17 @@
TTL ==> &.Arthur.NetPrint.Commands
Commands
= "SetPS",0
Command "SetPS", 1, 0, NetPrint_Inter_Help
Command "PS", 1, 0, NetPrint_Inter_Help
Command "ListPS", 1, 0, NetPrint_Inter_Help
Command "PS", 1, 1, NetPrint_Inter_Help :OR: Status_Keyword_Flag, ConfigurePS
DCD 0 ; Table terminator
ALIGN
& SetPScode - ModuleBase
InfoWord 1, 0, NetPrint_Inter_Help
& BadSetPSSyn - ModuleBase
& HelpSetPS - ModuleBase
= "PS",0
ALIGN
& PScode - ModuleBase
InfoWord 1, 0, NetPrint_Inter_Help
& BadPSSyn - ModuleBase
& HelpPS - ModuleBase
= "ListPS",0
ALIGN
& ListPScode - ModuleBase
InfoWord 1, 0, NetPrint_Inter_Help
& BadListPSSyn - ModuleBase
& HelpListPS - ModuleBase
= "PS",0
ALIGN
& ConfigurePS - ModuleBase
InfoWord 1, 1, Status_Keyword_Flag :OR: NetPrint_Inter_Help
& SyntaxOfConfigurePS - ModuleBase
& HelpForConfigurePS - ModuleBase
& 0 ; Table terminator
ALIGN
GET TokHelpSrc.s
SetPScode ROUT
SetPS_Code ROUT
; R0 points to parameter after command
; Trash R1 to R6
LDR wp, [ r12 ]
......@@ -80,7 +55,7 @@ ExitGSTransName
STRVS r0, [ sp, #0 ]
Pull "r0-r2, pc"
PScode ROUT
PS_Code ROUT
; R0 points to parameter after command
; Trash R1 to R6
LDR wp, [ r12 ]
......@@ -134,7 +109,7 @@ PrintStr
= 0
ALIGN
ListPScode ROUT
ListPS_Code ROUT
LDR wp, [ r12 ]
TEQ r1, #0 ; The number of parameters
BNE Examine
......@@ -291,6 +266,12 @@ FullHeader
ADR r6, StatusBuffer
B PrintHeader
Token_PSName
DCB "PSName", 0
Token_PSFullHeader
DCB "PSHead", 0
ALIGN
GetGivenStatus ROUT
Push "r0, r1, r2, lr" ; Make stack frame for reception into 'R0'
B %50
......@@ -472,11 +453,11 @@ ErrorBufferOverflow
LTORG
ConfigurePS ROUT
ConfigurePS_Code ROUT
Push lr
LDR wp, [ r12 ]
CMP r0, #1
BGT %60 ; Configure
BHI %60 ; Configure
BEQ %02 ; Print status
[ UseMsgTrans
......@@ -488,64 +469,6 @@ ConfigurePS ROUT
BL LookupAndPrint
SWIVC XOS_NewLine
B %95
02 ; Print the current seting of *Con. PS
MOV r0, #ReadCMOS
MOV r1, #NetPSIDCMOS
SWI XOS_Byte
BVS %95
TEQ r2, #0 ; Check flag for Numeric or Textual
BEQ %20 ; Text
MOV r3, r2 ; Save station number
MOV r1, #NetPSIDCMOS + 1
SWI XOS_Byte
BVS %95
MOV r1, r3
Push "r1, r2"
MOV r0, sp
ADR r1, TempPSName
MOV r2, #?TempPSName
SWI XOS_ConvertNetStation
INC sp, 8
ADR r1, Token_PSNumber
B %50 ; Now print it out
20
ADR r4, TempPSName
MOV r1, #NetPSIDCMOS + 1
SWI XOS_Byte
BVS %95
STRB r2, [ r4 ], #1
TEQ r2, #0
BEQ %40
MOV r1, #PSNameCMOS
30
SWI XOS_Byte
BVS %95
STRB r2, [ r4 ], #1
TEQ r2, #0
BEQ %40
INC r1
TEQ r1, #PSNameCMOS + 5
BNE %30
MOV r2, #0
STRB r2, [ r4 ]
40
ADR r1, Token_PSName
50
ADR r4, TempPSName
MOV r5, #0
MOV r6, #0
BL LookupAndPrint
B %95
Token_PSName
DCB "PSName", 0
Token_PSNumber
DCB "PSNumb", 0
Token_PSFullHeader
DCB "PSHead", 0
ALIGN
| ; UseMsgTrans
01
ADRL r0, SyntaxOnlyOfConfigurePS
......@@ -553,15 +476,15 @@ Token_PSFullHeader
SWI XOS_PrettyPrint
SWIVC XOS_NewLine
B %95
02 ; Print the current seting of *Con. PS
]
02 ; Print the current setting of *Con. PS
ADR r1, TemporaryBuffer
MOV r3, #30
BL AddString
= "Printer server ", 0
= "PS",31,31,31,31,31,31,31,31,31,0 ; Hardspaces for PrettyPrint
ALIGN
MOV r4, r1
MOVVC r0, #ReadCMOS
MOVVC r0, #OsByte_ReadCMOS
MOVVC r1, #NetPSIDCMOS
SWIVC XOS_Byte
BVS %95
......@@ -609,7 +532,6 @@ Token_PSFullHeader
SWI XOS_PrettyPrint
SWIVC XOS_NewLine
B %95
] ; UseMsgTrans
60 ; Configure
MOV r1, r0
......@@ -623,7 +545,7 @@ Token_PSFullHeader
SWI XEconet_ReadStationNumber ; R3.R2
BVS %95
MOV r4, r2 ; Save the station number
MOV r0, #ReadCMOS
MOV r0, #OsByte_ReadCMOS
MOV r1, #NetPSIDCMOS
SWI XOS_Byte
BVS %95
......@@ -656,7 +578,7 @@ ErrorUnableToDefault
]
68
MOV r0, #WriteCMOS
MOV r0, #OsByte_WriteCMOS
MOV r1, #NetPSIDCMOS
MOVS r2, r4
SWIPL XOS_Byte
......@@ -678,7 +600,7 @@ ErrorUnableToDefault
CMP r2, #7
BGT %90
MOV r4, r1
MOV r0, #WriteCMOS
MOV r0, #OsByte_WriteCMOS
MOV r1, #NetPSIDCMOS
MOV r2, #0
SWI XOS_Byte
......
......@@ -15,21 +15,21 @@
SUBT ==> &.Arthur.NetPrint.FileSystem
InfoBlock
DCD ModuleTitle - ModuleBase
DCD ModuleTitle - Module_BaseAddr
DCD 0 ; No initialise string
DCD OpenStream - ModuleBase
DCD GetByte - ModuleBase
DCD PutByte - ModuleBase
DCD Args - ModuleBase
DCD CloseStream - ModuleBase
DCD WholeFile - ModuleBase
DCD OpenStream - Module_BaseAddr
DCD GetByte - Module_BaseAddr
DCD PutByte - Module_BaseAddr
DCD Args - Module_BaseAddr
DCD CloseStream - Module_BaseAddr
DCD WholeFile - Module_BaseAddr
[ OldOs
DCD fsinfo_special + fsinfo_nullnameok + fsnumber_netprint
|
DCD fsinfo_special + fsinfo_nullnameok + fsinfo_alwaysopen + fsinfo_extrainfo + fsnumber_netprint
]
DCD FunctionEntry - ModuleBase
DCD PutBytes - ModuleBase
DCD FunctionEntry - Module_BaseAddr
DCD PutBytes - Module_BaseAddr
[ :LNOT: OldOs
DCD fsextra_FSDoesCat+fsextra_FSDoesEx
]
......@@ -120,7 +120,7 @@ ErrorNetPrintInternalError
]
FunctionEntry
[ False
[ {FALSE}
DLINE "NetPrint - OsFunction"
DREG r0, "Function code = &"
DREG r1, "Address of args / First argument = &"
......@@ -536,8 +536,8 @@ PollR9R10
; OSS: User pressed Escape. Acknowledge it and return an error to FileSwitch.
BL AbandonR9R10 ; Ignore errors
MOV r0, #126
SWI XOS_Byte ; Acknowledge the Escape condition
MOV r0, #OsByte_AcknowledgeEscape
SWI XOS_Byte
BVS RemoveRecord ; Tidy up and return error
MOV r0, #Status_Escape
......@@ -550,7 +550,6 @@ PollR9R10
NotEscapeR9R10
WritePSRc USR_mode,r3 ; Enable all interrupts and go to user mode
NOP
SWI XOS_ReadMonotonicTime
MOVVC r3, #0 ; Record no error state
MOVVS r3, r0 ; Record error
......
......@@ -48,7 +48,7 @@ JumpTab
EndOfJumpTab
UnknownSWI
ADR r0, ErrorOutOfRange
ADR r0, ErrorNoSuchSWI
[ UseMsgTrans
B MakeErrorWithModuleName
|
......@@ -58,12 +58,12 @@ UnknownSWI
ASSERT NetPrintSWICheckValue-NetPrint_ReadPSNumber=(EndOfJumpTab-JumpTab)/4
[ UseMsgTrans
ErrorOutOfRange
DCD ErrorNumber_OutOfRange
ErrorNoSuchSWI
DCD ErrorNumber_NoSuchSWI
DCB "BadSWI", 0
ALIGN
|
Err OutOfRange
Err NoSuchSWI
] ; UseMsgTrans
ReadPSTimeouts ROUT
......@@ -256,7 +256,7 @@ ValidationLoop
TEQ r11, #1 ; Is the name null
BNE ExitNameValidation
SUB r10, r10, #1 ; Restore pointer
MOV r0, #ReadCMOS
MOV r0, #OsByte_ReadCMOS
MOV r1, #NetPSIDCMOS
SWI XOS_Byte
BVS ExitNameValidation
......@@ -313,9 +313,7 @@ BindName ROUT
ADD r1, r4, #PSNameSize ; End address
getpara
LDRB r2, [ r0 ], #1 ; Get character from buffer
CMP r2, #"a" ; Map "a"-"z" to "A"-"Z"
RSBGES r14, r2, #"z" ; Inverse compare
SUBGE r2, r2, #"a"-"A" ; Do the actual change
ASCII_UpperCase r2, r14
CMP r2, #" "
MOVCC r2, #" " ; Convert character to space if control
padout
......@@ -369,7 +367,6 @@ PollRx
TEQ r0, #Status_Received
BEQ ExamineReply
WritePSRc USR_mode,r3,,r4 ; Enable all interrupts and go to user mode
NOP
SWI XOS_ReadMonotonicTime
MOVVC r3, #0 ; Record no error state
MOVVS r3, r0 ; Record error
......@@ -656,7 +653,6 @@ ListServersLoop
DREG r9, "Number of entries returned = &"
]
WritePSRc USR_mode,r7,,r8 ; Enable all interrupts and go to user mode
NOP
SWI XOS_ReadMonotonicTime
MOVVC r7, #0 ; Record no error state
MOVVS r7, r0 ; Record error
......
......@@ -17,16 +17,16 @@
GET Hdr:ListOpts
GET Hdr:Macros
GET Hdr:System
GET Hdr:Machine.<Machine>
GET Hdr:CMOS
GET Hdr:ModHand
GET Hdr:Services
GET Hdr:Econet
GET Hdr:LowFSi
GET Hdr:LowFSI
GET Hdr:FSNumbers
GET Hdr:HighFSI
GET Hdr:Debug
GET Hdr:NewErrors
GET Hdr:OsBytes
GET Hdr:Tokens
GET Hdr:MsgTrans
GET Hdr:Hourglass
......@@ -34,12 +34,24 @@
GET Hdr:Symbols
GET Hdr:Proc
GET Hdr:HostFS
GET Hdr:CPU.Arch
GET Hdr:ResourceFS
GET VersionASM
GBLL OldOs
OldOs SETL {FALSE}
GBLL UseMsgTrans
UseMsgTrans SETL {TRUE}
GBLL ReleaseVersion
ReleaseVersion SETL True
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
]
; OSS 5.51 Added to new Acorn sources to permit building of RISC OS 2 NetPrint once more.
......@@ -57,7 +69,7 @@ Error$name
; OSS 5.51 If building for RISC OS 3.1 or RISC OS 2 then don't want international help.
[ UseInterHelp
[ international_help
NetPrint_Inter_Help * International_Help
|
NetPrint_Inter_Help * 0
......@@ -65,24 +77,24 @@ NetPrint_Inter_Help * 0
AREA |NetPrint$$Code|,CODE,READONLY,PIC
ModuleBase ROUT
Module_BaseAddr ROUT
DCD 0 ; Start
DCD InitCode - ModuleBase ; Initialisation
DCD DieCode - ModuleBase ; Die
DCD Service - ModuleBase ; Service
DCD ModuleTitle - ModuleBase ; Title
DCD Help - ModuleBase ; Help String
DCD Commands - ModuleBase ; Combined Help/* command table
DCD Module_SWISystemBase + ( NetPrintSWI * Module_SWIChunkSize )
DCD SWICode - ModuleBase ; Offset of code to handle SWIs
DCD SWINames - ModuleBase ; Offset of a table of SWI names
DCD InitCode - Module_BaseAddr ; Initialisation
DCD DieCode - Module_BaseAddr ; Die
DCD Service - Module_BaseAddr ; Service
DCD ModuleTitle - Module_BaseAddr ; Title
DCD Help - Module_BaseAddr ; Help String
DCD Commands - Module_BaseAddr ; Combined Help/* command table
DCD NetPrintSWI_Base
DCD SWICode - Module_BaseAddr ; Offset of code to handle SWIs
DCD SWINames - Module_BaseAddr ; Offset of a table of SWI names
DCD 0 ; Terminate
[ NetPrint_Inter_Help <> 0
DCD MessageFileName - ModuleBase
[ international_help
DCD MessageFileName - Module_BaseAddr
|
DCD 0
]
DCD ModuleFlags - ModuleBase
DCD ModuleFlags - Module_BaseAddr
PSNameSize * 6 ; A constant
......@@ -94,10 +106,10 @@ ModuleName SETS "NetPrint"
GBLL Debug
GBLL OSSDebug
GBLL DuplicateDebug
Debug SETL ( :LNOT: ReleaseVersion ) :LAND: False
OSSDebug SETL ( :LNOT: ReleaseVersion ) :LAND: False
DuplicateDebug SETL ( :LNOT: ReleaseVersion ) :LAND: False
Host_Debug SETL (Debug :LOR: OSSDebug :LOR: DuplicateDebug) :LAND: False
Debug SETL ( :LNOT: ReleaseVersion ) :LAND: {FALSE}
OSSDebug SETL ( :LNOT: ReleaseVersion ) :LAND: {FALSE}
DuplicateDebug SETL ( :LNOT: ReleaseVersion ) :LAND: {FALSE}
Host_Debug SETL (Debug :LOR: OSSDebug :LOR: DuplicateDebug) :LAND: {FALSE}
; ****************************
......@@ -236,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
......@@ -246,7 +265,7 @@ InitLoop
TEQ r1, r4
BNE InitLoop
MOV r0, #ReadCMOS ; Now read in the configured state
MOV r0, #OsByte_ReadCMOS ; Now read in the configured state
MOV r1, #NetPSIDCMOS
SWI XOS_Byte
Pull pc, VS ; Return error
......@@ -271,8 +290,8 @@ StartAsAFilingSystem
DLINE "Space initialised, CMOS read"
]
MOV r0, #FSControl_AddFS
ADR r1, ModuleBase
LDR r2, =( InfoBlock - ModuleBase )
ADR r1, Module_BaseAddr
LDR r2, =( InfoBlock - Module_BaseAddr )
MOV r3, wp ; Address of our private workspace
SWI XOS_FSControl
Pull pc ; Return, maybe with error
......@@ -306,20 +325,32 @@ ErrorNoEconet
ServiceTable
DCD 0
DCD ServiceMain - ModuleBase
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 - ModuleBase
DCD ServiceTable - Module_BaseAddr
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
......@@ -333,12 +364,21 @@ DoReAllocatePorts
DoReDeclare
Push "r0-r3, lr"
MOV r0, #FSControl_AddFS
ADR r1, ModuleBase
LDR r2, =( InfoBlock - ModuleBase )
ADR r1, Module_BaseAddr
LDR r2, =( InfoBlock - Module_BaseAddr )
LDR r3, [ r12 ] ; The address of my private workspace
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!
......@@ -355,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
......@@ -368,7 +412,7 @@ DieCode ROUT
ReadConfiguredName
; => R10 points at destination for name
Push "r0-r2, r10, lr"
MOV r0, #ReadCMOS
MOV r0, #OsByte_ReadCMOS
MOV r1, #NetPSIDCMOS + 1
SWI XOS_Byte
BVS ExitReadName
......@@ -537,6 +581,12 @@ MessageFileName
GET Commands.s
GET FileSystem.s
[ standalone
ResourceFilesList
ResourceFile $MergedMsgs, Resources.NetPrint.Messages
DCD 0
]
[ Debug :LOR: OSSDebug :LOR: DuplicateDebug
InsertDebugRoutines
]
......