EMMA 02

PSEUDO CODE

  • Home
  • Download
  • Change Log
  • Help
  • Compilation
    • Windows
    • OS X
    • Ubuntu
    • Fedora
    • openSUSE
  • Forums
  • Tape Conversion
  • Machine Code
    • SYSTEM00
    • CDP1801
    • CDP1802
    • CDP1804
    • CDP1805
    • Differences
  • Pseudo Code
    • AMVBAS
    • AM4KBAS
    • CARDTRAN
    • Chip-8, 8X, ETI-660 & Elf
    • FEL-1
    • FPA-1
    • FPL-2
    • FPL-4
    • GPL-2
    • GPL-3
    • GPL-4
    • GPL-A (2K RAM)
    • GPL-A (2K ROM)
    • ST2
    • ST4
    • STK
    • Test-Word
    • Super-chip
  • XML Code
    • Main Elements
    • I/O
    • System
    • A/D Convertor
    • BASIC
    • Batch wav
    • Bootstrap
    • Cassette
    • CD4536B
    • CDP1851
    • CDP1852
    • CDP1854
    • CDP1855
    • CDP1877
    • CDP1878
    • CDP1879
    • Debugger
    • COMX Diagnostic
    • Dip switch
    • Disk
    • EF Buttons
    • Flip Flop
    • Front Panel
    • GUI
    • HEX Modem
    • I/O Group
    • Keyboard
    • Keyfile
    • Locations
    • Memory
    • MM57109
    • Printer
    • RTC
    • Sound
    • Splash
    • USB
    • Video
    • Videodump
    • vt
    • X Modem
  • 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
  • Computer List

 

 

 

 

 

 

 

 

 

 

 

 

Test-Word

Information

Test-Word can be used on a VIP with printer output and a keyboard as input.

V0-F are stored on memory locations 0FD0.

Definitions

aaa 12 bit address
kk 8 bit constant
x Register number Vx (x = 0 to F)
y Register number Vy (y = 0 to F)
[aaa] Memory value of address aaa
. Not used, value doesn't matter
1..9, A..F Hexadecimal digits

Syntax

Opcode Mnemonic Parameter Definition
7xkk ADD Vx, kk Vx = Vx + kk
8xy4 ADD Vx, Vy Vx = Vx + Vy, V0 is carry / not borrow
8xy2 AND Vx, Vy Vx = Vx AND Vy
2aaa CALL aaa Call subroutine at aaa. The subroutine must end in 00A7 (which is the 'Test-Word' equivalent of RETURN)
Bx.. INP WORD Input word (ASCII text until space / 0x20) from keyboard and store at address with high byte from 300+Vx and low byte from 380+Vx
1aaa JP aaa Jump to address aaa
Aaaa LD RA, aaa
A, aaa
RA = aaa
6xkk LD Vk, kk Vx = kk
8xy0 LD Vy, Vx Vy = Vx
Fx00 LD [RA], Vx
[A], Vx
[RA] = Vx, RA = RA + 1
Fxkk LD [RA], kk
[A], kk
[RA] = kk, RA = RA + 1
8xy1 OR Vx, Vy Vx = Vx OR Vy
D.kk PRINT kk Send byte kk to the printer
Dx00 PRINT WORD Print word (ASCII text until space / 0x20) from address with high byte from 300+Vx and low byte from 380+Vx
Eaaa PRINT WORDS Print words from pointers stored at address aaa, stopping at code 0xff. Words (ASCII text until space / 0x20) are stored at address with high byte from 300+pointer and low byte from 380+pointer
00A7 RETURN Return from subroutine
Cxkk RND Vx, kk Vx = random AND kk
8xy6 SHR Vx, Vy Vx = Vy SHR, V0 is carry / not borrow
3xkk SE Vx, kk Skip next instruction if Vx = kk
5xy. SE Vx, Vy Skip next instruction if Vx = Vy
4xkk SNE Vx, kk Skip next instruction if Vx != kk
9xy. SNE Vx, Vy Skip next instruction if Vx != Vy
8xy5 SUB Vx, Vy Vx = Vx - Vy, V0 is carry / not borrow
8xy7 SUBN Vx, Vy Vx = Vy - Vx, V0 is carry / not borrow
0aaa SYS aaa Call CDP1801 code at aaa. The subroutine must end in a RET (D4)
8xy3 XOR Vx, Vy Vx = Vx XOR Vy