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

 

 

 

 

 

 

 

 

 

 

 

 

FEL-1

Information

FEL-1 = Fred II Experimental Language, version 1.

The FEL-1 Pseudo command syntax described here is used in the 'Fred demo' running on the FRED 2.

Definitions

aaa 12 bit address
kk 8 bit constant
l 4 bit constant
n 4 bit constant
x Register number Vx (x = 0 to F)
y Register number Vy (y = 0 to F)
z Register number Vz (y = 0 to F)
[8aa] Memory value of address aa within page 8 (RAM)
[Vy] Memory value of address in register Vy within in page 8 (RAM)
F= Tone frequency
. Not used, value doesn't matter
1..9, A..F Hexadecimal digits

Syntax

Opcode Mnemonic Parameter Definition
5xkk 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
1aaa CALL aaa Call subroutine at aaa. The subroutine must end in 026E (which is the 'FEL-1' equivalent of RETURN)
0078 CLS Clear display
7x4B DELAY Vx Vx Delay (Tape On, Speaker off)
9xyl DRW Vx, Vy, l Draw pattern, x = pattern address in page 3, y = tv cell address, l number of lines
7F6F INCA RA = RA + 1
Ex8D INP6 Vx Vx = INP 6
Faaa JP aaa Jump to address aaa
0268 KEY OFF Switch hex keypad off
Ex7A KEY Vx Wait for key press and return in Vx
7x52 LD B, [RA], Vx
B, [A], Vx
Convert Vx to 3 digit decimal at A, A+1, A+2
Aaaa LD RA, aaa
A, aaa
RA = aaa
Baaa LD RB, aaa
B, aaa
RB = aaa
7x2A LD RA.0, Vx
A.0, Vx
RA.0 = Vx
7x30 LD RA.1, Vx
A.1, Vx
RA.1 = Vx
7x34 LD RB.0, Vx
B.0, Vx
RB.0 = Vx
2xkk LD Vx, kk Vx = kk
7x38 LD Vx, RA.0
Vx, A.0
Vx = RA.0
7x3B LD Vx, RA.1
Vx, A.1
Vx = RA.1
7x1E LD Vx, [RA]
Vx, [A]
Vx = [RA]
7x21 LD Vx, [RB]
Vx, [B]
Vx = [RB]
7x24 LD [RA], Vx
[A], Vx
[RA] = Vx
7x27 LD [RB], Vx
[B], Vx
[RB] = Vx
8xy1 OR Vx, Vy Vx = Vx OR Vy
Ex91 OUT4 Vx OUT 4 with Vx
Ex8F OUT6 Vx OUT 6 with Vx
022F PUSH Push V0-VF, A, B to 01E0-EF, F0-F3
026E RETURN Return from subroutine CALL
4xkk RND Vx, kk Vx = random AND kk
8xy6 SHR Vx, Vy Vx = Vy SHR, V0 is carry / not borrow
7x3E SHL4 Vx Vx = Vx SHL 4
7x41 SHR4 Vx Vx = Vx SHR 4
E.8A SK3 Skip next instruction if EF3 = 1
Ex80 SKP Vx Read key if available if not skip next instruction
E.87 SKT Skip next instruction if tape is stopped
3xkk SNE Vx, kk Skip next instruction if Vx != kk
Cxy0 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)
6.kk TAPE kk Tape Controller - kk = code to write
E.93 TAPE READ Read tape to [RA] and onwards
E.A0 TAPE WRITE Write to tape from [RA] to 06FF
Dxy0 TONE Vx, Vy Vx Tone, Vy Delay (Tape on speaker off)
025C VIDEO ON Video display enabled
0240 VIDEO OFF Video display disabled
8xy3 XOR Vx, Vy Vx = Vx XOR Vy