Difference between revisions of "GeneveOS Device Operation"

From Ninerpedia
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.")
 
m
Line 1: Line 1:
Accessing devices (floppy disk, hard disk, serial connector, printer) is possible in GeneveOS via XOP calls.
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:
PABADD EQU  >F180 
FILE  DATA 8
...
        LI  R0,PABADD
        XOP  @FILE,0
        MOVB @PABADD+2,R0
        JNE  SF7
        ...
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.
=== Available memory pages ===
'''Opcode: 0'''
{| class="xoparg"
|-
|
! Input !! Output
|-
| R0
| Opcode (0000) || Error code (always 0)
|-
| R1
| || Number of free pages
|-
| R2
| || Number of fast free pages
|-
| R3
| || Total number of pages in system
|-
|}
This function is used to query the free space in the system. No changes are applied. The total number of pages are the maximum number of allocatable pages.

Revision as of 16:04, 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:

PABADD EQU  >F180   
FILE   DATA 8
...
       LI   R0,PABADD
       XOP  @FILE,0
       MOVB @PABADD+2,R0
       JNE  SF7
       ...

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.

Available memory pages

Opcode: 0

Input Output
R0 Opcode (0000) Error code (always 0)
R1 Number of free pages
R2 Number of fast free pages
R3 Total number of pages in system

This function is used to query the free space in the system. No changes are applied. The total number of pages are the maximum number of allocatable pages.