EMMA 02

PSEUDO CODE

  • Home
  • Download
  • Change Log
  • Compilation
    • Windows
    • OS X
    • Linux
  • Forums
  • Tape Conversion
  • Machine Code
    • SYSTEM00
    • CDP1801
    • CDP1802
    • CDP1804
    • CDP1805
    • Differences
  • Pseudo Code
    • CARDTRAN
    • FPA-1
    • FPL-2
    • FPL-4
    • GPL-A (2K RAM)
    • GPL-A (2K ROM)
    • GPL-2
    • GPL-3
    • GPL-4
    • FEL-1
    • STK
    • Test-Word
    • ST2
    • ST4
    • Chip-8, 8X and ETI-660
  • BASIC
    • General Information
    • COMX BASIC V1.00
    • Floating Point BASIC 2.2
    • Pecom 32 BASIC
    • Pecom 64 BASIC 1.0 & 4.0
    • Quest Super BASIC 1.4
    • Quest Super BASIC 3.0
    • Quest Super BASIC 5.0
    • Quest Super BASIC 6.0
    • RCA BASIC3 V1.1
    • Telmac SBASIC v24.3
    • Error Messages
  • COMX-35
    • General Information
    • F&M
    • Did You Know...?
    • I/O Map
    • Memory
    • Video
    • Sound
    • Keyboard
    • Cassette
    • Expansion Box
    • Disk
    • Printers
    • Thermal
    • PL-80
    • 32K RAM
    • 80 Column
    • F&M EPROM
    • F&M Joy Card
    • Super Board
    • COMX BASIC V1.00
  • Cosmac Elf 2000
    • General Information
    • I/O Map
    • Memory
    • Video
  • Cosmicos
    • General Information
    • I/O Map
  • Cosmac Elf
    • General Information
    • I/O Map
  • Netronics Elf II
    • General Information
    • I/O Map
    • Keyboard
  • Quest Super Elf
    • General Information
    • I/O Map
  • Membership Card
    • General Information
    • I/O Map
  • VIP2K MC
    • General Information
    • I/O Map
    • Memory
    • Video
    • Chip 8
  • VELF
    • General Information
    • I/O Map
    • BIOS
    • Video
    • Keyboard
  • FRED 1
    • General Information
    • I/O Map
    • Cassette
    • CARDTRAN Syntax
  • FRED 2
    • General Information
    • I/O Map
    • Cassette
    • FPL-2
    • FPL-4
    • FEL-1
  • Microtutor
    • General Information
    • I/O Map
  • Cosmac Vip
    • General Information
    • I/O Map
    • Memory
    • Video
    • Sound
    • Keyboard
    • Cassette
    • STK
    • Chip-8 and 8X
    • Test-Word
    • Floating Point BASIC 2.2
  • Cosmac Vip II
    • General Information
    • I/O Map
    • Floating Point BASIC 2.2
  • MCDS
    • General Information
    • I/O Map
  • MS2000
    • General Information
    • I/O Map
  • RCA Coin Arcade
    • General Information
    • I/O Map
    • Memory
    • GPL-A (2K RAM)
    • GPL-A (2K ROM)
    • GPL-2
    • GPL-3
    • GPL-4
  • RCA Studio II
    • General Information
    • I/O Map
    • Memory
    • Video
    • Keyboard
    • ST2
  • RCA Studio IV
    • General Information
    • I/O Map
    • Memory
    • Video
    • Keyboard
    • ST4 Syntax
  • Visicom COM-100
    • General Information
    • I/O Map
    • Memory
    • Video
    • Keyboard
  • Victory MPT-02
    • General Information
    • I/O Map
    • Memory
    • Video
    • Keyboard
  • Cidelsa
    • General Information
    • I/O Map
    • Memory
    • Video
    • Sound
  • Telmac TMC-600
    • General Information
    • Software
    • I/O Map
    • Memory
    • Video
    • Sound
    • Keyboard
    • Cassette
    • Telmac SBASIC v24.3
  • Telmac 1800
    • General Information
    • I/O Map
    • Memory
    • Video
    • Keyboard
    • Cassette
  • Telmac 2000
    • General Information
    • I/O Map
    • Memory
    • Video
    • Sound
    • Keyboard
    • Cassette
  • Oscom Nano
    • General Information
    • I/O Map
    • Memory
    • Video
    • Sound
    • Keyboard
    • Casette
  • Pecom 32 and 64
    • General Information
    • Software
    • I/O Map
    • Memory
    • Video
    • Sound
    • Keyboard
    • Casette
    • Pecom 32 BASIC
    • Pecom 64 BASIC 1.0 & 4.0
  • ETI 660
    • General Information
    • I/O Map
    • Memory
    • Video
    • Sound
    • Keyboard
    • Cassette
    • Chip-8 ETI-660

 

 

 

 

 

 

 

 

 

 

 

 

Chip-8, 8X and ETI

Definitions

aaa 12 bit address
kk 8 bit constant
n 4 bit constant
x Register number Vx (x = 0 to F)
y Register number Vy (y = 0 to F)
I Register I (12 bit)
[I] Memory value of address in register I
NH Bit 0-3 Horizontal Location
Bit 4-7, Horizontal width
NV Bit 0-3 Vertical Location
Bit 4-7, Vertical height
1..9, A..F Hexadecimal digits

Chip-8 Syntax

Opcode Mnemonic Parameter Definition
Fx1E ADD I, Vx I = I + Vx
7xkk ADD Vx, kk Vx = Vx + kk
8xy4 ADD Vx, Vy Vx = Vx + Vy, VF = carry
8xy2 AND Vx, Vy Vx = Vx AND Vy, VF undefined
2aaa CALL aaa Call subroutine at aaa (16 levels)
00E0 CLS Clear display
Dxyn DRW Vx, Vy, n Draw n byte sprite stored at [I] at Vx, Vy. Set VF = collision
1aaa JP aaa Jump to address aaa
Baaa JP V0, aaa Jump to address aaa + V0
Fx33 LD B, Vx Store BCD value of Vx in [I], [I+1], [I+2]
Fx15 LD DT, Vx Delaytimer = Vx
Fx29 LD F, Vx Point I to 5 byte numeric sprite for value in Vx
Aaaa LD I, aaa I = aaa
Fx18 LD ST, Vx Soundtimer = Vx
Fx07 LD Vx, DT Vx = Delaytimer
Fx0A LD Vx, K Vx = key, wait for keypress
6xkk LD Vx, kk Vx = kk
8xy0 LD Vx, Vy Vx = Vy, VF undefined
Fx65 LD Vx, [I] Read V0 .. Vx from [I] .. [I+x]
Fx55 LD [I], Vx Store V0 .. Vx in [I] .. [I+x]
8xy1 OR Vx, Vy Vx = Vx OR Vy, VF undefined
00EE RETURN Return from subroutine (16 levels)
Cxkk RND Vx , kk Vx = random AND kk
3xkk SE Vx , kk Skip next instruction if Vx == kk
5xy0 SE Vx , Vy Skip next instruction if Vx == Vy
8xxE SHL Vx Vx = Vx << 1, VF = carry
8xyE SHL Vx , Vy Vx = Vy << 1, VF = carry
8xx6 SHR Vx Vx = Vx >> 1, VF = carry
8xy6 SHR Vx , Vy Vx = Vy >> 1, VF = carry
Ex9E SKP Vx Skip next instruction if key Vx down
ExA1 SKNP Vx Skip next instruction if key Vx up
4xkk SNE Vx, kk Skip next instruction if Vx != kk
9xy0 SNE Vx, Vy Skip next instruction if Vx != Vy
8xy5 SUB Vx, Vy Vx = Vx - Vy, VF = !borrow
8xy7 SUBN Vx, Vy Vx = Vy - Vx, VF = !borrow
0aaa SYS aaa Call CDP1802 code at aaa
8xy3 XOR Vx, Vy Vx = Vx XOR Vy, VF undefined

Chip-8X Syntax

All of the instruction from Chip-8, except 'Baaa: JP V0, aaa' are valid for Chip-8X. Chip-8X offers the following additional instructions:

Opcode Mnemonic Parameter Definition
5xy1 ADD8 Vx, Vy Vx = Vx + Vy (hex digits 00 to 77, mainly for manipulating the NH and NV parameters)
02A0 CLR B
BACK
Step background 1 colour (-> blue, -> black, -> green, -> red ->)
Bxy0 CLR
CLRL
Vx, Vy
Vx/Vz, Vy
Set Vy colour @ Vx (NH), Vz (Vz has to be V(x+1)) (NV)
Bxyn CLR
CLRH
Vx, Vy, n
Vx/Vz, Vy, n
Set Vy colour @ Vx, Vz (Vz has to be V(x+1)) byte, n bytes vertically, n != 0
FxFB INP1 Vx Input port 1 to Vx (waits for EF4=1)
FxF8 OUT3 Vx Vx to output port 3 (used for simple sound)
ExF2 SKP2 Vx Skip next instruction if key Vx on keypad 2 is down
ExF5 SKNP2 Vx Skip next instruction if key Vx on keypad 2 is up

ETI-660 Chip-8 Syntax

All of the instruction from Chip-8 are valid for the TI-660 Chip-8 variant. ETI-660 Chip-8 offers the following additional instruction:

Opcode Mnemonic Parameter Definition
Fx00 LD P, Vx Set the pitch (frequency) of the tone generator (beeper) to Vx