Commit 82232458 authored by ROOL's avatar ROOL 🤖
Browse files

Merge branch 'HAL'

* The target `TML_HostFS` continues to build the driver for the TML podule,
  as was the case previously on branch `master`.
* The target `TML_HostFS` from the `HAL` branch, which is a veneer to
  the `DADebug` module, can now be built by using the new target `DA_HostFS`.
* The target `HAL_HostFS` builds the variant that uses the HAL DebugTX API,
  as was the case previously on branch `HAL`.

Version 0.04. Tagged as 'HostFS-0_04'
parents 07cf2065 65fcc0b3
Pipeline #2291 passed with stages
in 4 minutes and 25 seconds
......@@ -9,12 +9,12 @@
GBLS Module_ApplicationDate
GBLS Module_HelpVersion
GBLS Module_ComponentName
Module_MajorVersion SETS "0.03"
Module_Version SETA 3
Module_MajorVersion SETS "0.04"
Module_Version SETA 4
Module_MinorVersion SETS ""
Module_Date SETS "01 Sep 2021"
Module_ApplicationDate SETS "01-Sep-21"
Module_ComponentName SETS "HostFS"
Module_FullVersion SETS "0.03"
Module_HelpVersion SETS "0.03 (01 Sep 2021)"
Module_FullVersion SETS "0.04"
Module_HelpVersion SETS "0.04 (01 Sep 2021)"
END
/* (0.03)
/* (0.04)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 0.03
#define Module_MajorVersion_CMHG 0.04
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 01 Sep 2021
#define Module_MajorVersion "0.03"
#define Module_Version 3
#define Module_MajorVersion "0.04"
#define Module_Version 4
#define Module_MinorVersion ""
#define Module_Date "01 Sep 2021"
......@@ -16,6 +16,6 @@
#define Module_ComponentName "HostFS"
#define Module_FullVersion "0.03"
#define Module_HelpVersion "0.03 (01 Sep 2021)"
#define Module_LibraryVersionInfo "0:3"
#define Module_FullVersion "0.04"
#define Module_HelpVersion "0.04 (01 Sep 2021)"
#define Module_LibraryVersionInfo "0:4"
......@@ -17,7 +17,6 @@
HDRS =
ASMHDRS = HostFS HostDebug
OBJS = TML_HostFS
CMHGFILE =
CUSTOMRES = no
......
; Copyright 1996 Acorn Computers Ltd
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;
TTL TML_HostFS - Host Filing System via TML
; ***********************************
; *** C h a n g e L i s t ***
; ***********************************
; Date Name Version Description
; ---- ---- ------- -----------
; 3-3-92 JSR 0.00 Written
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
GET Hdr:ListOpts
GET Hdr:Macros
GET Hdr:System
GET Hdr:ModHand
GET Hdr:Services
GET Hdr:Proc
GET Hdr:EnvNumbers
GET Hdr:HostFS
GET VersionASM
AREA |Asm$$Code|, CODE, READONLY
ENTRY
CR * 13
LF * 10
TAB * 9
^ 0, wp
TXEntry # 4
WSSize * :INDEX:@
; ****************** HostFile Module code starts here *************************
Module_BaseAddr
DCD 0
DCD HostFS_Init -Module_BaseAddr
DCD HostFS_Die -Module_BaseAddr
DCD HostFS_Service -Module_BaseAddr
DCD HostFS_Title -Module_BaseAddr
DCD HostFS_Help -Module_BaseAddr
DCD HostFS_HC_Table -Module_BaseAddr
DCD Module_SWISystemBase + TubeSWI * Module_SWIChunkSize
DCD HostFS_SWICode -Module_BaseAddr
DCD HostFS_SWITable -Module_BaseAddr
DCD 0
DCD 0
DCD HostFS_Flags -Module_BaseAddr
HostFS_Title
DCB "DA_HostFS", 0
HostFS_SWITable
DCB "HostFS", 0
DCB "HostVdu",0
DCB "TubeVdu",0
DCB "WriteC",0
DCB "ReadC",0
DCB "ReadCMaybe",0
DCB 0
HostFS_Help
DCB "HostFS"
DCB TAB,TAB
DCB "$Module_MajorVersion $Module_MinorVersion ($Module_Date)", 0
ALIGN
HostFS_Flags
DCD ModuleFlag_32bit
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; T U B E C O M M A N D S S E C T I O N
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
HostFS_HC_Table ; Name Max Min
Command HostVdu, 0, 0
Command TubeVdu, 0, 0
DCB 0 ; That's all folks !
HostVdu_Help
DCB "*HostVdu redirects vdu output to the BBC Host."
DCB CR
HostVdu_Syntax
DCB "Syntax: *HostVdu", 0
TubeVdu_Help
DCB "*TubeVdu redirects vdu output to the a500."
DCB CR
TubeVdu_Syntax
DCB "Syntax: *TubeVdu", 0
ALIGN
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
HostVdu_Code Entry
SWI XHostFS_HostVdu
EXIT
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
TubeVdu_Code Entry
SWI XHostFS_TubeVdu
EXIT
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; NB. Can't talk to Tube during initialisation, only after reset has come round
; r0-r6 trashable
HostFS_Init Entry "r8,r9"
MOV r0, #ModHandReason_Claim
MOV r3, #WSSize
SWI XOS_Module
EXIT VS
STR r2, [r12, #0]
MOV wp, r2
SWI DADebugSWI_Base + Auto_Error_SWI_bit
STR r0, TXEntry
EXIT
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Let Module handler take care of removing our workspace on fatal death
; or shunting it around on Tidy - none of it is absolute
HostFS_Die Entry
MOV r0, #WrchV ; Release WrchV
ADRL r1, WRCHandler
MOV r2, wp
SWI XOS_Release
CLRV
EXIT
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
HostFS_Service * Module_BaseAddr
HostFS_SWICode ROUT
LDR wp, [r12, #0]
CMP r11, #MaxSwi ; Number of valid SWI entries
ADDLO pc, pc, r11, LSL #2
MOV pc, lr
JumpTable
B DoHostVdu
B DoTubeVdu
B Host_WriteC
B Host_ReadC
B Host_ReadCMaybe
MaxSwi * (.-JumpTable) / 4
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
DoHostVdu Entry "r0-r2"
MOV r0, #WrchV ; Claim WrchV
ADR r1, WRCHandler
MOV r2, wp
SWI XOS_Claim
STRVS r0, [sp, #0]
EXIT
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
DoTubeVdu Entry "r0-r2"
MOV r0, #WrchV ; Release WrchV
ADR r1, WRCHandler
MOV r2, wp
SWI XOS_Release
STRVS r0, [sp, #0]
EXIT
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Sit on WrchV printing characters to the Host
WRCHandler ROUT
Pull lr ; Claim it
; fall through
; In r0=char
; Out r10,r11 corrupted
Host_WriteC ROUT
TEQ pc, pc
TEQNEP lr, #0
LDR pc, TXEntry
; Out r0=char; r10,r11 corrupted
Host_ReadC ROUT
ADR r0, EscapeError
SETV
TEQ pc, pc
Pull "r1-r3,r9,pc",EQ
Pull "r1-r3,r9,lr"
ORRS pc, lr, #V_bit
EscapeError
DCD 17
DCB "Escape",0
ALIGN
; Out r0=char or -1 of none available
Host_ReadCMaybe ROUT
MOV r0, #-1
TEQ pc, pc
MOVEQ pc, lr
MOVS pc, lr
END
; Copyright 2004 Castle Technology Ltd
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;
TTL TML_HostFS - Host Filing System via TML
; ***********************************
; *** C h a n g e L i s t ***
; ***********************************
; Date Name Version Description
; ---- ---- ------- -----------
; 3-3-92 JSR 0.00 Written
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
GET Hdr:ListOpts
GET Hdr:Macros
GET Hdr:System
GET Hdr:ModHand
GET Hdr:Services
GET Hdr:Proc
GET Hdr:EnvNumbers
GET Hdr:HostFS
GET Hdr:HALEntries
GET VersionASM
AREA |Asm$$Code|, CODE, READONLY
ENTRY
CR * 13
LF * 10
TAB * 9
^ 0, wp
RXEntry # 8
TXEntry # 8
WSSize * :INDEX:@
; ****************** HostFile Module code starts here *************************
Module_BaseAddr
DCD 0
DCD HostFS_Init -Module_BaseAddr
DCD HostFS_Die -Module_BaseAddr
DCD HostFS_Service -Module_BaseAddr
DCD HostFS_Title -Module_BaseAddr
DCD HostFS_Help -Module_BaseAddr
DCD HostFS_HC_Table -Module_BaseAddr
DCD Module_SWISystemBase + TubeSWI * Module_SWIChunkSize
DCD HostFS_SWICode -Module_BaseAddr
DCD HostFS_SWITable -Module_BaseAddr
DCD 0
DCD 0
DCD HostFS_Flags -Module_BaseAddr
HostFS_Title
DCB "HAL_HostFS", 0
HostFS_SWITable
DCB "HostFS", 0
DCB "HostVdu",0
DCB "TubeVdu",0
DCB "WriteC",0
DCB "ReadC",0
DCB "ReadCMaybe",0
DCB 0
HostFS_Help
DCB "HostFS"
DCB TAB,TAB
DCB "$Module_MajorVersion $Module_MinorVersion ($Module_Date)", 0
ALIGN
HostFS_Flags
DCD ModuleFlag_32bit
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; T U B E C O M M A N D S S E C T I O N
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
HostFS_HC_Table ; Name Max Min
Command HostVdu, 0, 0
Command TubeVdu, 0, 0
DCB 0 ; That's all folks !
HostVdu_Help
DCB "*HostVdu redirects vdu output to the BBC Host."
DCB CR
HostVdu_Syntax
DCB "Syntax: *HostVdu", 0
TubeVdu_Help
DCB "*TubeVdu redirects vdu output to the a500."
DCB CR
TubeVdu_Syntax
DCB "Syntax: *TubeVdu", 0
ALIGN
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
HostVdu_Code Entry
SWI XHostFS_HostVdu
EXIT
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
TubeVdu_Code Entry
SWI XHostFS_TubeVdu
EXIT
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; NB. Can't talk to Tube during initialisation, only after reset has come round
; r0-r6 trashable
HostFS_Init Entry "r8,r9"
MOV r0, #ModHandReason_Claim
MOV r3, #WSSize
SWI XOS_Module
EXIT VS
STR r2, [r12, #0]
MOV wp, r2
MOV r8, #1
MOV r9, #EntryNo_HAL_DebugTX
SWI XOS_Hardware
EXIT VS
STR r0, TXEntry+4
STR r1, TXEntry
MOV r9, #EntryNo_HAL_DebugRX
SWI XOS_Hardware
EXIT VS
STR r0, RXEntry+4
STR r1, RXEntry
EXIT
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Let Module handler take care of removing our workspace on fatal death
; or shunting it around on Tidy - none of it is absolute
HostFS_Die Entry
MOV r0, #WrchV ; Release WrchV
ADRL r1, WRCHandler
MOV r2, wp
SWI XOS_Release
CLRV
EXIT
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
HostFS_Service * Module_BaseAddr
HostFS_SWICode ROUT
LDR wp, [r12, #0]
CMP r11, #MaxSwi ; Number of valid SWI entries
ADDLO pc, pc, r11, LSL #2
MOV pc, lr
JumpTable
B DoHostVdu
B DoTubeVdu
B Host_WriteC
B Host_ReadC
B Host_ReadCMaybe
MaxSwi * (.-JumpTable) / 4
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
DoHostVdu Entry "r0-r2"
MOV r0, #WrchV ; Claim WrchV
ADR r1, WRCHandler
MOV r2, wp
SWI XOS_Claim
STRVS r0, [sp, #0]
EXIT
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
DoTubeVdu Entry "r0-r2"
MOV r0, #WrchV ; Release WrchV
ADR r1, WRCHandler
MOV r2, wp
SWI XOS_Release
STRVS r0, [sp, #0]
EXIT
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Sit on WrchV printing characters to the Host
WRCHandler ROUT
Pull lr ; Claim it
; fall through
; In r0=char
; Out r10,r11 corrupted
Host_WriteC ROUT
Push "r0-r3,r9,lr"
ADR r3, TXEntry
MOV lr, pc
LDMIA r3, {r9, pc}
TEQ pc, pc
Pull "r0-r3,r9,pc",NE,^
CLRV
Pull "r0-r3,r9,pc"
; Out r0=char; r10,r11 corrupted
Host_ReadC ROUT
Push "r1-r3,r9,lr"
ADR r10, RXEntry
10 MOV lr, pc
LDMIA r10, {r9, pc}
CMP r0, #-1
BNE %FT15
BL TestEscape
BVC %BT10
15 TEQ pc, pc
Pull "r1-r3,r9,pc",EQ
Pull "r1-r3,r9,pc",VC,^
Pull "r1-r3,r9,lr"
ORRS pc, lr, #V_bit
TestEscape Entry "r1,r2"
MOV r0, #126
SWI XOS_Byte
CMP r1, #&ff
EXIT NE
ADR r0, EscapeError
SETV
EXIT
EscapeError
DCD 17
DCB "Escape",0
ALIGN
; Out r0=char or -1 of none available
Host_ReadCMaybe ROUT
Push "r1-r3,r9,lr"
ADR r10, RXEntry
MOV lr, pc
LDMIA r10, {r9, pc}
TEQ pc, pc
Pull "r1-r3,r9,pc",NE,^
CLRV
Pull "r1-r3,r9,pc"
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