Difference between revisions of "GeneveOS Utility Functions"
Jump to navigation
Jump to search
(Created page with "Accessing devices (floppy disk, hard disk, serial connector, printer) is possible in GeneveOS via XOP calls. == User-task XOPs == User-task XOPs are available for use in app...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 5: | Line 5: | ||
User-task XOPs are available for use in application programs. Here is a typical example: | User-task XOPs are available for use in application programs. Here is a typical example: | ||
UTIL DATA 9 | UTIL DATA 9 | ||
PARSE DATA >0008 | |||
... | ... | ||
LI R0,PABADD | LI R0,PARSE opcode | ||
LI R2,PABADD+15 target buffer; here: name field of PAB | |||
LI R3,>5000 first byte is maximum length of buffer | |||
MOVB R3,*R2 | |||
CLR R3 normal mode | |||
XOP @UTIL,0 | XOP @UTIL,0 | ||
JEQ OK | |||
Similar as with the TI-99/4A device service routine concept (DSR), a Peripheral Access Block (PAB) must be set up prior to invoking the XOP. | Similar as with the TI-99/4A device service routine concept (DSR), a Peripheral Access Block (PAB) must be set up prior to invoking the XOP. | ||
Line 28: | Line 30: | ||
|- | |- | ||
| R0 | | R0 | ||
| 0000 || | | 0000 || - | ||
|- | |- | ||
| Status | | Status | ||
Line 49: | Line 51: | ||
|- | |- | ||
| R2 | | R2 | ||
| Pointer to | | Pointer to target buffer || - | ||
|- | |- | ||
| R3 | | R3 | ||
Line 55: | Line 57: | ||
|- | |- | ||
| Status | | Status | ||
| - || EQ | | - || EQ=1 when successfully parsed | ||
|} | |} |
Latest revision as of 20:32, 17 July 2016
Accessing devices (floppy disk, hard disk, serial connector, printer) is possible in GeneveOS via XOP calls.
User-task XOPs
User-task XOPs are available for use in application programs. Here is a typical example:
UTIL DATA 9 PARSE DATA >0008 ... LI R0,PARSE opcode LI R2,PABADD+15 target buffer; here: name field of PAB LI R3,>5000 first byte is maximum length of buffer MOVB R3,*R2 CLR R3 normal mode XOP @UTIL,0 JEQ OK
Similar as with the TI-99/4A device service routine concept (DSR), a Peripheral Access Block (PAB) must be set up prior to invoking the XOP.
Utility functions
Opcode 0: Validate time
Checks whether the clock chip contains a valid time setting.
Input | Output | |
---|---|---|
R0 | 0000 | - |
Status | - | EQ=1 if time is valid |
Opcode 8: Parse filename
Input | Output | |
---|---|---|
R0 | 0008 | Delimiter |
R1 | Pointer to logical name | Error code |
R2 | Pointer to target buffer | - |
R3 | Alias flag | - |
Status | - | EQ=1 when successfully parsed |