Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
documentation:monitor:directpage [2014/03/22 19:25] – created pulkomandy | documentations:monitor:directpage [2014/03/23 11:38] – documentation:monitor:directpage renamed to documentations:monitor:directpage pulkomandy | ||
---|---|---|---|
Line 86: | Line 86: | ||
===== 3A: TEMPO ===== | ===== 3A: TEMPO ===== | ||
+ | Note length multiplier | ||
+ | ===== 3C: DUREE ===== | ||
+ | Note length | ||
+ | ===== 3D: WAVE ===== | ||
+ | Sound wave shape (values from 0 to 5) | ||
+ | ===== 3E: OCTAVE ===== | ||
+ | Note octave multiplier (16, 8, 4, 2, 1, from bass to treble) | ||
+ | ====== Tape drive ====== | ||
+ | Note: this needs a tape drive. | ||
+ | ===== 40: K7DATA ===== | ||
+ | Byte being read or written to tape | ||
+ | ===== 41: K7LENG ===== | ||
+ | Byte counter for current block being written to tape | ||
+ | ====== Printer ====== | ||
+ | Note: this needs a printer port, which is an extension on some machines. | ||
+ | ===== 42: PROPC - Printer Operation Code ===== | ||
+ | ===== 43: PRSTA - Printer status ===== | ||
+ | * 4: port open | ||
+ | * 8: ready | ||
+ | * 10: port closed | ||
+ | ====== System support ====== | ||
+ | ===== 44-45: TEMP - Temporary register ===== | ||
+ | Used as temporary storage by various routines. | ||
+ | ===== 46-47: SAVEST - System stack pointer backup ===== | ||
+ | S register is saved here when a routine needs to modify it. | ||
+ | ====== Disk operations ====== | ||
+ | These variables are only used by the floppy controller ROM, not the monitor one. | ||
+ | ===== 48: DKOPC - Disk Operation ===== | ||
+ | Used by DKCONT system call. Possible operations: | ||
+ | * 1: initialize controller | ||
+ | * 2: read a sector | ||
+ | * 4: switch to single density | ||
+ | * 8: write a sector | ||
+ | * 10: switch to double density | ||
+ | * 20: seek track 0 | ||
+ | * 40: seek track | ||
+ | * 80: verify sector. | ||
+ | Some of these can be combined (88 is "write and verify sector" | ||
+ | ===== 49: DKDRV - Active drive ===== | ||
+ | * 0: Drive A, top side | ||
+ | * 1: Drive A, bottom side | ||
+ | * 2: Drive B, top side | ||
+ | * 3: Drive B, bottom side | ||
+ | * 4: RAM disk | ||
+ | ===== 4A-4B: DKTRK - Disk track ===== | ||
+ | This is a 16 bit variable because of the use on QDD as the " | ||
+ | ===== 4C: DKSEC - Disk sector number ===== | ||
+ | ===== 4D: DKNUM - Sector interleaving factor ===== | ||
+ | The default is 7, which lays out the sectors in this order: | ||
+ | 0, | ||
+ | ===== 4E: DKSTA - Disk status ===== | ||
+ | Used as error bits after executing disk operations: | ||
+ | * bit 0: write protection | ||
+ | * bit 1: track error | ||
+ | * bit 2: sector error | ||
+ | * bit 3: data error | ||
+ | * bit 4: drive not ready, no disk or motor off | ||
+ | * bit 5: compare error (data read from disk and memory version are different) | ||
+ | * bit 6: not formatted | ||
+ | Used as information about the type of controller aftre initialisation: | ||
+ | * 43 (' | ||
+ | * 44 (' | ||
+ | |||
+ | ===== 4F-50: DKBUF - Disk buffer ===== | ||
+ | Pointer to 256 byte work buffer for the floppy controller | ||
+ | |||
+ | ===== 51-58: working area ===== | ||
+ | Used for several different purposes by the floppy ROM. | ||
+ | |||
+ | ====== Keyboard scanning, interrupts, custom character tables ====== | ||
+ | ===== 59: SEQUCE - Screen rendering state ===== | ||
+ | This is used as state saving for the screen display state machine. In particular, it allows rendering of multi-byte accented characters. | ||
+ | |||
+ | ===== 5A: US1 ===== | ||
+ | Temporary parameter storage for US escape sequences | ||
+ | |||
+ | ===== 5B: ACCENT ===== | ||
+ | Temporary storage for multi-byte accented characters | ||
+ | |||
+ | ===== 5C,5D: SS2GET, SS3GET ===== | ||
+ | Screen State machine temporary storage. These store the two parameters for multi-byte accent sequences. | ||
+ | |||
+ | ===== 5E-5F: SWIPT - Software interrupt table pointer ===== | ||
+ | This points to the table of system calls used by the SWI handler. Modifying this value allows redirecting the handlers for your own use. | ||
+ | |||
+ | ===== 61-62: TIMEPT - Ticker routine pointer ===== | ||
+ | This points to a routine to be called on every interrupt. | ||
+ | |||
+ | ===== 63: SEMIRQ ===== | ||
+ | Set to a non-zero value to re-route the IRQ handler using the IRQPT below | ||
+ | |||
+ | ===== 64-65: IRQPT ===== | ||
+ | Pointer to a routine to call on interrupt when SEMIRQ is set. | ||
+ | |||
+ | ===== 67-68: FIRQPT ===== | ||
+ | Pointer to a routine to call on FIRQ. This is either the lightpen scan, or the barcode reader. | ||
+ | |||
+ | ===== 6A-6B: SIMUL ===== | ||
+ | ===== 6D-6E: CHRPTR ===== | ||
+ | Pointer to keyboard decoding table (used by GETCH) | ||
+ | |||
+ | ===== 70-71: USERAFF ===== | ||
+ | Pointer to user characters for codes 128-255. | ||
+ | |||
+ | ===== 73-74: GENPTR ===== | ||
+ | Pointer to characters for codes 32-127. Characters are stored bottom to top. | ||
+ | |||
+ | ===== 76: LATCLV - Keyboard repeat delay ===== | ||
+ | |||
+ | ===== 77: GRCODE ===== | ||
+ | Control char to send to printer to switch to graphic mode. | ||
+ | |||
+ | ===== 78: DECALG ===== | ||
+ | Lightpen calibration offset | ||
+ | |||
+ | ===== 7F: DEFDST ===== | ||
+ | Default density for current floppy controller. | ||
+ | |||
+ | ===== 80: DKFLG ===== | ||
+ | Set to FF if there is a floppy controller connected. | ||
+ | |||
+ | ===== 82-85: serial port variables ===== | ||
+ | These are not used for anything in the ROM, but the software provided with the RF57 serial extension uses this area. | ||
+ | |||
+ | |||
+ | ===== 81-CC: system stack ===== | ||
+ | The stack grows downwards. | ||
+ | |||
+ | ===== CD-E4: LPBUF ===== | ||
+ | Working area for the lightpen reading code. | ||
+ | |||
+ | ===== FE-FF: FSTRST - Fast Reset ===== | ||
+ | This is set on first boot after the direct-page has been initialized. The Reset handler checks for this, and doesn' |