Commit d6ece89e authored by Kevin Bracey's avatar Kevin Bracey
Browse files

Added OS_Module 21 (find end of ROM module chain).

Version 4.79. Tagged as 'Kernel-4_79'
parent d1afdd90
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
GBLS Module_MinorVersion GBLS Module_MinorVersion
GBLS Module_Date GBLS Module_Date
GBLS Module_FullVersion GBLS Module_FullVersion
Module_MajorVersion SETS "4.78" Module_MajorVersion SETS "4.79"
Module_Version SETA 478 Module_Version SETA 479
Module_MinorVersion SETS "" Module_MinorVersion SETS ""
Module_Date SETS "06 May 1999" Module_Date SETS "07 May 1999"
Module_FullVersion SETS "4.78" Module_FullVersion SETS "4.79"
END END
/* (4.78) /* (4.79)
* *
* This file is automatically maintained by srccommit, do not edit manually. * This file is automatically maintained by srccommit, do not edit manually.
* *
*/ */
#define Module_MajorVersion_CMHG 4.78 #define Module_MajorVersion_CMHG 4.79
#define Module_MinorVersion_CMHG #define Module_MinorVersion_CMHG
#define Module_Date_CMHG 06 May 1999 #define Module_Date_CMHG 07 May 1999
#define Module_MajorVersion "4.78" #define Module_MajorVersion "4.79"
#define Module_Version 478 #define Module_Version 479
#define Module_MinorVersion "" #define Module_MinorVersion ""
#define Module_Date "06 May 1999" #define Module_Date "07 May 1999"
#define Module_FullVersion "4.78" #define Module_FullVersion "4.79"
...@@ -39,6 +39,7 @@ OldOpt SETA {OPT} ...@@ -39,6 +39,7 @@ OldOpt SETA {OPT}
; 29-Jul-87 APT LookupName ; 29-Jul-87 APT LookupName
; 17-Aug-87 APT EnumerateROM_Modules ; 17-Aug-87 APT EnumerateROM_Modules
; 23-Jan-91 TMD EnumerateROM_ModulesWithInfo ; 23-Jan-91 TMD EnumerateROM_ModulesWithInfo
; 07-May-99 KJB FindEndOfROM_ModuleChain
ModHandReason_Run * 0 ModHandReason_Run * 0
ModHandReason_Load * 1 ModHandReason_Load * 1
...@@ -61,6 +62,7 @@ ModHandReason_AddPoduleModule * 17 ...@@ -61,6 +62,7 @@ ModHandReason_AddPoduleModule * 17
ModHandReason_LookupName * 18 ModHandReason_LookupName * 18
ModHandReason_EnumerateROM_Modules * 19 ModHandReason_EnumerateROM_Modules * 19
ModHandReason_EnumerateROM_ModulesWithInfo * 20 ModHandReason_EnumerateROM_ModulesWithInfo * 20
ModHandReason_FindEndOfROM_ModuleChain * 21
; Real module offsets ; Real module offsets
......
...@@ -547,6 +547,7 @@ ModuleHandler ROUT ...@@ -547,6 +547,7 @@ ModuleHandler ROUT
ModuleDispatchEntry LookupName ModuleDispatchEntry LookupName
ModuleDispatchEntry EnumerateROM_Modules ModuleDispatchEntry EnumerateROM_Modules
ModuleDispatchEntry EnumerateROM_ModulesWithInfo ModuleDispatchEntry EnumerateROM_ModulesWithInfo
ModuleDispatchEntry FindEndOfROM_ModuleChain
NaffSWI ; Set V and return NaffSWI ; Set V and return
ADR R0, ErrorBlock_BadModuleReason ADR R0, ErrorBlock_BadModuleReason
...@@ -1598,6 +1599,33 @@ Module_EnumerateROM_ModulesWithInfo ROUT ...@@ -1598,6 +1599,33 @@ Module_EnumerateROM_ModulesWithInfo ROUT
Pull "r8, r9, lr" ; restore registers Pull "r8, r9, lr" ; restore registers
ExitSWIHandler ; and exit ExitSWIHandler ; and exit
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; FindEndOfROM_ModuleChain
;
; In : R1 = -1 => ROM
; = other => reserved
;
; Out: R1 = preserved
; R2 -> first word after ROM module chain
Module_FindEndOfROM_ModuleChain ROUT
CMP r1, #-1 ; Only works for the system ROM at present
ADRNEL r0, ErrorBlock_BadParameters
[ International
Push "lr",NE
BLNE TranslateError
Pull "lr",EQ
]
BNE SLVK_SetV
ADRL r2, SysModules_Info + 4 ; Step through until the end of the module chain
10 LDR r11, [r2, #-4]
TEQ r11, #0
ADDNE r2, r2, r11
BNE %BT10
ExitSWIHandler ; and exit
;************************************************************* ;*************************************************************
; Support routines. ; Support routines.
; ;
......
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