Difference between revisions of "GeneveOS XOP Definitions"

From Ninerpedia
Jump to navigation Jump to search
m
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.
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.
Compared to common architecture concepts, the XOP is TI's way of implementing a '''system call'''.


== General usage of XOPs ==
== General usage of XOPs ==

Revision as of 13:23, 16 June 2013

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 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.

General usage of XOPs

XOP five: Keyboard

Input R0 LSB Scan mode
Output R0 LSB Scan mode
R1 MSB Scan code
R2 MSB Joystick Y value (see TI, 8376)
R2 LSB Joystick X value (see TI, 8377)
EQ bit if a new key has been pressed

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.

XOP six: Video

XOP seven: Memory

MDOS Memory Management Functions

XOP eight: Device operation

XOP nine: Utilities

XOP ten: Maths