diff --git a/VersionASM b/VersionASM index b5c551e90b02435f65f838c0610823c9b26454b9..6262006bddf315c6b3ba04782da50334f4024bc6 100644 --- a/VersionASM +++ b/VersionASM @@ -9,12 +9,12 @@ GBLS Module_ApplicationDate GBLS Module_HelpVersion GBLS Module_ComponentName -Module_MajorVersion SETS "6.52" -Module_Version SETA 652 +Module_MajorVersion SETS "6.53" +Module_Version SETA 653 Module_MinorVersion SETS "" -Module_Date SETS "13 Feb 2021" -Module_ApplicationDate SETS "13-Feb-21" +Module_Date SETS "15 Feb 2021" +Module_ApplicationDate SETS "15-Feb-21" Module_ComponentName SETS "Kernel" -Module_FullVersion SETS "6.52" -Module_HelpVersion SETS "6.52 (13 Feb 2021)" +Module_FullVersion SETS "6.53" +Module_HelpVersion SETS "6.53 (15 Feb 2021)" END diff --git a/VersionNum b/VersionNum index 93443cf1f32aa86d12640c459c71e23c406256b7..0cd2b981252da603480fde53379be63da0a9788c 100644 --- a/VersionNum +++ b/VersionNum @@ -1,21 +1,21 @@ -/* (6.52) +/* (6.53) * * This file is automatically maintained by srccommit, do not edit manually. * */ -#define Module_MajorVersion_CMHG 6.52 +#define Module_MajorVersion_CMHG 6.53 #define Module_MinorVersion_CMHG -#define Module_Date_CMHG 13 Feb 2021 +#define Module_Date_CMHG 15 Feb 2021 -#define Module_MajorVersion "6.52" -#define Module_Version 652 +#define Module_MajorVersion "6.53" +#define Module_Version 653 #define Module_MinorVersion "" -#define Module_Date "13 Feb 2021" +#define Module_Date "15 Feb 2021" -#define Module_ApplicationDate "13-Feb-21" +#define Module_ApplicationDate "15-Feb-21" #define Module_ComponentName "Kernel" -#define Module_FullVersion "6.52" -#define Module_HelpVersion "6.52 (13 Feb 2021)" -#define Module_LibraryVersionInfo "6:52" +#define Module_FullVersion "6.53" +#define Module_HelpVersion "6.53 (15 Feb 2021)" +#define Module_LibraryVersionInfo "6:53" diff --git a/s/GetAll b/s/GetAll index 97b74f5b9a44e3864367803609a486534416d5e0..95a1dd6ba9efcbba387f9b53a0202ece24d12713 100644 --- a/s/GetAll +++ b/s/GetAll @@ -92,7 +92,6 @@ GET s.ARMops GET s.NewIRQs GET s.Oscli - GET s.SysComms GET s.HeapMan GET s.ModHand $GetUnsqueeze @@ -106,6 +105,7 @@ GET s.LibKern GET s.Utility GET s.MoreComms + GET s.SysComms GET s.Convrsions GET s.MoreSWIs GET s.ExtraSWIs diff --git a/s/Kernel b/s/Kernel index ada6d3263af7c063aba7320f93d153c5f2293a0b..180e3da9346f31244c26cd0bd8ffb8a2bf7d3a52 100644 --- a/s/Kernel +++ b/s/Kernel @@ -192,14 +192,6 @@ access SETA access :OR: CMA_Partially_PrivR ] MEND -; one that builds a module command table entry: -; set Module_BaseAddr to module base before use. - - GBLA Module_BaseAddr -Module_BaseAddr SETA 0 - -; - a1 RN 0 a2 RN 1 a3 RN 2 diff --git a/s/Oscli b/s/Oscli index 85215b052227fd67b9b451a95a5129736662a893..537f0bf6e5c5e8072ef04ba9f8944627fe399992 100644 --- a/s/Oscli +++ b/s/Oscli @@ -537,29 +537,11 @@ oqa_quicksilvertime_noalias MOV r2,#0 ; Must be zero for oscli_hlist_loop. Not entirely sure why! ] CMP r1,#0 - BEQ oscli_sysabbrevation + BEQ oscli_abbreviation BL SysCommsHashedLookup - B oscli_syslook_done -oscli_sysabbrevation - ] - ADRL R1, SysCommsModule - MOV R2, #SCHCTab-SysCommsModule - SEC ; carry set means sys module - BL ModCommsLookUp -oscli_syslook_done BCS OscliExit - [ Oscli_HashedCommands - ;now try UtilityModule, if non-abbreviated command Push "R2" - LDR r2,=ZeroPage - LDR r1,[r2,#Oscli_CmdHashSum] - CMP r1,#0 - Pull "R2",EQ - BEQ oscli_modabbreviation - BL UtilCommsHashedLookup - ADDCS stack, stack, #4 ;discard R2 - BCS OscliExit ;now try list of modules on hash value LDR r2,=ZeroPage LDR r1,[r2,#Oscli_CmdHashSum] @@ -594,7 +576,7 @@ oscli_hlist_loop Pull "r3,r4" ADD stack,stack,#4 B OscliExit -oscli_modabbreviation +oscli_abbreviation ] ;Oscli_HashedCommands ; now try looking round the modules. @@ -760,7 +742,7 @@ Oscli_cmd_hashsum ROUT MOV r1,#0 Pull "r0,r2-r3,PC" ; -;special entry of ModCommsLookUp, for hashed lookup of commands in SysCommsModule +;special entry of ModCommsLookUp, for hashed lookup of fudged commands ;entry: R0 -> command, r1 = hash value of command ; SysCommsHashedLookup ROUT @@ -785,35 +767,20 @@ schl_nofudgesofar CMP R4, #4 BLS schl_fudgeloop schl_nofudge - ADRL R2, SysCoHashedCmdTab + ADRL R2, UtilHashedCmdTab AND R4, R1,#Oscli_CHashValMask ;hash value, masked for command hashing LDR R2, [R2, R4, LSL #2] ;command list for this hash value - ADRL R1, SysCommsModule - CMP R2, #1 ;set carry if valid table entry - BCS ModCommsLookUp_AltEntry ;note: carry set to indicate sys module - Pull "R0, R2-R10, pc" ;bail if null hash table entry (with carry clear to indicate failure) + ADRL R1, UtilityMod + TEQ R2, #0,2 ;check R2 and clear carry + BNE ModCommsLookUp_AltEntry + Pull "R0, R2-R10, pc" ;bail if null hash table entry schl_fudge - ADRL R1, SysCommsModule + ADRL R1, UtilityMod ADRL R2, SHC_fudgeulike SUB R2, R2, R1 ;fudge command list (offset) SEC ;carry set means sys module B ModCommsLookUp_AltEntry -; -;special entry of ModCommsLookUp, for hashed lookup of commands in UtilityMod -;entry: R0 -> command, r1 = hash value of command -; - -UtilCommsHashedLookup ROUT - Push "R0, R2-R10, lr" - ADRL R2, UtilHashedCmdTab - AND R4, R1,#Oscli_CHashValMask ;hash value, masked for command hashing - LDR R2, [R2, R4, LSL #2] ;command list for this hash value - ADRL R1, UtilityMod - TEQ R2, #0,2 ;check R2 and clear carry - BNE ModCommsLookUp_AltEntry - Pull "R0, R2-R10, pc" ;bail if null hash table entry -; ] ;Oscli_HashedCommands ;*************************************************************************** diff --git a/s/SysComms b/s/SysComms index 1cae6a47cb6ce996b980d0290ae4fe88b771ffa4..1f6f91437bb3dd2859f60253c383f949ef477b57 100644 --- a/s/SysComms +++ b/s/SysComms @@ -22,28 +22,6 @@ UtilRegs SETS "r7-r10" ; Sam will preserve r0-r6 on module star entry AnyNoParms * &FF0000 ; Between 0 and 255 parameters: all flags clear - -SysCommsModule ROUT - -Module_BaseAddr SETA SysCommsModule - - & 0 ; No Start entry - & 0 ; Not initialised - & 0 - & 0 - & 0 - & SysTitle-SysCommsModule - & SCHCTab-SysCommsModule - & 0 - & 0 - & 0 - & 0 - [ International_Help <> 0 - & MessageFileName-SysCommsModule - | - & 0 - ] - SysTitle = "$SystemName", 9 [ :LEN: "$SystemName" < 8 @@ -51,167 +29,9 @@ SysTitle ] = "$VersionNo", 0 - [ Oscli_HashedCommands -; -;***WARNING*** if commands are added or changed, SysCoHashedCmdTab MUST be updated correspondingly -; - ] -SCHCTab ; Alphabetically ordered so it's easier to find stuff - - Command Append, 1, 1, International_Help - Command Build, 1, 1, International_Help - Command Close, 0, 0, International_Help - Command Create, 4, 1, International_Help - Command Delete, 1, 1, International_Help - Command Dump, 3, 1, International_Help - Command Exec, 1, 0, International_Help - Command FX, 5, 1, International_Help ; 1-3 parms, but up to 2 commas may be there - Command GO, 255, 0, International_Help -HelpText - Command Help, 255, 0, International_Help - Command Key, 255, 1, International_Help - Command Load, 2, 1, International_Help ; Fudge order for compatibility (*L.) - Command List, 3, 1, International_Help - Command Opt, 2, 0, International_Help - Command Print, 1, 1, International_Help - Command Quit, 0, 0, International_Help - Command Remove, 1, 1, International_Help - Command Save, 6, 2, International_Help ; *SAVE Fn St + Le Ex Lo (compatibility) - Command Shadow, 1, 0, International_Help - Command Spool, 1, 0, International_Help - Command SpoolOn, 1, 0, International_Help - Command TV, 3, 0, International_Help - Command Type, 3, 1, International_Help ; -file fred -tabexpand - = 0 [ Oscli_HashedCommands -; -; - Hashing table is 32 wide -; - Hashing function is: -; -; hash = (sum of all chars of command, each upper-cased) & 0x1f -; -; - Order of commands in each hashed list is alphabetical - -; Table MUST be reorganised if hashing function changed, or command set altered -; ALIGN -SysCoHashedCmdTab -; -; ! 0,"SysCoHashedCmdTab at ":CC::STR:(SysCoHashedCmdTab) -; -;First, 1 word per table entry, giving offset to hashed list on each hash value -; - DCD SHC_hash00 - SysCommsModule - DCD 0 ;null list on this hash value - DCD SHC_hash02 - SysCommsModule - DCD SHC_hash03 - SysCommsModule - DCD 0 - DCD SHC_hash05 - SysCommsModule - DCD SHC_hash06 - SysCommsModule - DCD 0 - DCD 0 - DCD SHC_hash09 - SysCommsModule - DCD SHC_hash0A - SysCommsModule - DCD 0 - DCD 0 - DCD SHC_hash0D - SysCommsModule - DCD SHC_hash0E - SysCommsModule - DCD SHC_hash0F - SysCommsModule - DCD SHC_hash10 - SysCommsModule - DCD 0 - DCD 0 - DCD SHC_hash13 - SysCommsModule - DCD SHC_hash14 - SysCommsModule - DCD 0 - DCD SHC_hash16 - SysCommsModule - DCD 0 - DCD SHC_hash18 - SysCommsModule - DCD 0 - DCD 0 - DCD 0 - DCD SHC_hash1C - SysCommsModule - DCD 0 - DCD SHC_hash1E - SysCommsModule - DCD 0 -; -; Now the hashed lists -; -SHC_hash00 - Command Load, 2, 1, International_Help ; Fudge order for compatibility (*L.) - = 0 - ALIGN -SHC_hash02 - Command Type, 3, 1, International_Help ; -file fred -tabexpand - = 0 - ALIGN -SHC_hash03 - Command Quit, 0, 0, International_Help - = 0 - ALIGN -SHC_hash05 - Command Exec, 1, 0, International_Help - = 0 - ALIGN -SHC_hash06 - Command Shadow, 1, 0, International_Help - = 0 - ALIGN -SHC_hash09 - Command Help, 255, 0, International_Help - Command Key, 255, 1, International_Help - = 0 - ALIGN -SHC_hash0A - Command SpoolOn, 1, 0, International_Help - Command TV, 3, 0, International_Help - = 0 - ALIGN -SHC_hash0D - Command Print, 1, 1, International_Help - Command Spool, 1, 0, International_Help - = 0 - ALIGN -SHC_hash0E - Command Remove, 1, 1, International_Help - = 0 - ALIGN -SHC_hash0F - Command Save, 6, 2, International_Help ; *SAVE Fn St + Le Ex Lo (compatibility) - = 0 - ALIGN -SHC_hash10 - Command Build, 1, 1, International_Help - = 0 - ALIGN -SHC_hash13 - Command Delete, 1, 1, International_Help - Command Opt, 2, 0, International_Help - = 0 - ALIGN -SHC_hash14 - Command Create, 4, 1, International_Help - = 0 - ALIGN -SHC_hash16 - Command Close, 0, 0, International_Help - Command Dump, 3, 1, International_Help - Command GO, 255, 0, International_Help - = 0 - ALIGN -SHC_hash18 - Command Append, 1, 1, International_Help - = 0 - ALIGN -SHC_hash1C - Command List, 3, 1, International_Help - = 0 - ALIGN -SHC_hash1E - Command FX, 5, 1, International_Help ; 1-3 parms, but up to 2 commas may be there - = 0 - ALIGN - ;now a small table to fudge around need for old syntax for *fx etc (ie. ;allow zero spaces between command and first, numeric, parameter) ; @@ -264,12 +84,7 @@ Help_Code ROUT ; got R0 ptr to commtail, R1 no parameters MOV r7, #0 ; anyhelpdoneyet flag DoHelpOnNextKeyWord -; now look at syscomms module. - addr r1, SysCommsModule - BL ShowHelpInModule - BVS %FT67 - -; now try looking round the modules. +; try looking round the modules. LDR R2, =ZeroPage+Module_List 11 LDR R2, [R2] CMP R2, #0 diff --git a/s/Utility b/s/Utility index 817327353073222aeb50dfc87e0ab27662d09a78..4bd13d3901a3e43b23b8e30d881e84ac0858974d 100644 --- a/s/Utility +++ b/s/Utility @@ -21,6 +21,7 @@ SysModules_Info ROUT ; start of ROM modules chain & EndOfKernel-SysModules_Info UtilityMod +Module_BaseAddr & StartSuper-UtilityMod & 0 ; no initialisation & Util_Die-UtilityMod @@ -46,8 +47,6 @@ Util_SWITab = 0 ALIGN -Module_BaseAddr SETA UtilityMod - [ ChocolateService ;service table ; @@ -206,6 +205,31 @@ UtilHelpStr = "MOS Utilities", 9, "$VersionNo", 0 ; ] UtilHelpTab + Command Append, 1, 1, International_Help + Command Build, 1, 1, International_Help + Command Close, 0, 0, International_Help + Command Create, 4, 1, International_Help + Command Delete, 1, 1, International_Help + Command Dump, 3, 1, International_Help + Command Exec, 1, 0, International_Help + Command FX, 5, 1, International_Help ; 1-3 parms, but up to 2 commas may be there + Command GO, 255, 0, International_Help +HelpText + Command Help, 255, 0, International_Help + Command Key, 255, 1, International_Help + Command Load, 2, 1, International_Help ; Fudge order for compatibility (*L.) + Command List, 3, 1, International_Help + Command Opt, 2, 0, International_Help + Command Print, 1, 1, International_Help + Command Quit, 0, 0, International_Help + Command Remove, 1, 1, International_Help + Command Save, 6, 2, International_Help ; *SAVE Fn St + Le Ex Lo (compatibility) + Command Shadow, 1, 0, International_Help + Command Spool, 1, 0, International_Help + Command SpoolOn, 1, 0, International_Help + Command TV, 3, 0, International_Help + Command Type, 3, 1, International_Help ; -file fred -tabexpand + Command Break, 0, 0, International_Help ; just help Command Cache, 1, 0, International_Help Command ChangeDynamicArea,255, 0, International_Help @@ -260,12 +284,12 @@ UtilHashedCmdTab ; ;First, 1 word per table entry, giving offset to hashed list on each hash value ; - DCD 0 ;null list on this hash value + DCD UHC_hash00 - UtilityMod DCD UHC_hash01 - UtilityMod DCD UHC_hash02 - UtilityMod - DCD 0 + DCD UHC_hash03 - UtilityMod DCD UHC_hash04 - UtilityMod - DCD 0 + DCD UHC_hash05 - UtilityMod DCD UHC_hash06 - UtilityMod DCD UHC_hash07 - UtilityMod DCD UHC_hash08 - UtilityMod @@ -273,36 +297,45 @@ UtilHashedCmdTab DCD UHC_hash0A - UtilityMod DCD UHC_hash0B - UtilityMod DCD UHC_hash0C - UtilityMod - DCD 0 - DCD 0 + DCD UHC_hash0D - UtilityMod + DCD UHC_hash0E - UtilityMod DCD UHC_hash0F - UtilityMod - DCD 0 + DCD UHC_hash10 - UtilityMod DCD UHC_hash11 - UtilityMod DCD 0 - DCD 0 + DCD UHC_hash13 - UtilityMod DCD UHC_hash14 - UtilityMod DCD 0 + DCD UHC_hash16 - UtilityMod DCD 0 - DCD 0 - DCD 0 + DCD UHC_hash18 - UtilityMod DCD UHC_hash19 - UtilityMod DCD 0 DCD UHC_hash1B - UtilityMod - DCD 0 + DCD UHC_hash1C - UtilityMod DCD 0 DCD UHC_hash1E - UtilityMod DCD UHC_hash1F - UtilityMod ; ; Now the hashed lists ; +UHC_hash00 + Command Load, 2, 1, International_Help ; Fudge order for compatibility (*L.) + = 0 + ALIGN UHC_hash01 Command Show, 1, 0, International_Help = 0 ALIGN UHC_hash02 + Command Type, 3, 1, International_Help ; -file fred -tabexpand Command Configure, 255, 0, Help_Is_Code_Flag :OR: International_Help = 0 ALIGN +UHC_hash03 + Command Quit, 0, 0, International_Help + = 0 + ALIGN UHC_hash04 Command ChangeDynamicArea,255, 0, International_Help Command RMFaster, 1, 1, International_Help @@ -310,7 +343,12 @@ UHC_hash04 Command Ignore, 1, 0, International_Help = 0 ALIGN +UHC_hash05 + Command Exec, 1, 0, International_Help + = 0 + ALIGN UHC_hash06 + Command Shadow, 1, 0, International_Help Command RMClear, 0, 0, International_Help = 0 ALIGN @@ -323,10 +361,14 @@ UHC_hash08 = 0 ALIGN UHC_hash09 + Command Help, 255, 0, International_Help + Command Key, 255, 1, International_Help Command GOS, 0, 0, International_Help = 0 ALIGN UHC_hash0A + Command SpoolOn, 1, 0, International_Help + Command TV, 3, 0, International_Help Command RMReInit, 255, 1, International_Help Command Error, 255, 1, International_Help = 0 @@ -339,23 +381,53 @@ UHC_hash0C Command Set, 255, 2, International_Help = 0 ALIGN +UHC_hash0D + Command Print, 1, 1, International_Help + Command Spool, 1, 0, International_Help + = 0 + ALIGN +UHC_hash0E + Command Remove, 1, 1, International_Help + = 0 + ALIGN UHC_hash0F + Command Save, 6, 2, International_Help ; *SAVE Fn St + Le Ex Lo (compatibility) Command IF, 255, 2, International_Help Command Unset, 1, 1, International_Help Command Time, 0, 0, International_Help = 0 ALIGN +UHC_hash10 + Command Build, 1, 1, International_Help + = 0 + ALIGN UHC_hash11 Command RMEnsure, 255, 2, International_Help = 0 ALIGN +UHC_hash13 + Command Delete, 1, 1, International_Help + Command Opt, 2, 0, International_Help + = 0 + ALIGN UHC_hash14 + Command Create, 4, 1, International_Help Command SetEval, 255, 2, International_Help Command RMRun, 255, 1, International_Help Command RMInsert, 2, 1, International_Help Command Cache, 1, 0, International_Help = 0 ALIGN +UHC_hash16 + Command Close, 0, 0, International_Help + Command Dump, 3, 1, International_Help + Command GO, 255, 0, International_Help + = 0 + ALIGN +UHC_hash18 + Command Append, 1, 1, International_Help + = 0 + ALIGN UHC_hash19 Command Modules, 0, 0, Help_Is_Code_Flag :OR: International_Help Command RMTidy, 0, 0, International_Help @@ -365,7 +437,12 @@ UHC_hash1B Command Unplug, 2, 0, International_Help = 0 ALIGN +UHC_hash1C + Command List, 3, 1, International_Help + = 0 + ALIGN UHC_hash1E + Command FX, 5, 1, International_Help ; 1-3 parms, but up to 2 commas may be there Command SetMacro, 255, 2, International_Help = 0 ALIGN @@ -393,6 +470,8 @@ Break_Syntax * Module_BaseAddr PowerOn_Code * Module_BaseAddr PowerOn_Syntax * Module_BaseAddr + LTORG + RMFaster_Code Push "lr" MOV R1, R0 @@ -836,9 +915,6 @@ KeyHelpCommon ; also used by *Configure Pull "r1,r3" ; restore r1 and get buffer pointer Pull "pc", VS ; if error, exit MOV r0, #0 - ADRL R2, SysCommsModule - BL OneModuleK - BVS %FT10 LDR R6, =ZeroPage+Module_List 12 LDR R6, [R6] CMP R6, #0