Commit 0e0d10cc authored by Robert Sprowson's avatar Robert Sprowson Committed by ROOL

Add OS_Module 22

Very much like OS_Module 12, but returns the pointer to the PW rather than its contents (or NULL if the module died during init).
parent 96988ed4
......@@ -773,7 +773,6 @@ ModuleHandler ROUT
ModuleDispatchEntry UnplugInsert
ModuleDispatchEntry ClaimAligned
Module_EnumerateROM_ModulesWithPWP
Module_UnplugInsert
NaffSWI ; Set V and return
ADR R0, ErrorBlock_BadModuleReason
......@@ -1089,10 +1088,12 @@ AreaFail
; R2 incarnation number
; Exit: R1, R2 updated to refer to next existing module
; R3 -> module code
; R4 private word contents
; R4 private word contents (for GetNames)
; private word pointer (for EnumerateROM_ModulesWithPWP)
; R5 -> postfix string
Module_GetNames ROUT
Module_EnumerateROM_ModulesWithPWP
WritePSRc SVC_mode, R11 ; interrupts on
MOV R11, R1
MOV R12, R2
......@@ -1109,7 +1110,9 @@ Module_GetNames ROUT
BEQ %FT11 ; no more incarnations
SUBS R12, R12, #1
BPL %BT02
LDR R4, [R10, #Incarnation_Workspace]
TEQ R0, #ModHandReason_GetNames
LDREQ R4, [R10, #Incarnation_Workspace]
ADDNE R4, R10, #Incarnation_Workspace
ADD R5, R10, #Incarnation_Postfix
LDR R10, [R10, #Incarnation_Link]
20 CMP R10, #0
......@@ -1126,11 +1129,14 @@ Module_GetNames ROUT
]
MakeErrorBlock NoMoreModules
11 CMP r2, #0
LDREQ r4, =&DEADDEAD
MOVEQ r10, #0
BEQ %BT20 ; fudge for modules that go bang in init/die
ADR R0, ErrorBlock_NoMoreIncarnations
11 CMP R2, #0
BNE %FT12
TEQ R0, #ModHandReason_GetNames
LDREQ R4, =&DEADDEAD ; fudge for modules that go bang in init/die
MOVNE R4, #0
MOV R10, #0
B %BT20
12 ADR R0, ErrorBlock_NoMoreIncarnations
[ International
B BumDealInModule_Translate
|
......
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