Inside - REFERENCE

From NitrOS-9
Jump to: navigation, search

Section 1

COCO-3 MEMORY, and GIME REGISTER MAP (1 Sept. 86)

SYSTEM MEMORY MAP

RAM 00000 - 7FFFF 512K bytes
ROM 78000 - 7FEFF when enabled
I/O XFF00 - XFFFF I/O space and GIME regs

64K PROCESS MAP

 RAM OOOO - FEFF (possible vector page FEXX)
 I/O FFOO - FFFF (appears in all pages)

Note: the Vector Page RAM at 7FE00 - 7FEFF, when enabled will appear instead of the RAM or ROM at XFE00 - XFEFF. (see FF90 Bit 3)

 XFF00-0X  PIA0       (not fully decoded)
 XFE10-1F  reserved
 XFF20-2X  PIA1       (not fully decoded)
 XFF30-3F  reserved
 XFF40-5F  SCS        (see note on FE90 Bit 2)
 XFF60-7F  undecoded  (for current peripherals)
 XFF80-8F  reserved

FF90 INITIALIZATION REGISTER 0

 Bit 7 - CoCo Bit 1 = Color Computer 1/2 Compatible
 Bit 6 - 1= MMU enabled
 Bit 5 - 1 = GIME IRQ output enabled to CPU
 Bit 4 - 1 = GIME EFIRQ "
 Bit 3 - 1= Vector page RAM at FEXX enabled
 Bit 2 - 1= Standard SCS
 Bit 1 - ROM mapping 0 X - 16K internal 16K external
 Bit 0    "     "    1 0 - 32K internal
                     1 1 - 32K external

CoCo bit set = MMU disabled, Video address from SAM, RGB/Comp Palettes = CoCo-2. Interrupt bits 5 and/or 4 must be set for FIRQ/IRQ FF92-3 to pass to CPU. Access and moves throughout mem are usually done from constant RAM at FEXX. If Bit2=0, then XFF50-5F is SCS, and XFF40-4F will be internal to CoCo.

FF91 INITIALIZATION REGISTER 1

 Bit 5 – TINS     Timer Input Clock Select: 0= 70 nsec, 1 = 63 usec
 Bit 0 – TR       MMU Task Register Select (0/1 - see FFA0-AF)

FF92 IRQENR Interrupt Request Enable Regster (IRQ)

FF93 FIRQENR Fast Interrupt Request Enable Reg (FIRQ)

(Note that the equivalent interrupt output enable bit must be set in FF90.) Both registers use the following bits to enable/disable device interrupts:

 Bit 5 - TMR     Timer
 Bit 4 - HBORD   Horizontal border
 Bit 3 - WBORD   Vertical border
 Bit 2 - EI2     Serial data input
 Bit 1 - EI1     Keyboard
 Bit 0 - EI0     Cartridge (CART)

I have no idea if both IRQ & FIRQ can be enabled for a device at same time.

 FF94 Timer MSB Write here to start timer.
 FF95 Timer LSB
  Load starts timer countdown. Interrupts at zero, reloads count & continues.
  Must turn timer interrupt enable off/on again to reset timer IRQ/FIRQ.
 FF96 reserved
 FF97 reserved

FF98 Alpha/graphics Video modes, and lines per row

       Bit 7 BP       0 is alphanumeric, 1= bit plane (graphics)
       Bit 6 = na     ...
       Bit 5 = BPI    1= color burst phase change
       Bit 4 = MOCH   MOnoCHrome bit (composite video output) (1=mono)
       Bit 3 = H50)   50hz vs 60hz bit
       Bit 2 = LPR2   Number of lines/char row : 
       Bit 1 = LPR1    (Bits 2-1-0 below: )
       Bit 0 = LPR0
                       000 - 1 line/char row     100 - 9 lines/char row
                       001 - 2                   101 - 10
                       010 - 3                   101 - 11 (??)
                       011 - 8                   111 - 12 (??)

FF99 VIDEO RESOLUTION REGISTER

Bit 7 - na ● * * (bits 6-5) : Bit 6 - LPF1 Lines Per Field: OO = 1.92 lines 10= 210 lines Bit 5 - LPFO f O 1 = 200 lines lls 225 lines Bit 4 - HR2 Horizontal Resolution
Bit 3 - HR1
Bit 2 - HRO (see below for HR, CRES bits) Bit 1 – CRES1 Color RESolution bits
Bit 0 - CRES 0 g
TEXT MODES :
TeХt : COCO Bit = 0 and FF98 bit 7 = 0. CRES 0 =
80 char/line
64 40 32
HR2 HR1 HR0 (HR1 =
Χ 1. 1 X O O Χ 1. O X O
1 for :
attribute bytes are used.
don't care for text)
GRAPHICS MODES :
X 640 640
512 52
32O 32O 32O
256 256 256
160
Col 4
6
ors HR2 HR1 HIRO CRES 1 CRE
m 1 l 1. O 1. l O l O O
l 1 O O l ren l O O O O
- 1. 1. 1. O l O l O 1 m O 1. 1. O O
1. 1. O 1. O l O O O 1. m O 1. O O O
1. O 1. 1. O
S0 Bytes/line
160 80
128 64
60 8O 4 O
128 64 32
40
Other combo's are possible, but not supported.

Old SAM modes work if CC Bit set. HR and CRES are Don't Care in SAM mode. Note the correspondence of HR2 HR0 to the text mode's bytes/line. --Kev

 FF9A FF9B
 FF9C FF9D
 FF9E FF9F
Border Palette Register (XX00 0000 = Re Ser Ved
Vertical Fine Scroll Register Screen Start Address Register 1 (bits Screen Start Address Register 0 (bits Horizontal Offset Register
Bit Bit Bit Bit Bit Bit Bit Bit
-س- 7"
-
horizontal offset enable bit X6 . . . offset count (0-127) Χ5 for Column scan start. Χ4 X3 Χ2 Χ1 ΧΟ
CoCo 1/2 compatible)
18-11) 10-3)
(128 char width always)
If Bit 7 set & in Text mode, then there are 128 chars (only 80 seen) / line. This allows an offset to be specified into a virtual 128 char/line screen, useful for horizontal hardware scrolling on wide text or spreadsheets.


FFA0-AF MEMORY MANAGEMENT UNIT (MMU)

 FFA0-A7 Task #0 Map Set (8K block numbers in the 64K map)
 FFA8-AF Task #1 Map Set (Task map in use chosen by FF91 Bit 0)

Each register has 6 bits into which is stored the block number 0-63 ($00-$3F) of the Physical 8K RAM block (out of 512K) that you wish to appear at the CPU Logical address corresponding to that register.

Also can be shown this way: the 6 register bits, when the Logical Address in the range of that register, will become the new Physical RAM address bits:

18 17 16 15 14 13

MMU Register:       CPU:
Task0  Task1   Logical Address / Block#
 FFAO   FFA8    0000 - 1FFF      O          The 6-Bit Physical Block Number
 FFA1   FFA9    2000 - 3FFF      1           placed in a MMU register will
 FFA2   FFAA    4000 - 5FFF      2           become the A13-A18 lines when
 FFA3   FFAB    6000 - 7FFF      3           the corresponding Logical Add
 FFA4   FFAC    8000 - 9FFF      4           is accessed by the CPU.
 FFA5   FFAD    A000 - BFFF      5
 FFA6   FFAE    C000 - DFFF      6
 FFA7   FFAF    E000 - FDFF      7

Ex: You wish to access Physical RAM address $35001. That address is:

A- 18  17  16  15  14  13  12  11  10   9   8   7   6   5   4   3   2   1   0
   .....3....  .......5......  .......0......  .......0......  .......1......
    0   1   1   0   1   0   1   0   0   0   0   0   0   0   0   0   0   0   1

Taking address bits 18-13, we have : 0 1 1 0 1 0, or $1A, or 26. This is the physical RAM block number, out of the 64 (0-63) available in a 512K machine.

Now, let's say you'd like to have that block appear to the CPU at Logical Block 0 (0000-1FFF in the CPU's 64K memory map).

You would store the Physical Block Number ($1A) in either of the two Task Map registers that are used for Logical Block 0 (FFA0 or FFA8) . Unless your pgrm doing this is in the Vector RAM at FEXX (set FF90 Bit 3, so ALWAYS there), you would want to use your current Task Map Register Set. If the TR bit at FF91 was 0, then you'd use MMU register FFA0 for the $1A data byte.

To find the address within the block, use Address Bits 12-0 plus the Logical base address (which in this case is $0000):

Now you could read/write address $1001, which would actually be $35001.

FFB0-BF COLOR PALETTE REGISTERS (6 bits each)

 FFB0 - palette 0
 FFB1 - palette 1    The pixel or text attribute bits in video memory 
 ...                  form the address of a color palette (0-15).
 FFBF - palette 15   It is the color info in that palette which is seen.

 Reg bits - 5  4  3  2  1  0
 CMP . . . I1 I0 P3 P2 P1 P0 Intensity and Phase (16 colors x 4 shades)
 RGB . . . R1 G1 B1 R0 G0 B0 Red Green Blue (64 RGB combo's)

When CoCo Bit is set and palette registers preloaded with certain default values (ask if you need these), both the RGB and CMP outputs appear the same color, supposedly.

40/80 Column Text Screen Bytes are Even=char, Odd=attribute in memory. Characters selected from 28 ASCII. NO text graphics-chars. Char Attributes - 8 bits . . . F U T T T B B B Flashing, Underline, Text foregrind, Backgrnd colors 0-7.

FFC0-DF SAM : same as before (mostly compatible Write-Only Switches)
 FFD8 = CPU .895 MHz (no address-dependent speed)
 FFD9 =     1.79 MHz
 FFDE = Map RAM/ROM
 FFDF = all RAM

ADDENDUM

This is an addendum to the GIME information. Thanks to Greg Law and his friend Dennis Weldy for much register info.

GIME Register Corrections

$FF91 - Bit 5, Timer Input Select. Looks like 0=slower speed, instead. Haven't had time to put a scope on it to check actual clocks, yet. Not sure.

$FF92-3 - Interrupt Request Regs : You can also read these regs to see if there is a LOW on an interrupt input pin. If you have both the IRQ and FIRO for the same device enabled, you read a Set bit on both regs if that input is low.

For example, if you set $FF02=0 and $FF92=2, then as long as a key is held down, you will read back Bit 1 as Set.

The keyboard interrupt input is generated by simply AND'ing all the matrix pins read back at SFF00. Therefore, you could select the key columns you wished to get by setting the appropriate bits at SFF02 to zero. Pressing the key drops the associated SFF00 line to zero, causing the AND output to go low to the GIME. Setting SFF02 to all Ones would mean only the Joystick Fire buttons would generate interrupts.

$FF94-95 - Storing a $00 at SFF94 seems to stop the timer. Also, apparently each time it passes thru zero, the $FF92/93 bit is set without having to reenable that Int Request.

$FF98 - Bit 5 is the artifact color shift bit. Change it to flip Prmode 4 colors. A One is what is put there if you hold down the F1 key on reset. POKE &HFF98, &H13 from Basic if your colors artifact the wrong way for you.

$FF9F - Horz Offset Reg. If you set Bit 7 and you're in Gfx mode, you can scroll across a 128 byte picture. To use this, of course, you'd have to write your own gfx routines. On my machine, tho, an offset of more than about 5 crashes.

$FFB0-BF - As I originally had and we all know by now, FFB0-B7 are used for the text mode char background colors, and FFB8-BF for char foreground colors, in addition to their other gfx use.

COCO-3 internal Tidbits

The 68B09E address lines finally have pullup resistors on them. Probably put in for the 2MHz mode, they also help cure a little-known CoCo phantom: since during disk access, the Halt line tri-states the address, data, and R/W lines, some old CoCo's would float those lines right into writing junk in memory. Now SFFFF would be presented to the system bus instead. Since the GIME catches the old VDG mode info formerly written to the PIA at SFF22, those four now-unconnected lines (PB4-7 on the 6821) might have some use for us.

Also, Pin 10 of the RGB connector is tied to PB3 on the same PIA. Shades of the Atari ST. Could possibly be used to detect type of monitor attached, if we like. Data read back from RAM must go thru a buffer the GIME, and another buffer. Amazing that it works at 2 MHz. In case you didn't catch the hint from GIME.TXT on FF90 Bit 2, the option of an internal SCS select opens up the possibility of a CoCo-4 with a built-in disk controller.

GIME PINS

61 63 65 67 01 03 05 07 09 09 ------- 01, 68 --അം -- 61 60 62 64 66 68 02 O 4 06 08 ... O 10 60 58 59 3 12 l l 56 57 15 14 l l 54 55 7 6 l l 52 53 Botto 19 18 l Top l 50 51 21 20 l l 48 49 23 22 l l 46 47 25 24 l l 44 45 42 40 38 36 34 32 30 28 26 26 44 43 41 39 37 35 33 31, 29 27 27 - -------------------- 43
O - GND 8 - D6 35 - --5 Volt S 52 سس۔ A13 02 — XAL 19 - D7 36 - 23 53 - A14 03 - XTAIL 20 - FIRQ k ->CPU 37 - 24 54 - A15 04 - RASAk 21 - IRQ* --> CPU 38 - test (+5) 55 -- VSYNC k 05 - CAS k 22 - CART Int in 39 - 2.5 5 6 - HSYNC* 06 - E 23 - KeyBdk Int in 40 ー Z6 57 - D7 (RAM) 07 - O 24 - RS232 Int in 41 - 27 58 - D6 08 - R/Wik 25 - AO (fm CPU) 42 - Z, 8 59 - D5 09 - RESET * 26 - A1 43 - A4 (fm CPU) 60 - D 4 O - WErik O 27 or A2 44 - A5 61 - D3 11 - WEnik 1 28 - A3 45 - A6 62 - D2 12 - DO (CPU) 29 - S2 . 46 - A7 63 - D1 13 - D. 30 - S1 . 47 - A8 64 - DO 14 - D2 31 - S0 . 48 - A9 65 – Comp Vid 15 - D3 32 - 20 (RAM) 49 - A10 66 - Blue 16 - D4 33 - 21 50 - All 67 - Green
7 - D5 34 - 22 51 - A12 68 - Red

Notes : WEnx as Write Enables for Banks 0 and 1 RAM S2-0 as (address select code -> 74LS138) : OOO - O - ROM 010 -2- FFOX, FF2X 100 - 4 - int SCS 110 - 6 - norm SCS 00 - 1 - CTS 011 –3- FF1X, FF3X 101 -5- n/a 11 - 7 - ??ram??

CONNECTORS:

(CN5, 6 - top to bottom, CN2 - left to right)

CN6 - Gnd +5 D1, DO, D2, D3, D6, D7, D5, D4, WEn1, Gnd CN5 – Gnd, D2, D3, D1 WEn0, D0, CAS, D6, D5, D4, D7, Gnd CN2 - Gnd RAS, 20, 21 22, 23, 26, 25, 24, 27, 28, Gnd Tho as far as the CN " s go, even if I have messed up all but the CAS, RAS, WEn's, and +5, you could connect the extra RAM Dx and 2x pins in parallel to each bank in any order. Most RAM's don't care. CN6 and CN5 data lines go to separate 256K banks, of course. General Info: Data is written to the RAM by byte thru IC 10 or IC11, selected by WEn 0 or 1. (write enable 0 is even addresses write enable 1 = odd addresses) Two bank RAM data is read back to the GIME thru IC1.2 & IC13, byte at a time. The CPU can then get it from the GIME by byte. IC 10, 11, 12 = 74LS 244 buffer . IC13 = 7 4LS 374 latch clocked by CAS* rise . RAM Read --> IC12 --> GIME enabled by CAS low. (read first) RAM Read --> IC13 --> GIME enabled by CAS hi. (latched & read) Test Points : TEP 2 = E TP 4 = RAS TP 6 = Comp Video TP 9 TP 3 = Q TP 5 = CAS TP 8 = Re TP 10 Green Blue s:

Section 2

IRQ POLLING TABLE

A list of 9-byte entries, one for each device controller / driver that has used the FSIro call. When an IRQ comes, IOMAN uses this list to find the device that is requesting service. IOMAN then JSR's to the driver's interrupt routine, which is expected to clear the IRQ, and do whatever I/O is required. The driver normally will wake up V. WAKE, the process that was using the device. (The driver had put the process to sleep.)

DEVICE TABLE

When a device is first called upon, IOMAN inserts quick reference info about the device in the table, and calls the device's INIT subroutine that first time only. Table used by IOMAN for making path desc's & calling the device's file mgr; by file mgir to call device's driver.

MODULE DIRECTORY

Table of modules in memory, at 00A00-00FFF. Contains info on their physical address, and used by OS 9 for quick lookup of module names. Also used to keep track of the number of users.

PATH DESCRIPTORS

Each open path has a Path Descriptor, which is shared by all processes that got the path desc by ISDup'ing a path, or by having the path passed to it by the FSFork call, which dup's the first 3 standard paths of the parent to the child. The desc block number is NOT the number you use in a program to access the path. The block number is stored in the process desc I/O path table in the order in which the paths are opened (they take the first empty spot found in the proc path table). Your number is simply an index into the path desc I/O table in your process descriptor, which is then used by IOMAN to get the real path desc block number. The base address of all path desc's is in D. PthDBT.

Entry Format
IRQ POLLING TABLE
QSPOLL 00-01 Polling address (status byte) QŞEFLIP 02 Flip byte for negative logic QŞMASIK 03 Mask byte for IRQ bit QSSERV 04-05 Service routine
OSSTAT 06-07 Static storage address QSPRTY 08 Priority of device POILLSIZ . Size of each entry
Entry Format
DEVICE TABLE
VŞDRIV 00-01 Driver module
VSSTAT 02-03 Driver static storage VŞDESC 04-05 Descriptor module VŞEMGR 06-07 File manager module VŞUSRS 08 Device user count DEWSIZ Size of each entry
Entry Format
MODULE DIRECTORY
MDSMPDAT 00-01 Module " s block ( s ) DAT Image Pointer MID SMB Sizi 02-03 Memory Block Size
MDSMPtr 04-05 Offset pointer in block to module MDSLink 06-07 Module Link Count
Block Format
PROC/PATH DESRIPTORS
Descriptors (process/path) are allocated in 64-byte blocks, out of 256-byte pages. The very first block is dedicated as pointers to this and any other pages needed to hold the max # of descriptors in use.
3F MSB's of pages allocated to this type of descriptorحسی۔00
40-7F Descriptor 80-BE Descriptor CO-FF Descriptor
Therefore byte S01 64-byte blocks :
OO-3F Descriptor 40一7F Descriptor 80-BF Descriptor CO-FF Descriptor
#1 #2 #3
in the first page above points to the next page of four
#4 #5 #6 #7

The descriptor # is used as the proc ID / path pointer by the system. If the descriptor is not in use (killed/closed), the first byte of the block is cleared as a flag, else it is equal to the descriptor number itself.

MODULE TYPES

S10 Prgrim Program module SC0 Systm System module $20 Sbirtin Subroutine mod SDO FlMgr File manager S30 Multi Multi-module SEO Drivir Device driver $ 40 Data Data module SFO Devic Device descriptor

UNIVERSAL MODULE HEADER

MŞID 00ー01 Sync bytes ($87CD) MSSize O2-03 Module size MŞİName 04-05 Offset from start to module name MŞType O6 Type / language nibbles M$RevS O7 Attributes / revision nibbles MSParity 08 Header parity 8 a 8 Rest of header, program, and CRC value.

INT MODULE

OO-08 Universal header MaXInem 09-OB Top of free memory Po Crnt OC IRQ polling table max entry count DeVCn't OD Device table max entry count InitStr OE-OF Startup module name offset ("CC3GO " ) SysStr 10-11 Default device name offset (t/D0 " ) StoStr 12-13 Standard I/O pathlist (T / TERM) BootStr 14-15 Bootstrap module name ("Boot") ProtFlag 16 Write-protect enable flag Name strings

PROGRAM MODULE

OO-08 Universal header MSExec 09-0A Execution entry offset MŞMem 0B- OC Data memory size required Program

SUBROUTINE MODULE

00-08 Universal header MŞExec 09 - OA Subroutine entry point (may be elsewhere) MŞMem 0B- OC Stack space required (optional for pgm use) Subroutine (S)

FILE MANAGER

OO-08 Universal header MSExec 09-0A Offset to Execution Entries Table Name string, etc. Execution Entries Table (all LBRA xxxx) FMCREA OO-02 Create new file FMOPEN 03-05 Open file EFMMDIR O6-08 Make directory EFMCDIR O9-0B Change directory EMDLET OC -- O E Delete file FMISEEK OF-1 Seek position in file F'MIREAD 12-14 Read from file FMWRIT 5-7 Write to file FMRDIN 18-1A Read line with editing FMWRLN 1B-1D Write line with editing FMGSTA 且E一20 Get file status FMS STA 21-23 Set file status EFMCLOS 24一26 Close file File manager program

DEVICE DRIVER

OO-08 Universal header MŞExec 09-0A Offset to Execution Entries Table MŞMem 0Bー0C Static storage required MSMode OD Driver mode capabilities Name string, etc . Execution Entries Table (all LBRA xxxx) DŞINIT OO-02 Initialize device DSREAD 03-05 Read from device DSWRIT 06-08 Write to device D$GSTA 09 0 سےB Get device status D$IPSTA OC-0E Put device status DSTERM OF-11 Terminate device Device driver program

DEVICE DESCRIPTOR

MŞFMgr MSPDev MSMode MŞPort MŞOpt MŞDTyp Universal header File manager name offset for this device Driver Device Device Number Device name offset capabilities extended address of options in initialization table type 0=SCF 1=RBF 2n-PIPE 4=NFM Initialization table (copied to path desc) Name strings

Section 3

VIDEO DISPLAY CODES All codes are hex (natch) and are sent to the desired device window. (see also pages 20 on, in September 86 RAINBOW for examples) Parameters with H* * L* * parts are the High (msb) and Low (lsb) bytes. Device windows are the /Wx's, overlay windows go within device windows. Visible screens will change to the one containing the current active window. (each displayable screen can have several windows in it) DWSET 1B 20 STY CPX CPY SZX SZY PRN PRN (PRN) Device Window Set - set up a device window (/Wx) OWEND 1B 24 Device Window End SELECT 1B 2. Select Active Window - send this code to the device window whose screen you wish to become visible and the new active keyboard user. OWSET 1B 22 SVS CPX CPY SZX SZY PRN PRN Overlay Window Set - set up an overlay window within a device window OWEND 1B 23 Overlay Window End CWAREA 1B 25 СРХ СРУ S ZX SZY Change Window Area - changes active window portion Notes: AWX - up to 31 windows, plus /W and / TERM CPX CPY - starting char col & row SZX SZY - size in rows & cols PRN - palette register number (00-0F) SVS - save switch (0=no, 1=yes) to save data under OW STY - window screen type = current type: allows multiple windows in a screen = 40X24 text = 80x24 text 640x192 two color gfx 320x192 four color 640x192 four color = 320x192 sixteen color DEE'GPBUE B 29 GRP BFN HBL LBI Define Get /Put Buffer - preset a buffer size KTLBUF 1B 2A GRP BEN Kill Buffer - return buffer to free men GPLOAD 1B 2B GRP BFN STY HSX LSX HSY LSY HBI, LBL DATA . . . Get/Put Buffer Load GETEBLIK 1. B 2C GRIP BEFN HBX LBX HBY LBY HSX LSX HSY LSY Get Graphics Block

PUTBLIK 1B 2D GRP BEFN HIBX LBX HBY LBY Put Graphics Block Notes : GRP - Get/Put Buffer Group Number 00-FE BFIN - Get/Put Buffer Number 01-FF (within Group) HBL/LBL - 16 bit length -SX -SY - size X Y -BX -BY - buffer X Y Get /Put Groups and their Buffer subsets are used to store screen data, fonts, and pattern ram info. Certain Group numbers are pre-defined as reserved, or as fonts, patterns, etc. Within those Groups, specific Buffer numbers are set aside. For your own use, you should do an FSID call to get your process id, kill the group, then Open it for your use. This keeps things separated. The standard Groups and Buffers within those groups: C8 - fonts O1 - 8x8 font 02 - 6X8 font 03 — 8x8 gfx C9 - clipboards CA - pointers 01 - arrow 02 - pencil 03 - large cross-hair 04 - wait 05 - stop 06 - text ) ( 07 small cross-hair CB - patterns ( 2 color) 01 - dot CC - patterns ( 4 color) 02 - vertical lines CD — patterns (16 color) 03 — hor z lines 04 - cross-hatch 05 - left slant 06 - right slant 07 - small dot 08 - big dot PSET 1B 2E GRP BEFIN Pattern Set - select buffer as pattern ram array ILSET 1B 2F LCD Logic Set - select mode for pattern display O = store data on screen as is 1 = AND pattern data w/screen data 2 = OR 3 = XOR

DEF COLR PALE TITTE FCOLOR BCOLOR BORDER NO te S : 31 PRN 32 PRN 33 PRN 34 PRN CTN Default Color Reset Set Palette Reg Foreground Color - use palette F PRN Background Color - use palette IF PRN Border Color - use palette # PRN color (00-3F RRRGGGBBB xslated by monitor type) SCALESW DWPROTSW GCSET FONT BCHIRSW TCHRSW BOLDSW PROPSW NObte S BFIN BFN Scaling - 01 = drawing is relative to window size Window Protect Switch (boundary detection) Set source of Graphics Cursor data Select Font - previously loaded into buffer Block Char - draw char font as full chair block Transparent Char - draw char dots only Boldface Char Proportional option switch ( 00 =off, 01-on) CURSOR POINT LINE LL NEM BOX BAR PUTGC FFILL CIRCLE ELIPSE ARC RARC 50 HBR LBR LBY RCURSOR 1B 41 (Relative Coords) LBY RPOINT 1B 43 - use relative coords LBY RLINE 1B 45 HBXO LBXO HBYO LBYO LBY RLINEM 1B 47 for these Cnds LBY RBOX 1B 49 ILBY REBAR 1B 4B LBY 51 HBRx LBRx HBRy LBRy 52 HBRx LBRx HBRy LBRy HX01 LX01 HYO1 LYO1 HX02 LX02 HY02 LYO2 53 HEBRXO Other Terminal Codes : HOME GO XY ERASE LINE ERASE EO CURSOROEE CURSORON RIGHT BELL LEFT UP O 02 O3 04 O5 20 05 21 06 07 08 09 " etc ERASEEOS OEB CLSHOME OC RETURN <CR> OD REVERSEON 1F 20 REVERSE OFF 1F 21 UNDERLINEON 1F 22 UNDERLINE OFF 1F" 23 BLINKON F 24 BLINKOEFEF 1F 25 INSLINE 1F 30 DELLINE 1F 31 DOWN OA

Section 4

Keyboard Definitions with Hex Values NORM SHFT CTRL O 30 0 30 1F 1 31 31 7ο 2 32 " 22 OO 3 33 # 23 7E 4 34 S 24 OO 5 35 %, 25 OO 6 36 & 26 OO 7 37 * 27 @ 5E 8 38 ( 28 [ 5B 9 39 ) 29 ] 5Ꭰ : 3A 2A OO ; 3B + 2B 7 F 2C < 3C 7B - 2D = 3D 5F 2E > 3E 7D / 2F 2 3F \ 5C <CLR><O> s= The only new key code generated is the 7F rubout key. Kcontrol>--; shift u/l case SHFT CTRL 60 NUL a 61. SOH 62 STX C 63 ETX 64 EOT e 65 EMO f 66 ACK g 67 BEL h 68 BSP ji 69 HT j 6A LF k 6B Vʻ 6C EFEF" M 6D CR In 6E CO o 6F C 7-4-1 NORM SHFT P 50 р 70 Ο 51 α 71 R 52 r. 72 S 53 s. 73 T 54 - 7 4 U 55 1 75 V 56 v7 7 6 W 57 %) 77 X 58 x 78 Y 59 y 79 Z 5A Z 7A BREAK 05 ENTER OD SPACE 20 LEET 08 RIGHT O9 DOWN OA UP OC B OD 20 O 1. 12 3

Section 5

System error codes

OO1 O1 Exit OO2 O2 Keyboard abort OO3 03 Keyboard interrupt 2OO ESPthFull C8 Path Table full 201 ESBPNum C9 Bad Path Number 2O2. ESPoll CA Polling Table Full 2O3 EŞ BMode CB Bad Mode 2O4. ESDevOvf CC Device Table Overflow 2O5 ESBMID CD Bad Module ID 206 ESDirFul CE Module Directory Full 207 ESMemFull CF Process Memory Full 2 O 8 ES Unk Siv C D O Unknown Service Code 209 ESModBsy D1 Module Busy 21 O EŞ BPAddr D 2 Bad Page Address 211 EŞ EOF D3 End of File 22 D4 Attempt to return memory not assigned 21 3 E ŞNES D5 Non-Existing Segment 24 EŞFNA D6 File Not Accessable 2 15 ESBPNam D7 Bad Path Name 21 6 EŞ PINNEF D8 Path Name Not Found 217 ES SILF D9 Segment List Full 21 8 EŞCEF DA Creating Existing Fibe 219 ESIBA DB Illegal Block Address 220 ES Hang Up DC Carrier lost 221 ESMINF DD MOdule NOt. FO und 222 DE Sector out of range 2 2 3 EŞ Del SP DF Deleting Stack Pointer memory 224 E ŞI Prc ID E O Illegal Process ID 225 E1 226 EŞİN OChild E2 No Children 227 ES ISWI E3 Illegal SW I code 228 E ŞPor cAbt E4 PrO CeSS Ab Orted 229 EŞ Por cFull E5 Process Table Full 230 ES Fork P E6 Illegal Fork Parameter 23. EŞKwnMod E7 Known Module 232 EŞBMCRC E8 Bad MOClule CRC 233 ESUSigP E9 Unprocessed Signal Pending 234 EŞNE Mod EA Non. Exist in g Modul. e 235 ESBNam EB Bad Name 23 6 EŞ BMHP EC Bad module header parity 237 ES NORam ED No Ram Available 238 ESBPrcID EE Bad Process ID 23 9 EŞ No Task EF No available Task number 24 O ES Unit FO Illegal Unit (drive) 2 4 1 EŞSect F1 Bad SECT or number 24 2 ESWP F2 Write Protect 24 3 EŞCRC F3 Bad CheCk SUm 244 EŞ. Read F4 Reed Err Cor 2 4 5 ES Write F5 Write Error 24 6 EŞNot Rdy F 6 Device Not Ready 24 7 EŞSe ek Fį See K Err Cor 248 EŞFull F8 Media Full 249 EŞİBTyp F9 Bad Type (incompatable) media 250 ESDevBsy FA Device Busy 251. EŞDIDC FB Disk ID Change 252 ESLock FC Record is busy (locked out) 253 EŞ Share FD Non-sharable file busy 254 EŞ Dead Huk FE I/O Deadlock error 7-5- ________________ INSIDE OS9 LEWEL II INDEX A ClOS er LOOk A Small PrOb. em ADDENDUM AREAS OF INTEREST An Analogy BUGS- Hardware BOGS- Manual BUGS- Software Basic Interupt Handling CC30 CC30 CHARACTERS FONT Clock INIT & Operation CoCo-3 Internal Tidbits Comparison with Other I/O Devices Connectors Dat Dat Images & TaSks Each User Task Map Example Maps Example Cne Example Two F$Lirik from system state F$Load from system state FONT CONVERSION Forking RUNER nodules GENERAL DRIVER NOTES GIME Register Cor rections GRFDRV GRFDRV GRFINI GRIF” INT/WIMIOINT General Information General Notes vir qs end up as irqi Gimie Dat II/ C ICMAN INIT I OMAN IRQ Poll Syriopsis IRQ Hand) ing IRQ " s On Level Two JRQ's - Clock & Devices IRQ-- Related DP. Vars & System Tables Inforraeti con Killing Window Processes L-II Direct Page Variable Map S00XX L-) I Process Descriptor Variables Level II Task Switching Level Two De vice Addr e SS es Le Vel TWO In More Detail Le Vel TwO V S One : General Level-I CoCo l/2 Level-I CoCo 3 e Air e - a ow ________________ INSIDE OS9 EVEL, INDEX Logical vs Physical Addresses Login II Patch Making Windows Memory Mgmt Merged Module Files Misc . Misc. Window Tips Multi-task ing Principles Multi-tasking Principles Multi-task ing Principles Multi-tasking Principles Now I Have It, Whats its Use? OS9 BOO tS OS9 System Calls OS9 Vector Initialization Ok , What About OS 9 Le Vel -II Other L-II Driver Changes Other System Ram Usage OV'er View Of OS9 ProceSS Information Process quenes Program Modules RBF Things SCF Special Chars. SHELL Screen Memory Signals Simple System Memory Map States Swi " S Switching Between Maps System Memory Allocation THE WINDOW DRIVERS TIPS, GOTCHAS & LAST MINUTE STUFF The CoCo-2 Boards The COCO-3 Dat The Main Players The Systema Map The System Task Map Too Much To Say Transfer To System State-Level I/II Universal Systema Tables User Maps Module & Data Areas Using L-I Debug On Level Two Using L-I VDG Programs Using Rogue to Make a System Disk VDGINT VIDEO DISPLAY CODES am o ________________ Congratulations on your purchase of the first of what we hope will be many books on the most powerful operating system available, OS-9 This copy of "INSIDE OS9 LEVEL II' will be upgraded as time goes by and as more information is Collected. To get your discounted copy of the next edition of "INSIDE OS9 LEVEL II' fill out the coupon below and mail it in. Ο OU ΡΟΝ This coupon entitles the bearer to edition 2 of INSIDE OS9 LEVEL li" when it becomes available for 50% of the cover price of this copy. The price of $20.00 includes COD UPS charges. This coupon is good for shipment in the USA only. Name City State ZIP Date Mai to: Frank Hogg Laboratory, Inc. 77O James Street Address(moPOBOX) - Syracuse, New York 13203

DON'T LET YOUR FINGERS DO THE WALKING Typing in the long listings from INSIDE OS9 LEVEL ll can be a real pain. By ordering INSIDE OS9 LEVELll DISK you can eliminate that hardship. The disk includes the programs in the book plus many other nifty programs by the author. The INSIDE OS9 LEVEL II DISK is just $20.00 and contains all the programs in the book plus others by the author. You can use your Visa, MasterCard, American Express or Diners Club card. Or you can enclose payment and mail your order to: Frank Hogg Laboratory, Inc. 77O James Street Syracuse, New York 13203 315/474-7856

YES Send me the NSIDE OS9 LEVEL DISK Name Address City State ZIP Payment Enclosed Charge my Visa account Charge my MasterCard account Charge My American Express account(5% surcharge) Charge my Diners Club account(5% surcharge) ACCount No. Card Expires Signature Interbank No. Non-US orders add $2.00 US to cover additional shipping. NY State residents add 7% sales tax. ________________ Frank Hogg Laboratory is the largest supplier of software for OS9. We have also been Supporting OS9 longer than any other Company. If you Would like to get on our mailing list to receive free newsletters and catalogs please fill Out the Coupon below and mail it in. Thank YOU MALING LIST COUPON YES! Please put me on your mailing list to receive free newsletters and other information about OS9. My interest is: Name Address City State ZP Date Mail to: Frank Hogg Laboratory, Inc. 77O James Street Syracuse, New York 13203