The Programmer's Guide to TRSDOS Version 6 - Tim Mann's Home ...
The Programmer's Guide to TRSDOS Version 6 - Tim Mann's Home ...
The Programmer's Guide to TRSDOS Version 6 - Tim Mann's Home ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
LD (IX+2),15<br />
JR TASKA<br />
By firmly understanding the functions of each of the TP SuperVisor Calls discussed, you<br />
will be proficient at integrating interrupt tasks in<strong>to</strong> your applications. A final note is<br />
<strong>to</strong> be aware of the task slots already used by the DOS or other applications. Use @CKTSK<br />
<strong>to</strong> find an unused task slot.<br />
8.7 LOW MEMORY DETAILS<br />
<strong>The</strong> author thought long and hard concerning the inclusion of this section of the<br />
Appendix. Why is this section a problem? <strong>The</strong> <strong>Version</strong> 6 operating system was designed <strong>to</strong><br />
promote the development of portable software. <strong>The</strong> term, portable, means not only should<br />
the software function from machine <strong>to</strong> machine, it should also function under each release<br />
of the DOS. <strong>The</strong> DOS needs access <strong>to</strong> the s<strong>to</strong>rage of data for internal system use. Trying<br />
<strong>to</strong> keep the memory locations of this data constant across all implementations of the<br />
system is quite restrictive and usually becomes limiting <strong>to</strong> the healthy growth of the<br />
system. Keeping portability in mind, the designers of the system have provided SuperVisor<br />
Calls which return pointers <strong>to</strong> data that may be useful <strong>to</strong> a program. Thus, there should<br />
usually be no need <strong>to</strong> access data areas by memory address. We say "usually" since it is<br />
possible that user's of the system are writing machine-dependent SYSTEM code. This is the<br />
only reason that the Appendix contains this section. It is recognized that once a data<br />
address is known, application programmers tend <strong>to</strong> use it. RESIST THE IMPULSE. If the<br />
system does not provide via an SVC, data that you think you need, perhaps you don't<br />
really need the data. It is entirely possible that the information you need is actually<br />
available via an SVC, although not entirely obvious. Remember, when you bypass the SVC<br />
structure of the DOS, you most certainly risk portability!<br />
With the preceding discussion in mind, let's first take a look at the general uses of<br />
each low core memory page.<br />
Sec<strong>to</strong>r Page General Contents<br />
n/a 0 RST vec<strong>to</strong>rs, Flag tables, misc...<br />
n/a 1 SuperVisor Call Table<br />
0 2 Bank data, 31 Device Control Blocks<br />
1 3 System stack area, Miscellaneous machine dependent routines.<br />
2 4 System Information data, Drive Control Table, Input buffer.<br />
3 5 Start of I/O handling and drivers. Extends <strong>to</strong> end of page<br />
12H.<br />
<strong>The</strong> low core area starting at memory page two is actually loaded by and from the<br />
BOOT/SYS. <strong>The</strong> system uses the first two sec<strong>to</strong>rs <strong>to</strong> contain BOOT code needed <strong>to</strong> bring up<br />
the system. A booting ROM reads either the first or second sec<strong>to</strong>r of track 0 - the BOOT<br />
track. This sec<strong>to</strong>r contains code which, in turn, reads the entire BOOT/SYS file.<br />
<strong>The</strong>reafter, BOOT loads the resident system file, SYS0/SYS, and transfers control <strong>to</strong> it.<br />
Because of this process, part of low memory is loaded directly from the BOOT/SYS file<br />
contained on track 0 while other parts of low memory are loaded by SYS0/SYS. A<br />
description of the booting process and the boot track is contained in another section of<br />
the Appendix. Let's now look at some of the details of low memory. REMEMBER THAT THIS<br />
INFORMATION IS PROVIDED FOR USE ONLY IN EXTREME NON-PORTABLE SITUATIONS!<br />
An asterisk following the page byte(s) indicates a quantity that can be obtained from the<br />
system via some SuperVisor Call. A pound sign indicates that the address is fixed due <strong>to</strong><br />
processor assignment.<br />
8-18