Communicator Software Tools
Total Page:16
File Type:pdf, Size:1020Kb
Communicator Software Tools Part No 0452,013 Issue 1 25 Aujiusl 1937 Copyright Acom Computers Limited 1987 Neither the whole nor any part or the inrormation contained in, or the product described in. this manual may be adapted or reproduced in any material rorm except with the prior written permission of Acorn Computers Limited. Withinthis publication the term 'BBC is used as an abbreviation for 'British Broadcasting Corporation'. The product described in this manual is subject to continuous developments and improvements. All particulars of the product and its use (including the information in this manual) are given by Acom Computers in good faith. In case of dilTiculty please contact your supplier. Every step is taken in ensure that the quality of sdtware and documentation is as high as possible. However,it should be noted that softwarecannot be written to be completely free of errors. To help Acom rectify future versions, suspected deficiencies in software and documentation should be notified in writing, using the Fault Report Form supplied, to the following address: Cuatonwr Servlcao Oepacttnent, Acorn Computora Limited, Fulbourn Road, Cherry Hinton, Cambridqe CBl 4JN All maintenance and service on the product must be carried out by Acom Computers' authorised dealers. Acom Computers can accept no liability whatsoever for any loss or damage caused by service or maintenance by unauthorised personnel. This manual is intended only to assist the reader in the use of the product,and therefore Acom Computersshall not be liable for any or damage whatsoeverarising from the use of any information or particulais in, or any eiror or omission in, this manual, or any incorrect use of the product. The approval of Communicator for connection to telephone networks is INVALIDATED if it is subject to any modificationin any material way not authorised by BABT or is used with, or connected to: (0 internal software that had not been formally accepted by BABT (ii) external control software or external control apparatus which causes the operation of the modem or associated call set-up equipment to contravene the requirements of the standards set out in BABT/SITS/82/D05S/D. Published by AcomComputers Limited, Fulboum Road,CherryHinton,Cambridge CBl 4JN Comnutideator Software Toob Cmttmumaaor Software Tools Contents . IntroducUon 1.1 1.1 Hardware 1.1 1.2 Software 13 1.3 Macro and Definition Files 13 1.4 BASIC Flies 13 1.S Documentation 1.4 1.6 Sarety and approvals 1.6 . Introduction to Cbmmunicator Programming 2.1 2.1 An Overview of CommunicatorSystems Software 2.1 2.1.1 Software Levels 2.1 2.1.2 Software Categories 2.2 2.1.3 The Menu Module 2.2 2.1.4 The Terminal Session Software 2.2 2.2 The Hardware 23 2.2.1 Proceasor 2.3 2.2.2 Memory 2.3 13 Using BBC BASIC 23 2.3.1 Extensions to BBC BASIC 23 2.3.2 Enhancement to the ON statement 13 23J The LIST IF construction. 13 23.4 The TIMES pseudo-variable 23 23.3 The EXT > statement 23 23.6 The COLOR siatemem 23 2.3.7 Extensions to the assembler 2.6 23.8 Improved LISTO formatting 2.6 23.9 Other minor changes 2.6 23.10 Running existing BASIC programs in 23.11 The @HELP procedure in 23.12 BASICprograms that call machine code in 23.13 Calling operating system functions in 23.14 Extensions to CALL and USR 2.8 23.15 Calling user machine code programs 2.9 2.4 Creating BASIC Programs 2.11 2.4.1 TWIN 2.11 2.4.2 Code compression 2.14 2.4.3 Module Support 2.16 2.3 Using assembly language 2.18 2.3.1 Programmer's modelof the 6SSC816 2.19 23.2 Regi.stcrdescriptions 120 23.3 6SSC8I6 addressing modes 2.21 2.3.4 The 65SC8I6 instruction set 2.28 2.3.3 General advice for programmers 2.49 23.6Bank-independent r^e 130 23.7Position iiidepcndent code 151 2.3.8 Jumping to OS entry points 134 2.6 Creating Assembler Programs 238 2.6.1 Creating AssemblerSource Files 238 2.6.2 Creating AssemblerObject files 159 2.6.3 Creating an Executable Module Image. 2.61 Commumcator Software Toots 2.6.4Summaiy 2.63 2.7 CodingConveiuions and Library Support 2.64 2.7.1 BASIC 2JM ' 1 2.7.2 Assembler 2.66 2.7 J KILL conventions 2.67 TWIN 3.1 3.1 Introduction 3.1 3.1.1 Facilities 3.1 3.1.2 How this chapteris ansnged 3.2 3.1J Conventions usedin this chapter 3.2 3.1.4 StarUng TWIN 3.4 3.1.5The screen layout 3.4 3.1.6 The keyboard 3.9 3.1.7LeavingTWIN 3.10 3.2 Working withTWIN 3.10 3.2.1 Types of file 3.10 3.2.2 Date stampingTWIN documents 3.11 323 TWIN and the operatingsystem 3.11 3.2.4 TWIN concurrency 3.13 33 Editing 3.14 3.3.1 Insert and overtype modes 3.14 3.33 Moving around the text 3.14 3.3.3 Changing the text 3.16 3.3.4 Clearing and restoring text 3.17 3.4 Finding and replacing text 3.17 3.4.1 Simple finding and replacing 3.18 3.4.2 Counting occurrences 3.19 3.4.3 Specifyinga target string 3.19 3.4.4 Specifying a replacementstring 332 33 Files 333 33.1 Saving and loading files 333 333 Printing files 336 33 TWIN function keys 336 3.7 Concurrency: a worked example 3.31 3.7.1 TWIN and AAsm. the ARM assembler 331 3.73 Using a task 3.33 3.8 Error messages 3.33 3.9 Tasks and events 3.34 3.10 MovingTWIN 3.34 3.11 TWIN caUed from ARM BASIC 3.35 . The External ROM ExpansionCard 4.1 4.1 Introduction 4.1 43 The External ROM Expansion Card 43 43.1 Inuoductioo 4.2 43.2 Connecting the External ROMExpansion Board 43 43.3 The Reset button 4.3 43.4 The External EPROM ZIF Sockets 4.3 43.5 The Internal RAM 4.4 43 The System Utilities 4.4 43.1 Introduction 4.4 ( y 433 Invoking the System Utilities 4.4 4.3.3The CBFREE UUIity 4.5 43A The HANDLES UUUty 4.5 Comauudcator Software Toots 4.3J The MAP UUIity 43 4.3.6 The MODULES UUIily 4.7 4.3.7 The IRQLIST Ulilily 4.9 4.4 The Trace Utility 4.10 4.4.1 Intiodticliai 4.10 4.4.2 Use of breakpoints and leporting 4.10 4.43 Looking at memory 4.14 4.4.4 Patching memory and registers 4.15 4.43 Memory protection 4.17 4.4.6 Real-time tracing 4.18 4.4.7 Miscellaneous 4.19 , Support Utilities 5.1 S.l Introduction 5.1 5.2 UNCOMMENT 5.1 5.3 EDCONVERT 5.1 5.4 TCRUNCH 53 5.5 MAKEMOD 5.2 5.6 ALOADER 53 . BlueScreen Software 6.1 6.1 Overview 6.1 62 Specification 6.2 63.1 Screen format 63 6.2.2 Help support 6.2 6.3 User interface 6.3 6.3.1 BlueScreen 6.3 6J3 Required interfaces 63 6.3.3 Invocation interfaces 6.5 6.4 Environment 6.9 63 Structure 6.9 6.6 Data strucutres 6.10 6.6.1 Textual data structures 6.10 6.7 Procedures 6.10 6.7.1 Utill routines 6.11 6.7.2 Usage 6.22 6.7.3 Util2 routines - must be provided by user 632 6.7.4 Machine code entry points 6.23 63 Source Code Management 6.23 6.9 Error Messages 6.24 6.10 OS calls required 6.24 Device Drivers 7.1 7.1 Introduction 7.1 7.2 Device Driver Module Reason Codes 73 7.3 Device Driver Control Streams 7.3 7.4 Device Driver Filenames and Handles 7.3 7.5 Writing Device Drivers 7.4 73.1 Device Driver Reason Codes 7.4 73.2 Reuuning Status 7.4 73.3 Device Driver Macros 73 7.5.4 Implementing a Device Driver 7.11 Communicator emulation modules 8.1 8.1 Overview 8.1 8.2 Software Interface 8.2 8.3 Environment 8.2 Communicalor Software Toots 8.4 Slnictuie 8.3 8.5 Data stiuctures 8.4 8.6 Procedures 8.5 8.6.1 RCODES 83 8.6.2 EMNAME 8.5 8.6.3 EMINIT 8.5 8.6.4 EMKILL 8.5 8.6.5 EMHELP 83 8.6.6 EMCGET 8.5 8.6.7 EMCPUT 8.5 8.6.8 chcckhandle 8.5 8.6.9 EMcrflags 8.6 8.6.10 EMOPEN 8.6 8.6.11 EMLALA 8.6 8.6.12 EMCLOSE 8.6 8.6.13 gdzero 8.6 8.6.14 nullroutine 8.6 8.7 OS calb required 8.7 8.8 Communicator BBC and Teletype emulation modules 8.8 8.8.1 Overview 8.8 8.8.2 TeletypeemulationSpecification 8.8 8.8.3 BBC emulation Specification 83 8.8.4 Data structures 8.9 8.8.5 Procedures 8.9 8.9 Communicator Videotex emulation module 8.11 8.9.1 Overview 8.11 8.9.2 Videotex emulatitm Specification 8.11 8.9J Data structures 8.12 8.9.4 Procedures 8.12 8.9.5 OS calls required 8.16 8.10 COnununicator VTIOO emulation module 8.16 8.10.1 Overview 8.16 8.10.2 Specification 8.17 8.10J Dm stiuctures 8.20 8.10.4 Procedures 8.23 8.11 OS calls required 8.34 9.