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

32-bit compatibility.

Detail:
  Updated code to use standard macros from Generic26/32 to build
    for appropriate targets.
Admin:
  Tested Phoebe and 32 machine builds.  Tested on Risc PC.

Version 1.29. Tagged as 'SystemDevs-1_29'
parent 3b46870c
;
; 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 "1.28"
Module_Version SETA 128
Module_MinorVersion SETS ""
Module_Date SETS "17 Aug 1999"
Module_FullVersion SETS "1.28"
GBLS Module_MajorVersion
GBLA Module_Version
GBLS Module_MinorVersion
GBLS Module_Date
GBLS Module_FullVersion
Module_MajorVersion SETS "1.29"
Module_Version SETA 129
Module_MinorVersion SETS ""
Module_Date SETS "10 Dec 1999"
Module_FullVersion SETS "1.29"
END
/* (1.28)
/* (1.29)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 1.28
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 17 Aug 1999
#define Module_MajorVersion_CMHG 1.29
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 10 Dec 1999
#define Module_MajorVersion "1.28"
#define Module_Version 128
#define Module_MinorVersion ""
#define Module_Date "17 Aug 1999"
#define Module_MajorVersion "1.29"
#define Module_Version 129
#define Module_MinorVersion ""
#define Module_Date "10 Dec 1999"
#define Module_FullVersion "1.28"
#define Module_FullVersion "1.29"
......@@ -85,9 +85,6 @@ OSByte_ReadPrinterDestination * 245
GET Hdr:HighFSI
GET Hdr:LowFSi
GET Hdr:NewErrors
; GET Hdr:Debug
; GET Hdr:HostDebug
; GET Hdr:HostFS
GET Hdr:CMOS
GET Hdr:Variables
GET Hdr:MsgTrans
......@@ -166,6 +163,12 @@ Module_BaseAddr
DCD SystemDevices_Title -Module_BaseAddr
DCD SystemDevices_HelpStr -Module_BaseAddr
DCD 0
[ :LNOT: No32bitCode
DCD 0, 0, 0, 0 ; SWI entries
DCD 0 ; International messages
DCD SystemDevices_Flags -Module_BaseAddr
]
SystemDevices_Title
DCB "SystemDevices", 0
......@@ -180,6 +183,11 @@ SystemDevices_HelpStr
DCB 0
ALIGN
[ :LNOT: No32bitCode
SystemDevices_Flags
DCD 1 ; 32-bit compatible
]
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; r0-r6 trashable
......@@ -253,7 +261,7 @@ SystemDevices_Service ROUT
[ standalonemessages
TEQNE r1, #Service_ResourceFSStarting
]
MOVNES pc, lr
MOVNE pc, lr
SystemDevices_ServiceEntry
......@@ -264,7 +272,7 @@ SystemDevices_ServiceEntry
ADRL r0, resourcefsfiles
MOV lr, pc
MOV pc, r2
Pull "r0-r3,pc",,^
Pull "r0-r3,pc"
30
]
ENTRY "r0"
......@@ -477,7 +485,8 @@ SystemDevices_Die ENTRY "r0-r1"
ADRL R0, resourcefsfiles
SWI XResourceFS_DeregisterFiles
]
EXITS ; Mustn't refuse to die.
CLRV
EXIT ; Mustn't refuse to die.
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; In r0 -> string to OS_CLI
......@@ -488,31 +497,39 @@ CloseAndRemoveDevice ENTRY
SWI XOS_CLI
MOV r0, #FSControl_RemoveFS
SWI XOS_FSControl
EXITS
EXIT
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Some common routines
; Out EQ -> ok
CommonArgs_Write ROUT
CommonArgs_Write ENTRY
SavePSR lr
ORR lr, lr, #Z_bit
CMP r0, #fsargs_EOFCheck ; EOF always
MOVEQ r2, #-1
ORREQS pc, lr, #Z_bit ; EQ
CommonArgs
RestPSR lr,EQ,f ; preserve N - do we really have to do this? grrr.
EXIT EQ ; EQ
B %FT10
BIC lr, lr, #(V_bit+Z_bit)
CommonArgs ALTENTRY
SavePSR lr
ORR lr, lr, #Z_bit
10
BIC lr, lr, #V_bit
CMP r0, #fsargs_Flush ; nop
CMPNE r0, #fsargs_EnsureSize ; nop. r2out = r2in
ORREQS pc, lr, #Z_bit ; EQ
RestPSR lr,EQ,f
EXIT EQ ; EQ
CMP r0, #fsargs_ReadLoadExec ; Undated file - don't restamp
MOVEQ r2, #0
MOVEQ r3, #0
ORREQS pc, lr, #Z_bit ; EQ
RestPSR lr,EQ,f
EXIT EQ ; EQ
CMP r0, #fsargs_ReadPTR ; Return PTR#, EXT#, SizeOf# = 0
CMPNE r0, #fsargs_ReadEXT
......@@ -521,18 +538,20 @@ CommonArgs
CMPNE r0, #fsargs_SetPTR ; nop
CMPNE r0, #fsargs_SetEXT ; nop
MOV pc, lr ; EQ/NE from above
EXIT ; EQ/NE from above
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Out EQ -> ok
CommonFunc ROUT
BIC lr, lr, #(V_bit+Z_bit)
CommonFunc ENTRY
SavePSR lr
BIC lr, lr, #V_bit
ORR lr, lr, #Z_bit
CMP r0, #fsfunc_ShutDown ; nop
CMPNE r0, #fsfunc_Bootup ; nop
ORREQS pc, lr, #Z_bit ; EQ
RestPSR lr,EQ,f
EXIT EQ
CMP r0, #fsfunc_ReadDirEntries
CMPNE r0, #fsfunc_ReadDirEntriesInfo
......@@ -540,7 +559,7 @@ CommonFunc ROUT
MOVEQ r4, #-1 ; Don't call me again
MOVEQ r5, #0 ; No buffer usage
MOV pc, lr ; EQ/NE from above
EXIT ; EQ/NE from above
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Out EQ -> ok
......@@ -616,14 +635,14 @@ null_Open ROUT
null_Close
BICS pc, lr, #V_bit
RETURNVC
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Always return EOF - FileSwitch will suss multiple reads at EOF error
null_Get
ORRS pc, lr, #C_bit ; VClear, EOF
SEC ; clears NVZ, sets C
MOV pc, lr ; EOF
null_GBPB
......@@ -634,7 +653,7 @@ null_GBPB
; r2-r4 unmodified if reading
null_Put ; Discard output
BICS pc, lr, #V_bit
RETURNVC
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
......@@ -756,8 +775,7 @@ vdu_Open
rawvdu_Close
vdu_Close
BICS pc, lr, #V_bit
RETURNVC
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
......@@ -851,9 +869,9 @@ PrintCharInGSFormat ENTRY "r1, listopt"
CMP r0, #"|" ; Solidus ? VClear
CMPNE r0, #"""" ; Quote ?
CMPNE r0, #"<" ; Left angle ?
SWINE XOS_WriteC ; Nope, so let's print the char and bugger off
EXIT VS
EXIT NE
BEQ %FT10
SWI XOS_WriteC ; Nope, so let's print the char and exit
EXIT
10 TST listopt, #allowtbschar ; International format bit ?
......@@ -993,15 +1011,15 @@ kbd_Open ROUT
MOVEQ r2, #0 ; Single byte job
MOVEQ r3, #-1 ; Buffer empty
STREQ r3, KbdIndex
BICS pc, lr, #V_bit
RETURNVC
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
kbd_Close ROUT
MOV r1, #0 ; Clear handle
SUBS r1, r1, r1 ; Clear handle (R1=0, V cleared)
STR r1, KbdHandle
BICS pc, lr, #V_bit
RETURNVC VC ; conditional for optimal code in 32-bit case
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
......@@ -1129,7 +1147,7 @@ rawkbd_Open ROUT
rawkbd_Close
BICS pc, lr, #V_bit
RETURNVC
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
......@@ -1138,11 +1156,12 @@ rawkbd_Get ENTRY
BL EnableJustKbdRead
EXIT VS
SWI XOS_ReadC
BVS %FT90
BVS %F90
BLCS SAckEscape
90 MOV r1, psr
90
SavePSR r1
BL SelectRdchSrc
TEQVCP r1, #0 ; V from before / OSByte
RestPSR r1,,f ; V from before / OSByte
EXIT
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
......@@ -1377,18 +1396,21 @@ printer_Args ENTRY
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
EndPrinterJob ENTRY "r0-r2"
EndPrinterJob ENTRY "r0-r3"
[ debug
DLINE "EndPrinterJob"
]
SavePSR r3
MOV r0, #OSByte_PrinterDormant ; End job
SWI XOS_Byte ; Note that this doesn't wait
; till all bytes are out, that's fx5
BL SelectPrinterType
EXITS VC
STR r0, [sp]
BICVC r3, r3, #V_bit
ORRVS r3, r3, #V_bit
STRVS r0, [sp]
RestPSR r3
EXIT
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
......@@ -1492,6 +1514,9 @@ SussPrinterVar ROUT
Push "r0-r4, lr"
SavePSR lr
Push lr
ADR r0, varprefix ; r0 -> start of variable name
ADR r1, FilenameBuffer ; r1 -> filename buffer
......@@ -1529,10 +1554,11 @@ SussPrinterVar ROUT
MOVVS r2, #0 ; if went wrong assume no system var
TEQ r2, #0 ; did it exist?
Pull "r0-r4, lr"
BIC lr, lr, #V_bit ; ensure V =0.
ORREQS pc, lr, #Z_bit
BICNES pc, lr, #Z_bit
Pull lr
BIC lr, lr, #V_bit :OR: Z_bit ; ensure V=0.
ORREQ lr, lr, #Z_bit
RestPSR lr,,f
Pull "r0-r4, pc"
varprefix
= "PrinterType$",0
......@@ -1543,6 +1569,8 @@ varprefix
SelectRdchSrc ENTRY "r0-r2"
SavePSR r0
Push r0
LDRB r1, RdchSrc
TEQ r1, #0
MOVEQ r1, #2 ; Must set back to 2 as 0 is silly
......@@ -1551,18 +1579,25 @@ SelectRdchSrc ENTRY "r0-r2"
SWI XOS_Byte
STRVCB r1, RdchSrc
10 EXITS VC
STR r0, [sp]
10 STRVS r0, [sp]
Pull r0
ORRVS r0, r0, #V_bit
BICVC r0, r0, #V_bit
RestPSR r0,,f
EXIT
EnableJustKbdRead ALTENTRY
SavePSR r1
Push r1
MOV r1, #0 ; Enable kbd i/p only
B %BT05
EnableJustSerialRead ALTENTRY
SavePSR r1
Push r1
MOV r1, #1 ; Enable serial i/p only
B %BT05
......@@ -1573,7 +1608,9 @@ SelectWrchDest ALTENTRY
LDRB r1, WrchDest
25 MOV r0, #3
25 SavePSR r0
Push r0
MOV r0, #3
SWI XOS_Byte
STRVCB r1, WrchDest
......@@ -1583,25 +1620,30 @@ SelectWrchDest ALTENTRY
EnableJustVdu ALTENTRY
MOV r1, #2_00010100 ; Enable vdu o/p only
B %BT25
B %BA25
EnableJustSerial ALTENTRY
MOV r1, #2_00010111 ; Enable serial o/p only
B %BT25
B %BA25
; .............................................................................
; Printer type setup. Should preserve flags + r0 unless error
SelectPrinterType ALTENTRY
SavePSR r0
LDR r1, PrinterType ; Did we alter the printer type ?
[ debug
DREG r1,"SelectPrinterType ",,Integer
]
CMP r1, #-1
EXITS EQ
BNE %FT90
RestPSR r0,,f
EXIT
90
Push r0
MOV r0, #5
SWI XOS_Byte
[ debug
......@@ -1686,7 +1728,7 @@ serial_Open ENTRY
serial_Close
BICS pc, lr, #V_bit
RETURNVC
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
......
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