Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
RiscOS
S
Sources
Desktop
Wimp
Commits
3a553cf2
Commit
3a553cf2
authored
27 years ago
by
Kevin Bracey
Browse files
Options
Download
Email Patches
Plain Diff
Printer upcall changes from Spiner merged
parent
efe0b58d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
20 deletions
+72
-20
s/Wimp01
s/Wimp01
+31
-19
s/Wimp07
s/Wimp07
+41
-1
No files found.
s/Wimp01
View file @
3a553cf2
...
...
@@ -1969,7 +1969,7 @@ ChangeEnvCode
Pull
"R1,PC"
; pass it on!
UpCallCode
UpCallCode
ROUT
TEQ
R0
,#
UpCall_MediaSearchEnd
BEQ
finishupcall
; this comes round if it works!
...
...
@@ -1977,27 +1977,24 @@ UpCallCode
TEQNE
R0
,#
UpCall_MediaNotKnown
MOVNE
PC
,
LR
; Pass it on
; In
R
1 = fs number
;
R
2 -> media
title, 0
; r3 = device number (-1 for
ADFS
)
; r4 = iteration number (so we can 'reverse poll'
ADFS
)
; In
r
1 = fs number
;
r
2 -> media
name, or = -1 => r6 -> message
; r3 = device number (-1 for
irrelevant
)
; r4 = iteration number (so we can 'reverse poll'
if required
)
; r5 = timeout between reverse polls (large if not wanted)
; r6 = name of media (eg. 'disc' for FileCore)
; r6 -> media type (eg. 'disc' for FileCore) (if r2 <> -1)
; = -1 for disc (if r2 <> -1)
; -> complete message to display (if r2 = -1)
XADFS_FloppyFlags
*
Auto_Error_SWI_bit
+
&40246
; Note PRM p1-179 says that r2 may be -1 if irrelevant, the comment above
; said it may be 0. Both were wrong. We take advantage of the
; documentation to provide slightly modified behaviour, since no-one
; can have been relying on r2 = -1 working before.
Push
"R1-R6"
; no need to stash LR (we'll claim vector)
; SWI XADFS_FloppyFlags ; 4 bytes, bits 6,7 set => can poll
; AND R0,R0,R0,LSL #16
; AND R0,R0,R0,LSL #8
; MOVS R0,R0,LSR #30 ; can poll if C=1,Z=0 (HI)
; MOVHI R5,#10 ; poll every 1/10 sec
; MOVLS R5,#&10000000 ; don't poll at all!
; ADR R6,disc ; cheat
CMP
R6
,#
0
; bodge for old FileCores
ADRLT
R6
,
disc
ADRLT
L
R6
,
disc
MOVLT
R5
,#
bignum
; long timeout if R6 invalid
SUB
sp
,
sp
,#
32
...
...
@@ -2020,16 +2017,31 @@ XADFS_FloppyFlags * Auto_Error_SWI_bit + &40246
SUBS
r2
,
sp
,
#
0
; CLRV, r2 -> buffer.
;
Push
"R2-R5"
LDR
r5
,
[
sp
,
#
32
+
1
*
4
+
4
*
4
]
; media name or -1
CMP
r5
,
#-
1
BEQ
%04
ADRL
R2
,
errorbuffer
MOV
R3
,#
252
MOV
R14
,#
0
; error number
STR
R14
,[
R2
],#
4
;
ADR
R0
,
ensuredisc
; "Please insert %0 '%1'"
MOV
R4
,
R6
LDR
R5
,[
sp
,#
32
+
1
*
4
+
4
*
4
]
; Disc name
MOV
R4
,
R6
; media type
;
BL
LookupToken
; resolve into suitable string
B
%05
04
;Just use the message provided (copied into the same buffer)
ADRL
r2
,
errorbuffer
ADD
r2
,
r2
,
#
4
;don't care about error number
06
LDRB
lr
,
[
r6
],
#
1
;read from given message
STRB
lr
,
[
r2
],
#
1
;write to error buffer
TEQ
lr
,
#
0
;NUL-terminated
BNE
%06
05
Pull
"R2-R5"
;
SWI
XOS_ReadMonotonicTime
...
...
@@ -2079,7 +2091,7 @@ disc DCB "disc", 0 ; cheat
; Doesn't reset the common sprite pool (only done in Die)
;
deallocateptrs
deallocateptrs
ROUT
Push
"R0-R5,LR"
;
; release block used for holding pixtrans tables
...
...
This diff is collapsed.
Click to expand it.
s/Wimp07
View file @
3a553cf2
...
...
@@ -1638,7 +1638,27 @@ servicecallend
LDR
R14
,
commandflag
; finally un-suspend the window
BIC
R14
,
R14
,#
cf_suspended
STR
R14
,
commandflag
;
[
outlinefont
;Restore the current font and font colours that were in force on
; entry, if they've been changed. This must be done *before*
; making the service call, so the code in ExitWimp is too late.
Push
"r0-r3"
LDR
R0
,
currentfont
TEQ
R0
,
#
0
BEQ
ReportError_restored_font_colours
LDR
R1
,
systemfont
TEQ
R1
,
R0
LDRNE
R1
,
currentbg
LDRNE
R2
,
currentfg
LDRNE
R3
,
currentoffset
SWINE
XFont_SetFontColours
MOV
R0
,
#
0
STR
R0
,
currentfont
ReportError_restored_font_colours
Pull
"r0-r3"
]
MOV
R1
,#
Service_WimpReportError
MOV
R0
,#
0
; closing down
STRB
R0
,
errorbox_open
...
...
@@ -1836,6 +1856,26 @@ starterror_next
MOV
R1
,#
2
STR
R1
,[
sp
]
; cancel
[
outlinefont
;Restore the current font and font colours that were in force on
; entry, if they've been changed. This must be done *before*
; making the service call, so the code in ExitWimp is too late.
Push
"r0-r3"
LDR
R0
,
currentfont
TEQ
R0
,
#
0
BEQ
ReportError_restored_font_colours2
LDR
R1
,
systemfont
TEQ
R1
,
R0
LDRNE
R1
,
currentbg
LDRNE
R2
,
currentfg
LDRNE
R3
,
currentoffset
SWINE
XFont_SetFontColours
MOV
R0
,
#
0
STR
R0
,
currentfont
ReportError_restored_font_colours2
Pull
"r0-r3"
]
MOV
R1
,#
Service_WimpReportError
MOV
R0
,#
0
; closing down
STRB
R0
,
errorbox_open
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment