D.A Software Structure of NSR A DSR must follow a specific format in order to communicate with the console software properly. The purpose of this predefined format is to let the console software have the least overhead and the VSR have the maximum flexibility in device servicing. A DSR, in general, contains the following elements: Symbol Definition Block Header and Linkage Block Power-up Routine (optional) Main Device Service Routine Interrupt Routine (optional) Ma Pwrr Each of the above elements will be discussed in detail in the following sections. D.4.1 Symbol Vetinition Block The Symbol Definition Block serves two purposes. First, it equates frequently used data or addresses with symbols for case of recognition. Secondly, it specifies the CPU RAM location in a certain way so that each DSR can be used around future and existing CPU family members such as the TI-99/4 and the TI-99/4A with the least modification. The first purpose is common in every program, but the second one needs more explanation. Each model in this family has a different memory structure within the console. Therefore, care must be taken in handling memory addressing in a DSR so that the DSR can support future Home Computer models. The console software always enters the OSR through the instruction: BL *RQ where R9 contains the DSR entry address. Upon entry of the DSR, the workspace pointer contains the beginning address of the Register File, which the console software uses. If all the CPU RAM's which the DSR may access are predefined with respect to this workspace pointer, the DSR does not have to know the memory map of each console. The DSR can address each CPU RAM through index addressing via the workspace pointer. For example, if you want to move the contents of a CPU RAM (having a displacement [DISP] with respect to the workspace pointer) tu RO, du the following: ENTRY STWP R4 entry of DSR MOV at DISP (R4). RO 52