GeneveOS Utility Functions

From Ninerpedia
Jump to: navigation, search

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:

       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