Namespace: IS

chip8.CPU. IS

Module which keeps instructions set.

Source:

Methods

<static> ADD_I_Vx(x) → {function}

Fx1E - ADD I, Vx
Set I = I + Vx.

Parameters:
Name Type Description
x number
Source:
Returns:
Type
function

<static> ADD_Vx_kk(x, kk) → {function}

7xkk - ADD Vx, kk
Set Vx = Vx + kk.

Parameters:
Name Type Description
x number
kk number
Source:
Returns:
Type
function

<static> ADD_Vx_Vy(x, y) → {function}

8xy4 - ADD Vx, Vy
Set Vx = Vx + Vy, set VF = carry.

Parameters:
Name Type Description
x number
y number
Source:
Returns:
Type
function

<static> AND_Vx_Vy(x, y) → {function}

8xy2 - AND Vx, Vy
Set Vx = Vx AND Vy.

Parameters:
Name Type Description
x number
y number
Source:
Returns:
Type
function

<static> CALL_nnn(nnn) → {function}

2nnn - CALL nnn
Call subroutine at nnn.

Parameters:
Name Type Description
nnn number
Source:
Returns:
Type
function

<static> CLS() → {function}

00E0 - CLS
Clears the display.

Source:
Returns:
Type
function

<static> DRW_Vx_Vy_n(x, y, n) → {function}

Dxyn - DRW Vx, Vy, n
Display n-byte sprite starting at memory location I at (Vx, Vy), set VF = collision.

Parameters:
Name Type Description
x number
y number
n number
Source:
Returns:
Type
function

<static> JP_nnn(nnn) → {function}

1nnn - JP nnn
Jump to location nnn.

Parameters:
Name Type Description
nnn number
Source:
Returns:
Type
function

<static> JP_V0_nnn(nnn) → {function}

Bnnn - JP V0, nnn
Jump to location nnn + V0.

Parameters:
Name Type Description
nnn number
Source:
Returns:
Type
function

<static> LD_B_Vx(x) → {function}

Fx33 - LD B, Vx
Store BCD representation of Vx in memory locations I, I+1, and I+2.

Parameters:
Name Type Description
x number
Source:
Returns:
Type
function

<static> LD_DT_Vx(x) → {function}

Fx15 - LD DT, Vx
Set delay timer = Vx.

Parameters:
Name Type Description
x number
Source:
Returns:
Type
function

<static> LD_F_Vx(x) → {function}

Fx29 - LD F, Vx
Set I = location of sprite for digit Vx.

Parameters:
Name Type Description
x number
Source:
Returns:
Type
function

<static> LD_I_nnn(nnn) → {function}

Annn - LD I, nnn
Set I = nnn.

Parameters:
Name Type Description
nnn number
Source:
Returns:
Type
function

<static> LD_I_Vx(x) → {function}

Fx55 - LD [I], Vx
Store registers V0 through Vx in memory starting at location I. The value of the I register will be incremented by X + 1, if load/store quirks are disabled.

Parameters:
Name Type Description
x number
Source:
Returns:
Type
function

<static> LD_ST_Vx(x) → {function}

Fx18 - LD ST, Vx
Set sound timer = Vx.

Parameters:
Name Type Description
x number
Source:
Returns:
Type
function

<static> LD_Vx_DT(x) → {function}

Fx07 - LD Vx, DT
Set Vx = delay timer value.

Parameters:
Name Type Description
x number
Source:
Returns:
Type
function

<static> LD_Vx_I(x) → {function}

Fx65 - LD Vx, [I]
Read registers V0 through Vx from memory starting at location I. The value of the I register will be incremented by X + 1, if load/store quirks are disabled.

Parameters:
Name Type Description
x number
Source:
Returns:
Type
function

<static> LD_Vx_K(x) → {function}

Fx0A - LD Vx, K
Wait for a key press, store the value of the key in Vx.

Parameters:
Name Type Description
x number
Source:
Returns:
Type
function

<static> LD_Vx_kk(x, kk) → {function}

6xkk - LD Vx, kk
Set Vx = kk

Parameters:
Name Type Description
x number
kk number
Source:
Returns:
Type
function

<static> LD_Vx_Vy(x, y) → {function}

8xy0 - LD Vx, Vy
Set Vx = Vy

Parameters:
Name Type Description
x number
y number
Source:
Returns:
Type
function

<static> OR_Vx_Vy(x, y) → {function}

8xy1 - OR Vx, Vy
Set Vx = Vx OR Vy.

Parameters:
Name Type Description
x number
y number
Source:
Returns:
Type
function

<static> RET() → {function}

00EE - RET
Return from a subroutine.

Source:
Returns:
Type
function

<static> RND_Vx_kk(x, kk) → {function}

Cxkk - RND Vx, kk
Set Vx = random byte AND kk.

Parameters:
Name Type Description
x number
kk number
Source:
Returns:
Type
function

<static> SE_Vx_kk(x, kk) → {function}

3xkk - SE Vx, kk
Skip next instruction if Vx = kk.

Parameters:
Name Type Description
x number
kk number
Source:
Returns:
Type
function

<static> SE_Vx_Vy(x, y) → {function}

5xy0 - SE Vx, Vy
Skip next instruction if Vx = Vy.

Parameters:
Name Type Description
x number
y number
Source:
Returns:
Type
function

<static> SHL_Vx_Vy(x, y) → {function}

8xyE - SHL Vx, Vy
Set Vx = Vy SHL 1. If shift quirks enabled Vx = Vx SHL 1. If the most-significant bit of shifted value is 1, then VF is set to 1, otherwise to 0.

Parameters:
Name Type Description
x number
y number
Source:
Returns:
Type
function

<static> SHR_Vx_Vy(x, y) → {function}

8xy6 - SHR Vx, Vy
Set Vx = Vy SHR 1. If shift quirks enabled Vx = Vx SHR 1. If the least-significant bit of shifted value is 1, then VF is set to 1, otherwise 0.

Parameters:
Name Type Description
x number
y number
Source:
Returns:
Type
function

<static> SKNP_Vx(x) → {function}

ExA1 - SKNP Vx
Skip next instruction if key with the value of Vx is not pressed.

Parameters:
Name Type Description
x number
Source:
Returns:
Type
function

<static> SKP_Vx(x) → {function}

Ex9E - SKP Vx
Skip next instruction if key with the value of Vx is pressed.

Parameters:
Name Type Description
x number
Source:
Returns:
Type
function

<static> SNE_Vx_kk(x, kk) → {function}

4xkk - SNE Vx, kk
Skip next instruction if Vx != kk.

Parameters:
Name Type Description
x number
kk number
Source:
Returns:
Type
function

<static> SNE_Vx_Vy(x, y) → {function}

9xy0 - SNE Vx, Vy
Skip next instruction if Vx != Vy.

Parameters:
Name Type Description
x number
y number
Source:
Returns:
Type
function

<static> SUB_Vx_Vy(x, y) → {function}

8xy5 - SUB Vx, Vy
Set Vx = Vx - Vy, set VF = NOT borrow.

Parameters:
Name Type Description
x number
y number
Source:
Returns:
Type
function

<static> SUBN_Vx_Vy(x, y) → {function}

8xy7 - SUBN Vx, Vy
Set Vx = Vy - Vx, set VF = NOT borrow.

Parameters:
Name Type Description
x number
y number
Source:
Returns:
Type
function

<static> SYS() → {function}

0nnn - SYS addr
Jump to a machine code routine at nnn. This instruction is only used on the old computers on which Chip-8 was originally implemented. It is ignored by modern interpreters.

Source:
Returns:
Type
function

<static> XOR_Vx_Vy(x, y) → {function}

8xy3 - XOR Vx, Vy
Set Vx = Vx XOR Vy.

Parameters:
Name Type Description
x number
y number
Source:
Returns:
Type
function