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

 

 

 

 

 

 

 

 

 

 

 

 

CARDTRAN

Information

Pseudo CARDTRAN command syntax described here is likely the first ever pseudo language developed for an 1802 like system. It runs on a FRED1 which uses the SYSTEM 00 prototype CPU which is a simplified 1801.

TV Display is divided in 3 areas, TV(0) and TV(1) which can be used by the CARDTRAN program and TV(2) which is used by the interpreter:

TV(0)  TV(1)
TV(2)

CONTROL codes

F0 Load program mode @ M[200]. Cardtran interpreter will wait for for a 4 digit word which will be stored at location M[200] next word at M[202] etc. TV(2) position will show the 4 digit instruction after 4 digits are received.
F1 Execute CARDTRAN program at M[200]
F2 Input aa, DDDD after which DDDD is stored at M[2aa]
F3 Show value of DR on TV(2) display position
F4 Input aa after which 4 digit word stored on M[2aa] is shown on TV(2) display position
F5 Halt execution (except 70/71)
F6 Resume execution
F7 Execute next instruction only

Example CARDTRAN code

This program (included in the cardtran.bin file) will wait for two four digit numbers, when the numbers are given it will multiply them and show a counter counting up to the result. At the end it will wait for two new numbers. If no input is given I think some random numbers are chosen.

Definitions

aa 2 digits hexadecimal value. This is used to indicate an address in hexadecimal range of 0200-02C7. Note that the original CARDTRAN code uses a 2 digit decimal value to indicate a decimal 'line' number referring to the 0200-02C7 address range by multiplying the value aa with 2 and adding hexadecimal value of 200
DR 4 digits decimal register for use in CARDTRAN program. Value is stored on address 02E0/02E1.
. Not used, value doesn't matter
1..9 Decimal digits

Syntax

Opcode Mnemonic Parameter Definition
40aa ADD [2aa], DR
2aa, DR
M[2aa] + DR -> M[2aa], 000C -> DR
70aa DISP0 [2aa]
2aa
Display word on M[2aa] on TV(0) display position
71aa DISP1 [2aa]
2aa
Display word on M[2aa] on TV(1) display position
10aa INPUT [2aa]
2aa
Wait for 4 digit word input and store word -> M[2aa]
22aa JNZ 2aa
DR, 2aa
Jump to 2aa if DR != 0
20aa JP 2aa JumP to 2aa
21aa JZ 2aa
DR, 2aa
Jump to 2aa if DR = 0
60aa LD [2aa], DR
2aa, DR
DR -> M[2aa]
30aa LD DR, [2aa]
DR, 2aa
M[2aa] -> DR
90aa LDD [2aa], DR
2aa, DR
LSD of DR -> LSD of M[2aa]
0... SKIP Skip
50aa SUB [2aa], DR
2aa, DR
M[2aa] - DR -> M[2aa], 000B -> DR
80aa RSH [2aa]
2aa
Ring SHift M[2aa] right 1 digit