struct

Swanium::Core::Registers

Inherits Struct < Value < Object

General-purpose and segment registers of the NEC V30.

The index methods intentionally use the 8086 ModRM encoding: 8-bit registers are AL, CL, DL, BL, AH, CH, DH, BH; 16-bit registers are AX, CX, DX, BX, SP, BP, SI, DI.

Constructors

new(ax : UInt16 = 0_u16, cx : UInt16 = 0_u16, dx : UInt16 = 0_u16, bx : UInt16 = 0_u16, sp : UInt16 = 0_u16, bp : UInt16 = 0_u16, si : UInt16 = 0_u16, di : UInt16 = 0_u16, cs : UInt16 = 0_u16, ds : UInt16 = 0_u16, ss : UInt16 = 0_u16, es : UInt16 = 0_u16, ip : UInt16 = 0_u16)
Source

Instance methods

ax=(ax : UInt16)
Source
bp=(bp : UInt16)
Source
bx=(bx : UInt16)
Source
cs=(cs : UInt16)
Source
cx=(cx : UInt16)
Source
di=(di : UInt16)
Source
ds=(ds : UInt16)
Source
dx=(dx : UInt16)
Source
es=(es : UInt16)
Source
ip=(ip : UInt16)
Source
reg16(index : UInt8) : UInt16
Source
reg8(index : UInt8) : UInt8
Source
segment(index : UInt8) : UInt16

Segment-register encoding is ES, CS, SS, DS.

Source
set_reg16(index : UInt8, value : UInt16) : Nil
Source
set_reg8(index : UInt8, value : UInt8) : Nil
Source
set_segment(index : UInt8, value : UInt16) : Nil
Source
si=(si : UInt16)
Source
sp=(sp : UInt16)
Source
ss=(ss : UInt16)
Source