About This Manual
Total Page:16
File Type:pdf, Size:1020Kb
About this manual 5a Summary of contents This manual gives you detailed information on RISC OS 3.5 and RISC OS 3.6, so that you can write programs to run on Acorn computers that use them. It must be used in conjunction with the RISC OS 3 Programmer’s Reference Manual, and is produced as a replacement for the earlier volume 5 in the set that described RISC OS 3.5 only. The pages are numbered ‘5a-n’ rather than ‘5-n’ to distinguish references to the two different versions. This manual only tells you about the differences between RISC OS 3.1, RISC OS 3.5 and RISC OS 3.6. Many cross references are given between this volume and the earlier volumes so that you can always refer to the main topic to obtain further information. The layout of chapters We’ve laid out the information in this manual as consistently as possible, to help you find what you need. Each chapter covers a specific topic, and in general includes: ● an Introduction, so you can tell if the chapter covers the topic you are looking for ● an Overview, to give you a broad picture of the topic and help you to learn it for the first time ● Technical Details, to use for reference once you have read the Overview ● SWI calls, described in detail for reference ● * Commands, described in detail for reference ● Application notes, to help you write programs ● Example programs, to illustrate the points made in the chapter, and on which you can base your own programs. Appendix C: Errata and omissions for RISC OS 3 PRM This appendix (on page 5a-667) contains a list of errata and omissions for the RISC OS 3 Programmer’s Reference Manual. We suggest you add to your copy either the corrections themselves, or a reference to them. 5a-x Conventions used Indexes The separate volume of Indexes replaces that supplied with the RISC OS 3 Programmer’s Reference Manual, and references all five volumes. It contains: ● an index of * Commands ● an index of OS_Byte calls ● an index of OS_Word calls ● a numeric index of service calls ● an alphabetic index of service calls ● a numeric index of SWI calls ● an alphabetic index of SWI calls ● an index by subject. Conventions used Certain conventions are used in this manual: Hexadecimal numbers Hexadecimal numbers are extensively used. They are always preceded by an ampersand. They are often followed by the decimal equivalent which is given inside brackets: &FFFF (65535) This represents FFFF in hexadecimal, which is the same as 65535 in ordinary decimal numbers. Typefaces Courier type is used for the text of example programs and commands, and any extracts from the RISC OS source code. Since all characters are the same width in Courier, this makes it easier for you to tell where there should be spaces. Bold Courier type is used in some examples to show input from the user. We only use it where we need to distinguish between user input and computer output. Command syntax Special symbols are used when defining the syntax for commands: ● Italics indicate that you must substitute an actual value. For example, filename means that you must supply an actual filename. ● Braces indicates that the item enclosed is optional. For example, [K] shows that you may omit the letter ‘K’. 5a-xi About this manual ● A bar indicates an option. For example, 0|1 means that you must supply the value 0 or 1. Programs Many of the examples in this manual are not complete programs. In general: ● BBC BASIC examples omit any line numbering ● BBC BASIC Assembler programs do not show the structure needed to perform the assembly ● ARM Assembler programs assume that header files have been included that define the SWI names as manifests for the SWI numbers. ● C programs assume that similar headers are included; they also do not show the inclusion of other headers, or the calling of main(). Finding out more For how to set up and maintain your computer, refer to the Welcome Guide supplied with your computer. The Welcome Guide also contains an introduction to the desktop which new users will find particularly helpful. For details on the use of your computer and of its application suite, refer to the RISC OS 3 User Guide supplied with it. If you wish to write BASIC programs on your RISC OS computer you will find the BBC BASIC Reference Manual useful. Your Acorn supplier has available the Acorn C/C++ product, which you can use to write programs in C, C++, and ARM assembler. The product runs in a desktop environment with full supporting tools. It also provides the User Interface Toolbox, making it much easier to design and code a desktop application’s user interface; for more details see The Toolbox modules on page 5a-657. Technical Reference Manuals are available for all but the oldest of Acorn RISC OS computers. These describe the hardware in full, including such things as parts lists and circuit diagrams. Reader comments If you have any comments on this Manual, please complete and return the form on the last page of the volume of Indexes to the address given there. 5a-xii Reader comments 5a-xiii Part 15 – The kernel The kernel The 5a 5a-1 5a-2 98 Introduction to RISC OS 3.5 and RISC OS 3.6 kernel The 5a Introduction RISC OS 3.5 is an operating system written by Acorn for its Risc PC computers that use the new ARM600 / ARM700 hardware architecture. This version was only changed where it was necessary to support the changing hardware. RISC OS 3.6 is a further development, which adds support for machines using the similar ARM7500 architecture, and integrates software that was previously separately available. We have tried to make both versions as compatible as possible with the RISC OS 3.1 operating system. RISC OS terminology The operating system known as RISC OS 2 in this manual consists of two variants, RISC OS 2.00 and RISC OS 2.01. The operating system known as RISC OS 3 in this manual consists of two variants, RISC OS 3.00 and RISC OS 3.10. The operating system known as RISC OS 3.5 in this manual is RISC OS 3.50, and is the version supplied with the first generation of Risc PC computers. The operating system known as RISC OS 3.6 in this manual is RISC OS 3.60, and is the version supplied with the second generation of Risc PC computers, and the first generation of A7000 computers. Hardware overview The main electronic components of a Risc PC computer are: ● An ARM (Advanced RISC Machines) ARM610 or ARM700 processor, which provides the main processing. ● A VIDC20 (Video Controller) chip, which provides the video and sound outputs. ● An IOMD (Input Output Memory Device) which provides the interface between the ARM chip, the VIDC chip, the memory and other support chips. This chip replaces the IOC and MEMC chips used in earlier RISC OS computers. 5a-3 Hardware overview The main component of the A7000 is the ARM7500 chip; this integrates all the above functionality into a single chip. Other components The other components are: ● ROM (Read Only Memory) chips containing the operating system. ● RAM (Random Access Memory) chips. ● VRAM (Video RAM) chips used for video display (if fitted). ● Peripheral controllers (for devices such as discs, the serial port, networks and so on). Schematic The diagram on page 5a-5 gives a schematic of an architecture which may be viewed as typical of the Risc PC range of computers. ARM 610 and ARM 700 The ARM is a RISC (Reduced Instruction Set Computer) processor. The initial range of Risc PC computers can use two different versions of the ARM processor. ● The ARM610 delivers about 5 times the power of an ARM 2 (23 MIPs, or million instructions per second, compared to some 4 - 5 MIPS for the ARM2). ● The ARM700 delivers about 8 times the power of an ARM 2 (an estimated 35 MIPS). The ARM 700 also has a direct connection for a hardware floating point chip. From the application programmer’s point of view, there is no difference between the two processors. The ARM700 supports the same instruction set as the ARM610. It is possible that other chips in the ARM6 / ARM7 family may also be used. The VIDC20 chip The VIDC20 chip is an updated version of the VIDC1 and VIDC1a chip used in the previous generation of Acorn computers. The main differences are that VIDC20 provides: ● A wide range of resolution options including VGA, SuperVGA and XGA resolution. ● 1, 2, 4, 8, 16 and 32 bits per pixel. ● 8 bit DACs giving 16 million colours. 5a-4 The kernel 5a-5 Video / Audio Random Access Memory CPU & Control Peripheral Control Expansion Interfaces SIMM 1 OpenBus Card 1 SAM data HI 32b DIMM SIMM 0 OpenBus Card 0 SAM data LO VRAM DRAM ARM CPU 32b address bus latched address bus 32b 28b buffered 16b 32b data bus data bus HI Row & 32b 16b Column Address buffered 16b 12 data bus LO 16b Introduction to RISCIntroduction OS RISC and 3.5 OS 3.6 20 11 3 8 control 32b 8b 4 16b 16b 32b ARM Bus 13 9 control VIDC20 DMA 10 5 4 DRAM & VRAM control 9 8b 8 26 2 2 4 82C665 Expansion VIDC20 IOMD ROMsUniversal Network card cards (8 max) Peripheral Controller IIC Audio 2 filters Video ID Ethernet / Econet / etc 98.1 Figure a Risc Schematic of computer PC ID RTC Floppy disc IDE Hard disc Parallel Serial Mouse buttons Quadrature Mouse IBM PS/2 Compatible Keyboard Key Uni-Directional Latch Bi-Directional Buffer Internal to Case Motherboard Hardware overview Video data transfer The VIDC20 has a 64 bit data bus allowing a high data bandwidth from memory.