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

32-bit compatible. Tagged as Hourglass-2_12.

parent 326e92eb
......@@ -5,9 +5,9 @@
GBLS CurrentIteration
GBLL ReleaseVersion
CurrentDate SETS "28 Jun 1994"
CurrentTime SETS "12:00:57"
CurrentVersion SETS "11"
CurrentDate SETS "12 May 2000"
CurrentTime SETS "13:44:33"
CurrentVersion SETS "12"
CurrentIteration SETS "0000"
ReleaseVersion SETL True
......
......@@ -124,6 +124,8 @@ ModuleStart
DCD SWIHandlerCode-ModuleStart
DCD SWIDecodingTable-ModuleStart
DCD 0 ; SWIDecodingCode
DCD 0 ; MessagesFile
DCD FlagsTable-ModuleStart
[ OldOs
......@@ -165,6 +167,13 @@ HelpString
DCB "$OsString", 0
ALIGN
FlagsTable
[ :LNOT: No32bitCode
DCD ModuleFlag_32bit
|
DCD 0
]
InitialisationCode ROUT
Push "r0-r2, lr" ; Push the same registers as Service
LDR r2, [ r12 ] ; Is our workspace here already?
......@@ -243,14 +252,25 @@ FinalisationCode ROUT
BL SetColour
Pull pc
ASSERT Service_Error < Service_Reset
ServiceCallTable
DCD 0
DCD ServiceCallEntry - ModuleStart
DCD Service_Error
DCD Service_Reset
DCD 0
DCD ServiceCallTable - ModuleStart
ServiceCall ROUT
CMP r1, #Service_Reset ; is it reset ? EQ,CSet if so
TEQNE r1, #Service_Error*4,2 ; or error ? EQ, CClear if so
MOV r0, r0
TEQ r1, #Service_Reset
TEQNE r1, #Service_Error
MOVNE pc, lr
ServiceCallEntry
LDR wp, [ r12 ] ; get my private word
BCS DoServiceReset
B HourglassSmash ; All errors turn off the hourglass
TEQ r1, #Service_Error
BEQ HourglassSmash ; All errors turn off the hourglass
DoServiceReset
Push "r0-r2, lr"
......@@ -379,7 +399,7 @@ HourglassOff ROUT
LDRB r0, PointerDirty ; have we set up shape yet ?
TEQ r0, #0
Pull "r0-r3, pc",NE, ^ ; no, then exit
Pull "r0-r3, pc",NE ; no, then exit
MOV r0, #SetPointer ; restore old pointer
LDRB r1, OldPointer
......@@ -405,7 +425,7 @@ HourglassOff ROUT
TEQ r1, r10
BLNE SetColour
Pull "r0-r3, pc",, ^
Pull "r0-r3, pc"
; *****************************************************************************
;
......@@ -496,7 +516,12 @@ HourglassColours
STRNE r0, NewColour1 ; Put down the new value
CMP r1, #-1 ; Are we changing this colour(3)?
STRNE r1, NewColour3 ; Put down the new value
Pull "r0, r1, pc",,^ ; Return with V clear
MOV r0, #0
mrs ,r0, CPSR
TST r0, #2_11100
Pull "r0, r1, pc",EQ,^ ; Return with V clear (26-bit)
CMP r0, r0
Pull "r0, r1, pc" ; Return with V clear (32-bit)
; *****************************************************************************
;
......@@ -516,9 +541,16 @@ MyTickRoutine ROUT
STRCS r14, HourglassTimer ; if wasn't zero before, store back
BNE ExitTickRoutine ; exit if not zero now
Push "r0-r6"
[ No32bitCode
MOV r6, pc
TEQP pc, #3 ; must be SVC mode here, Enables Ints
NOP
|
mrs ,r6, CPSR
BIC r0, r6, #I32_bit+F32_bit ; enable interrupts
ORR r0, r0, #SVC_mode ; into SVC26/32
msr ,CPSR_c, r0
]
Push r14 ; save SVC r14
LDRB r0, PointerDirty ; if pointer shape needs setting up
TEQ r0, #0
......@@ -528,8 +560,12 @@ MyTickRoutine ROUT
BL SetupLEDs
BL ProgramPointer ; and show the world
Pull r14 ; restore SVC r14
[ No32bitCode
TEQP r6, #0 ; restore the mode
NOP
|
msr ,CPSR_c, r6
]
Pull "r0-r6"
ExitTickRoutine
MOV r14, #0
......
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