Difference between revisions of "GeneveOS XOP Definitions"

From Ninerpedia
Jump to navigation Jump to search
m
m
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
MDOS makes frequent use of XOPs and offers them for user programs. An XOP (extended operation) is a special command of the TMS processor family which causes a [[Terminology#C|context switch]], transferring control to a location that is specified in a table.
GeneveOS makes frequent use of XOPs and offers them for user programs. An XOP (extended operation) is a special command of the TMS processor family which causes a [[Terminology#C|context switch]], transferring control to a location that is specified in a table.


Compared to common architecture concepts, the XOP is TI's way of implementing a '''system call'''.
Compared to common architecture concepts, the XOP is TI's way of implementing a '''system call'''.  


== General usage of XOPs ==
The XOP instruction takes two arguments; the first delivers data for the call, the second is a number from 0 to 15 and indicates the '''XOP number'''. In GeneveOS, all system calls are XOP 0 with specific arguments:


== XOP five: Keyboard ==
ARGUM  DATA <number>
        ...
        XOP @ARGUM,0
        ...


{| class="xop5"
=== Overview ===
| Input
 
| R0 LSB
{| class="plainc"
| Scan mode
! XOP argument
! Category
|-
|-
| Output
| 5 || [[Geneve keyboard control | Keyboard ]]
| R0 LSB
| Scan mode
|-
|-
|
| 6 || [[GeneveOS Video Interface | Video display ]]
| R1 MSB
| Scan code
|-
|-
|  
| 7 || [[GeneveOS Memory Management Functions | Memory Management ]]
| R2 MSB
| Joystick Y value (see TI, 8376)
|-
|-
|
| 8 || [[GeneveOS Device Operation | Devices (Files) ]]
| R2 LSB
| Joystick X value (see TI, 8377)
|-
|-
|  
| 9 || [[GeneveOS Utility Functions | Utility functions]]
| EQ bit
| if a new key has been pressed
|-
|-
| 10 || Mathematical functions
|}
|}


The scan modes 0-5 are identical to those in the TI console. Scan mode 7 is specifically used to check the BREAK key (EQ set), and scan mode 8 returns the raw scan code in R1 MSB. If no key was pressed, R1 MSB contains 0xFF.
=== Used workspaces ===
 
== XOP six: Video ==
 
== XOP seven: Memory ==
 
[[MDOS Memory Management Functions]]
 
== XOP eight: Device operation ==
 
== XOP nine: Utilities ==


== XOP ten: Maths ==
The XOPs use workspaces F0C0 and F0A0.


[[Category:MDOS]]
[[Category:MDOS]]
[[Category:Geneve]]
[[Category:Geneve]]
[[Category:Programming]]
[[Category:Programming]]

Latest revision as of 16:27, 30 April 2022

GeneveOS makes frequent use of XOPs and offers them for user programs. An XOP (extended operation) is a special command of the TMS processor family which causes a context switch, transferring control to a location that is specified in a table.

Compared to common architecture concepts, the XOP is TI's way of implementing a system call.

The XOP instruction takes two arguments; the first delivers data for the call, the second is a number from 0 to 15 and indicates the XOP number. In GeneveOS, all system calls are XOP 0 with specific arguments:

ARGUM  DATA <number>
       ...
       XOP  @ARGUM,0
       ...

Overview

XOP argument Category
5 Keyboard
6 Video display
7 Memory Management
8 Devices (Files)
9 Utility functions
10 Mathematical functions

Used workspaces

The XOPs use workspaces F0C0 and F0A0.