Commit a67e950d authored by Stewart Brodie's avatar Stewart Brodie
Browse files

32-bit compatible

Version 2.30. Tagged as 'ScrBlank-2_30'
parent 2ebb66d1
hdr/** gitlab-language=armasm linguist-language=armasm linguist-detectable=true
s/** gitlab-language=armasm linguist-language=armasm linguist-detectable=true
*,ffb gitlab-language=bbcbasic linguist-language=bbcbasic linguist-detectable=true
;
; This file is automatically maintained by srccommit, do not edit manually.
;
GBLS Module_MajorVersion
GBLA Module_Version
GBLS Module_MinorVersion
GBLS Module_Date
GBLS Module_FullVersion
Module_MajorVersion SETS "2.29"
Module_Version SETA 229
Module_MinorVersion SETS ""
Module_Date SETS "05 Aug 1999"
Module_FullVersion SETS "2.29"
GBLS Module_MajorVersion
GBLA Module_Version
GBLS Module_MinorVersion
GBLS Module_Date
GBLS Module_FullVersion
Module_MajorVersion SETS "2.30"
Module_Version SETA 230
Module_MinorVersion SETS ""
Module_Date SETS "15 May 2000"
Module_FullVersion SETS "2.30"
END
/* (2.29)
/* (2.30)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 2.29
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 05 Aug 1999
#define Module_MajorVersion_CMHG 2.30
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 15 May 2000
#define Module_MajorVersion "2.29"
#define Module_Version 229
#define Module_MinorVersion ""
#define Module_Date "05 Aug 1999"
#define Module_MajorVersion "2.30"
#define Module_Version 230
#define Module_MinorVersion ""
#define Module_Date "15 May 2000"
#define Module_FullVersion "2.29"
#define Module_FullVersion "2.30"
......@@ -38,7 +38,7 @@
; to do it itself. Also removed all the lid-switch related code, because
; the Portable module now refuses to turn the LCD and backlight on
; when the lid is closed.
; 08-Feb-93 BCockburn; changed GETs to use Hdr: rather than &.Hdr.
; 08-Feb-93 BCockburn; changed GETs to use Hdr: rather than &..Hdr.
; 19-Jul-93 2.16 ECN: Internationalised
; 17-May-95 2.18 WT: Added support for LCD power control on screen blank/unblank.
; 11-Jul-95 2.19 RCM: Added ScreenDim code for portables.
......@@ -444,7 +444,7 @@ BlankTimeSyn
CBlankTime ENTRY
LDR R12, [R12] ; get workspace pointer
CMP R0, #0
EXITS EQ ; should never happen
EXIT EQ ; should never happen
CMP R0, #1
BEQ CPrintTime ; *status BlankTime
......@@ -471,7 +471,8 @@ CBlankTime ENTRY
LDR R1, [R0, R3, LSL #2] ; R0 is time in centiseconds
BL Subr_SetTimeout
EXITS
CLRV
EXIT
CPrintTime
MOV R0,#ReadCMOS
......@@ -517,7 +518,7 @@ BlankTimeLoop
CMP R1,#32 ; and chop off leading spaces.
ADDEQ R0,R0,#1
BEQ BlankTimeLoop
EXITS LT ; Exit if control-char.
EXIT LT ; Exit if control-char.
BL DecodePar
BVC BlankTimeLoop
EXIT ; return V set
......@@ -564,7 +565,7 @@ WRCV DCB "W"
BlnkTim DCB "Tm", 0
ALIGN
DecodePar ENTRY "R6"
DecodePar EntryS "R6"
LDRB R1,[R0]
CMP R1,#"0" ; Check if par is a number
BLT DecodeParFlag
......@@ -574,7 +575,7 @@ DecodePar ENTRY "R6"
MOV R0,#(1<<29) ; Check 0<=R2<=2^18 (ca. 3 days)
MOV R2,#(1<<18) ; Restrict to moderate positive int (used to be MVN (a bug!))
SWI XOS_ReadUnsigned
BVS DecodeErr ; Print error and exit.
EXIT VS ; Print error and exit.
MOV R6, R1 ; save the updated strpointer
MOV R3, #100
MUL R1,R2,R3
......@@ -596,11 +597,7 @@ DecodeParFlag
ADR R0, SyntaxError
BL error_lookup
DecodeErr
Pull "R6,LR"
ORRS PC, LR, #V_bit
EXIT
[ Stork
[ International_Help=0
......@@ -624,10 +621,10 @@ DimTimeCmd ENTRY
DimTimeLoop
LDRB R1,[R0] ; Check for end
CMP R1,#32 ; and chop off leading spaces.
CMP R1,#32 ; and chop off leading spaces (clears V)
ADDEQ R0,R0,#1
BEQ DimTimeLoop
EXITS LT ; Exit if control-char.
EXIT LT ; Exit if control-char.
BL DecodeDimPar
BVC DimTimeLoop
EXIT ; return V set
......@@ -675,21 +672,17 @@ DecodeDimPar ENTRY "R6"
MOV R0,#(1<<29) ; Check 0<=R2<=2^18 (ca. 3 days)
MOV R2,#(1<<18) ; Restrict to moderate positive int (used to be MVN (a bug!))
SWI XOS_ReadUnsigned
BVS DecodeDimErr ; Print error and exit.
EXIT VS ; Print error and exit.
MOV R6, R1 ; save the updated strpointer
MOV R3, #100
MUL R1,R2,R3
BL Subr_SetDimTime ; Corrupts some registers
MOV R0,R6
EXITS
DecodeDimErr
Pull "R6,LR"
ORRS PC, LR, #V_bit
ADDS R0,R6,#0 ; clears V
EXIT
]
ClaimWriteCV ENTRY "R0-R3"
ClaimWriteCV EntryS "R0-R3"
LDR R3,VecStat
TST R3,#VecStat_WrchVClaimed
EXITS NE ; Exit if already claimed.
......@@ -701,7 +694,7 @@ ClaimWriteCV ENTRY "R0-R3"
STR R3,VecStat ; set WrchV flag
EXITS
ReleaseWriteCV ENTRY "R0-R3"
ReleaseWriteCV EntryS "R0-R3"
LDR R3,VecStat
TST R3,#VecStat_WrchVClaimed
EXITS EQ ; Exit if not already claimed.
......@@ -879,8 +872,9 @@ Finish
LDR r0, messagefilehand
CMP r0, #0
SWINE XMessageTrans_CloseFile
CLRV
Pull "PC",,^ ; don't object to dying
Pull "PC" ; don't object to dying
; Used by Service_Reset; only reclaim if it's a soft reset.
......@@ -1028,10 +1022,11 @@ Tick ENTRY "R0-R5"
EXIT EQ
; Locate mouse and see if it's changed. If so, unblank.
MOV R4,PC ; save current mode
ORR R3,R4,#SVC_mode
TEQP R3,#0 ; switch to SVC mode
MOV R0,R0 ; nop, because of prefetch
ASSERT (SVC32_mode :EOR: IRQ32_mode) = (SVC_mode :EOR: IRQ_mode)
WritePSRc SVC_mode,R3,,R4; ->SVC mode (32-bitness preserved); old PSR into R4
[ No32bitCode
NOP
]
Push "LR" ; push SVC_link
ASSERT (:INDEX:MouseBuff :AND: 3) = 3
......@@ -1043,8 +1038,10 @@ Tick ENTRY "R0-R5"
LDR R5, [R1, #1]
Pull "LR" ; pop SVC_link
TEQP R4,#0 ; restore previous mode
MOV R0,R0 ; nop, because of prefetch
RestPSR R4 ; restore previous mode
[ No32bitCode
NOP ; nop, because of ARM2 prefetch
]
[ Stork
LDR R0, Dimmed
......@@ -1157,10 +1154,10 @@ TurnScreenOff ENTRY "R0-R9"
; We could be in an interrupt, so we have to save the svc_link register
; before calling any SWI's
MOV R4,PC ; save current mode
ORR R3,R4,#SVC_mode
TEQP R3,#0 ; switch to SVC mode
MOV R0,R0 ; nop, because of prefetch
WritePSRc SVC_mode, R3,,R4 ; switch to SVC mode; old PSR into R4
[ No32bitCode
NOP
]
Push "R4,LR" ; push SVC_link
TEQ R0, #Blanked_Blanked ; If normal blanking then let someone else do it.
......@@ -1206,8 +1203,10 @@ TurnScreenOff ENTRY "R0-R9"
10
Pull "R4,LR" ; pop SVC_link
TEQP R4,#0 ; restore previous mode
MOV R0,R0 ; nop, because of prefetch
RestPSR R4 ; restore previous mode
[ No32bitCode
NOP ; nop if not 32-bit only, because of ARM2 prefetch
]
EXIT
; Turn the screen on
......@@ -1216,10 +1215,10 @@ TurnScreenOn ENTRY "R0-R9"
; We could be in an interrupt, so we have to save the svc_link register
; before calling any SWI's
MOV R4,PC ; save current mode
ORR R3,R4,#SVC_mode
TEQP R3,#0 ; switch to SVC mode
MOV R0,R0 ; nop, because of prefetch
WritePSRc SVC_mode, R3,,R4 ; switch to SVC mode; old PSR into R4
[ No32bitCode
NOP
]
Push "R4,LR" ; push SVC_link
LDR R0, Blanked
......@@ -1259,8 +1258,10 @@ TurnScreenOn ENTRY "R0-R9"
01
Pull "R4,LR" ; pop SVC_link
TEQP R4,#0 ; restore previous mode
MOV R0,R0 ; nop, because of prefetch
RestPSR R4 ; restore previous mode
[ No32bitCode
NOP ; nop if not 32-bit only, because of ARM2 prefetch
]
EXIT
[ Stork
......@@ -1271,10 +1272,10 @@ DimScreen ENTRY "R0-R9"
; We could be in an interrupt, so we have to save the svc_link register
; before calling any SWI's
MOV R4,PC ; save current mode
ORR R3,R4,#SVC_mode
TEQP R3,#0 ; switch to SVC mode
MOV R0,R0 ; nop, because of prefetch
WritePSRc SVC_mode, R3,,R4 ; switch to SVC mode; old PSR into R4
[ No32bitCode
NOP
]
Push "R4,LR" ; push SVC_link
MOV R4, #paletteV_DimScreen ; Dim/undim
......@@ -1287,8 +1288,10 @@ DimScreen ENTRY "R0-R9"
STR R1, Dimmed
00
Pull "R4,LR" ; pop SVC_link
TEQP R4,#0 ; restore previous mode
MOV R0,R0 ; nop, because of prefetch
RestPSR R4 ; restore previous mode
[ No32bitCode
NOP ; nop if not 32-bit only, because of ARM2 prefetch
]
EXIT
......@@ -1300,7 +1303,7 @@ CancelDim
LDR R0, Dimmed
TEQ R0, #0
Pull "R0"
MOVEQS PC, LR
MOVEQ PC, LR
;drop into...
;
; UndimScreen - Restore full brightness
......@@ -1309,10 +1312,10 @@ UndimScreen ENTRY "R0-R9"
; We could be in an interrupt, so we have to save the svc_link register
; before calling any SWI's
MOV R4,PC ; save current mode
ORR R3,R4,#SVC_mode
TEQP R3,#0 ; switch to SVC mode
MOV R0,R0 ; nop, because of prefetch
WritePSRc SVC_mode, R3,,R4 ; switch to SVC mode; old PSR into R4
[ No32bitCode
NOP
]
Push "R4,LR" ; push SVC_link
MOV R4, #paletteV_DimScreen ; Dim/undim
......@@ -1325,8 +1328,10 @@ UndimScreen ENTRY "R0-R9"
STR R1, Dimmed
01
Pull "R4,LR" ; pop SVC_link
TEQP R4,#0 ; restore previous mode
MOV R0,R0 ; nop, because of prefetch
RestPSR R4 ; restore previous mode
[ No32bitCode
NOP ; nop if not 32-bit only, because of ARM2 prefetch
]
EXIT
]
......@@ -1361,3 +1366,4 @@ error_lookup
InsertDebugRoutines
]
END
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