Copyleft HUMONGOUS CP/M Archives
При поддержке журналаRadio Magazine
RU | EN

CRISS CP/M

CRISS CP/M programmer's reference

CRISS CP/M programming icon

A computer is alive when programs are written on it. CRISS CP/M has all the necessary interfaces and features, and a wide set of development tools: Basic, C, Pascal, Fortran, Modula, that will allow you to do almost anything you can imagine. To write programs it is desirable to know the basic principles of the CP/M operating system, which are not included in this manual, please use special literature.

If you have any questions, miss something in the description, notice a mistake or a typo, have suggestions for extending the standard functions - write to mail@ogss.ru.

This section is expanding by the requests: just write an email "Please describe how to work with ..." and it will appear in few days, be sure!

Introduction

CRISS CP/M is a general-purpose personal computer, having compatible with Z80 Zilog processor instructions set and supporting CP/M operation system. Despite it is DIY computer and it can be soldered by anyone it has all interfaces that allow to use it like real computer. It is powered by 64Kb SRAM, Z80-compatible CPU with 1 us register-to-register transfer time, supports VGA displays in alphanumeric mode and standard PS/2 keyboard. Optionally it can be powered by real-time clock chip, RS-232 converter, Ethernet controller, 128 Kb EEPROM chip.

Architecture

To program efficiently please pay attention to the computer architecture, it will help to understand internal processes and avoid problems.

Functional description

First of all please take into account that CRISS CP/M has not CPU chip - CPU is emulated using the microcntroller IC. The same is concerning peripheral and VGA controllers - in fact they are also MCU with the custom firmware. So, when some feature is called "hardware" it means that functionality is implemented into the firmware, when is written "software" it means that functionality is implemented in the user program, that operates in the emulated CPU environment.

All computer components are joined via the internal SPI-bus, that operates at 5MHz except the SRAM that has direct parallel connection to the CPU MCU.

1 General structure of the computer

Formally computer for the end-user looks like having the von Neumann architecture, program instructions and data are located in the read/write random-access memory. But core MCUs have Harvard architecture what means that there is no way to modify its firmware "on the fly". All significant data like CPU instructions processing, keyboard layouts, video symbol sets etc are programmed inside the MCUs and can be changed only via special firmware upgrade procedure.

To access peripheral devices CRISS CP/M provides wide range of hardware options, but user programs can also use low-level direct access to the SPI bus. This feature is implemented mainly in order to have transparent way for the adding custom SPI modules and it is not recommended to use it without real necessity.

The second exception is the system UART interface that is served by the CPU MCU and this interface is used for the debugging and remote control options.

CPU instructions

Instructions set is based on the Zilog Z80 CPU set but isn't 100% equivalent to it. Main differences are:

  • flags 3 and 5 are not supported and returns 0;
  • R registers doesn't count operation cycles rather that it is internal timer, 7th bit preserving rule is supported;
  • undocumented commands are implemented partially;
  • new commands were added.

Generally Z80 emulations passes Z80 instruction exerciser test and provides reliable compatibility for majority of general programs. But if the program extensively uses Z80 undocumented options its work is not guaranteed.

In comparison with standard Z80 assembler CRISS CP/M has some additional commands (mainly ED-prefixed):

  • integer MUL and DIV;
  • 4-byte floating point SUM, SUB, MUL and DIV commands (FL32 0 - FL32 3 );
  • BIOS/BDOS command calls (BIOS *).

For the full list of supported commands please refer to the Appendix.

If you need more details or you have any ideas what to do else please write the request by e-mail.

8-bit compliance

Usually retro-style computers have 7 bit restriction processing text data, because initially they were focused on ASCII character table that have only 128 symbols. CRISS CP/M doesn't have such limitation and can normally process 8 bit texts if software allow that.

For now 7th bit problem is solved for:

  • BIOS/BDOS - limitation removed;
  • programming: please use BBC Basic, C, patched Turbo pascal, etc;
  • text processing: Express editor and Superwriter text processor doesn't have 7th bit restrictions.

Full 256 chars local keyboards and character sets are supported.

Interrupts

CRISS CP/M has special IRQ processing system that is compatible with Z80 IRQ modes but with some peculiarities that should be noted:

  • IRQ vectors must be set in advance in system console;
  • there are several IRQ enabling settings that should be set in user program before enabling interrupts;
  • Z80 IRQ mode 0 allows only 1-byte instructions.

Interrupt processing routines are still under development and may have some bugs.

BIOS and BDOS

The most advantage feature of CRISS CP/M computer is that all BIOS, BDOS and CCP procedures are supposed to be written on the level of CPU MCU firmware that would give unbelievable 60 Kb TPA, great performance and "native" communication with modern technologies.

Currently OS CPM 2.2 is 100% handles by the AVR code, next step will be CPM 3.0 support. All functions support CRISS CP/M hardware. For the user programs standard method af BIOS calls is used.

FunctionNameFeatures/ EnhancementsLocationDate
0BOOTCold start, returns to CCPFWMarch 2021
1WBOOTWarm start, returns to CCPFWMarch 2021
2CONSTConsole statusFWMarch 2021
3 CONINConsole input - can be mapped to UART, LPT or LAN channels for remote control FWMarch 2021
4CONOUTConsole output - can be mapped to UART, LPT or LAN channels for remote controlFWMarch 2021
5LISTPrinter output - can be mapped to UART, LPT or LAN channelsFWMarch 2021
6PUNCHUser device output - can be mapped to UART, LPT or LAN channels, may be used for LAN communication between two CRISS CP/M computersFWMarch 2021
7READERUser devise input - can be mapped to UART, LPT or LAN channels, may be used for LAN communication between two CRISS CP/M computers FWMarch 2021
8HOMEHome FDD - does nothingFWMarch 2021
9SELDSKSelect disk FWMarch 2021
10SETTRKSet track FWMarch 2021
11SETSEKSet sector FWMarch 2021
12SETDMASet DMA buffer address FWMarch 2021
13READRead 128b sector - can be mapped to UART, LPT or LAN channels FWMarch 2021
14WRITEWrite 128b sector - can be mapped to UART, LPT or LAN channelsFWMarch 2021
15LISTSTPrinter status - can be mapped to UART, LPT or LAN channels and may be used to read data from RS-232 LPT channelFWMarch 2021
16SECTRANSector translation - does nothingFWMarch 2021

BIOS code level also is responsible for the hardware terminal emulation: console and printer i/o routines call special hardware compatibility firmware library.

After the BIOS next step is to move BDOS on the AVR level, Work is in progress, it is not so clear how to implement CP/M filesystem behavior because many programs use internal data structures directly. Coming soon, hope that it will be done till the end of 2021.

I/O ports

CRISS CP/M has powerful extended I/O port structure. There are four groups of ports:

  • ports 0x00-0xCF are handled by the hardware compatibility layer;
  • ports 0xD0-0xF3 are responsible for operation with the peripheral controller;
  • ports 0xF4-0xFD handles working with the internal databanks (more details in Memory section);
  • ports 0xFE and 0xFF are special control ports, which are responsible for external devices and software controllers.

The first group is responsible for the correct port emulation: having received a request for an operation with this port interval, the handler causes the function of the hardware compatibility unit, which performs the appropriate actions. For example, in Robotron 1715, after reading the keyboard via BIOS call, an input command was performed from port 12 to read the key code.

Peripheral controller I/O ports allow to work with keyboard, VGA video adapter, melody generator, GPIO, RS-232. For the full list of I/O ports please refer to the Appendix.

Other ports will described in "Peripheral" section, please send requests if you need more information.

Memory structure

Memory overview

Please write request to prepare this section!

Basic memory

Please write request to prepare this section!

Memory banks

Please write request to prepare this section!

Video memory

Please write request to prepare this section!

EEPROMs

Please write request to prepare this section!

Programming

Programing languages

CRISS CP/M supports a wide range of programing languages available for CPM 2.2 system. Please download them from the CRISS CP/M support web-site. All programs have detailed manuals in the archive. When downloading please note hardware platform and known problems/restrictions also concerning 7th bit problem.

Usually programming has no special requirements. If there is no inbuilt text editor it is advised to use Express text editor that can be downloaded from the support site.

If your CRISS CP/M is powered by the EEPROM chip it is possible to keep 2 user sessions with the editor and compiler but please use different drives for program texts and compilation.

Console output

For the output please use standard functions of the programing language. To control the output there are set of control codes and ESC-sequences, i.e. sequence of chars started with ESC (27 dec or 1B hex) char.

Console control characters:

DECHEX MnemonicОписаниеDescriptionСтандарт/Standard
#10x01^AHOMEустановка курсора в позицию 1,1 locate cursor to home position top left cornerTerminal
#70x07^GBELLсистемный звуковой сигнал system beepTerminal
#80x08^HCURLEFTперемещение курсора на символ влево move cursor 1 char leftTerminal
#90x09^ITABустановка курсора в следующую позицию табуляции move cursor to next tab positionTerminal
#100x0a^JLFперемещение курсора на следующую строку move cursor to next line, line feedTerminal
#120x0c^LCLRSCRочистка экрана и установка курсора в позицию 1,1 clear screen and home cursor Terminal
#130x0d^MCR установка курсора в начало текущей строки locate cursor to the 1st column, carriage returnTerminal
#140x0e^NSCROLLOFFзапрет скроллинга disable screen scrollingRobotron 1715
#150x0f^OSCROLLONразрешение сколлинга экрана enable screen scrollingRobotron 1715
#200x14^TCLRCURстирание с позиции курсора до конца экрана clear screen from the cursor to end of the screen Terminal
#210x15^UCURRIGHTперемещение курсора на 1 позицию вправо move cursor 1 char right Terminal
#220x16^VCLREOLстирание с позиции курсора до конца строки clear from the cursor to the end of lineTerminal
#240x18^XCLRLNстирание строки clear lineTerminal
#260x1a^ZCURUPперемещение курсора на 1 позицию вверх move cursor 1 char upтерм.
#270x1bESCуправляющий код ESC ESC control charTerminal
#300x1eCUROFFвыключение курсора cursor offCRISS
#310x1fCURONвключение курсора cursor onCRISS

Supported ESC-sequences in text mode:

ESC-seqОписаниеDescriptioStandardFW
#27 0выключение курсораcursor offCRISS
#27 1включение курсораcursor on CRISS
#27 \ chr(n)вывод на экран символа chr(n) для рисования символов #1..#31output symbol with code nCRISS
#27 #9 chr(x)установить курсор в столбец xset cursor to column xCRISS
#27 Z chr(x)установка видережима, биты 0-4 - число строк, 7-5 - таблица ЗГ (со стиранием экрана)set video mode: bits 0-4 contains lines number; 7-5 - codepageCRISS
#27 chr(127+y) chr(127+x)установка курсора в позицию x,yset cursor to pos x,yRobotron 1715
#27 ^ *игнорируетсяignoredRobotron 1715
#27 _ *игнорируетсяignoredRobotron 1715
#27 = chr(31+y) chr(31+x)установка курсора в позицию x,yset cursor to pos x,yKAYPRO
#27 B 4выключение курсораcursor offKAYPRO
#27 C 4включение курсораcursor onKAYPRO
#27 B 6запомнить текущее положение курсораstore cursor positionKAYPRO
#27 C 6восстановить положение курсораrestore cursor positionKAYPRO
#27 RУдалить строкуremove lineKAYPRO
#27 EВставить строкуinsert lineKAYPRO
#27 Y chr(y+1) chr(x+1)установка курсора в позицию x,yset cursor to pos x,yTRS-80
#27 Hустановка курсора в позицию 1,1set cursor to home pos 1,1TRS-80
#27 Jочистка экрана от позиции курсора до конца экранаclear screen from the cursor to end of screenTRS-80
#27 Kочистка экрана от позиции курсора до конца строкиclear from the cursor to end of lineTRS-80
#27 jочистка экранаclear screenTRS-80

If CON IOBYTE is set to extended output options, all characters sent to the console will be also sent to printer, RS-232, UART, LAN etc. If you disable CON output to the monitor VGA output will be frozen.

Keyboard input

BIOS CRISS CP/M supports standard key processing with correct reporting of keyboard status etc. There is no input keyboard buffer and next key will replace previous one so it is responsibility of the programmer to read it. If allowed pressed key rises the interrupt state.

Key code corresponds to the layout table uploaded to the peripheral controller MCU, usually it is CP866 codepage. CRISS CP/M supports special keys as follow:

  • SHIFT - in a standard way
  • CAPS LOCK - in a standard way, the led indicates active state;
  • SCROLL LOCK - switch between default and local layout, the led indicates local layout active;
  • NUM LOCK - not supported and is read as ordinary key.

Functional keys are mapped to the char codes 1-31 as follows:

DECCTRLКлавиша / КeyDECCTRLКлавиша / KeyDECCTRLКлавиша / Key
0^@- 10^JF1 20^TCtrl-Del
1^ACtrl-(←) 11^KF2 21^UF9
2^BF6 12^LF7 22^VIns
3^CPgDn 13^MEnter (ET) 23^WEnd
4^D(→) 14^NF8 24^X(↓)
5^E(↑) 15^OF3 25^YF10
6^FCtrl-(→) 16^PF4 26^ZHome
7^GDel 17^QF5 27 - ESC
8^HЗабой (Backspace) 18^RPgUp 28 - F11
9^ITAB 19^S(←) 29 - F12
127Ctrl-Забой (Ctrl-Backspace)

NumLock key is not supported and numeric keypad always returns digits without SHIFT and behaves as arrows with SHIFT pressed.

When ALT and CTRL keys are pressed the numeric keypad returns pseudo-graphic characters for the frames: single line without SHIFT and double line with SHIFT.

NUM  /     *    -  
ET
Del

Reading the port 212 (0xD4) it is possible to get access to the real scan-code of the key and reading the port 211 (0xD3) the state of ALT, CTRL, SHIFT keys:

76543210
---ALTCAPSLOCKSCROLLOCKSHIFTCTRL

Scan codes generally corresponds to the PS/2 keyboard scan codes but are not equivalent.

000102030405060708090A0B0C0D0E0F
00 F9 F7 F5 F3 F1 F2 F12 F10 F8 F6 F4 TAB тильда
10 Alt LShift Ctrl Q 1! Z S A W 2@
20 C X D E 4$ 3# Space V F T R 5%
30 N B H G Y 6^ M J U 7& 8*
40 ,< K I O 0) 9( .> /? L ;: P -_
50 '" * { =+ CapsLock RShift Enter } END \ Left Home
60 INS DEL Down Right Up PgDown BSpace PgUp 1 4 7
70 0 KP. 2 5 6 8 ESC NUMLOCK F11 KP+ 3 KP- KP* 9 SCRLOCK

Please note that if CON IOBYTE maps input to other channels like LAN or UART, port value for the scan code is undefined.

Files I/O

Files I/O has now peculiarities, please follow your programing language manual.

Graphics and symbol pages

By default CRISS CP/M is an alphanumeric terminal, supporting VGA monitor output up to 25x80 monochrome characters, default mode is 24x80 characters. Terminal settings may limit lines number and width, but it will not affect physical resolution. Character block has 20x8 pixels for the 1..24 lines mode and 19x8 for the 25 lines mode. Cursor mark that can be switched on/off is supported. Due to hardware limitation the only cursor shape full character block is supported. Blinking rate 1Hz is preset and can not be tuned. Attributes are not implemented.

To output text to the screen there are three options:

  • using standard BDOS/BIOS CP/M functions, it is default way supporting special symbols and ESC-sequences, symbols are stored in the video RAM;
  • direct writing to video RAM that is located at address 0xF800 of general RAM area, in this case symbols will be represented exactly as they are in the character table;
  • direct output to the screen without storing symbols to the video RAM, it is useful for some special purposes.

Structure of console output is shown in the figure. Full process includes additional 2Kb RAM at the CPU AVR that is used to support attributes for correct hardware emulation. This area is not accessible from user programs.

Console output

CRISS CP/M supports 5 switchable code pages, please refer to the Appendix for more details.

Graphic

You can switch between sets:

  • using ESC control sequences;
  • writing CRT control port 208 (0xD0).

Structure of the CRT control port value:

76543210
LN4LN3LN2LN1LN0CP2CP1CP0
  • LN4..LN0 - number of lines 24/25
  • CP2..CP0 - code page from 0 t0 4

This port is R/W. Setting this port to zero sets monitor to the sleep mode.

From the VGA CPU firmware version 1.21+ code page 7 allows you to mix videmodes on one screen, in this mode line 25 must contain an array of code pages in the range 0..4 in its first 24 bytes.

Alternatively you can use ESC-sequences to switch between video-modes:

ESC-seqОписаниеDescriptioStandardFW
#27 G 0Выбор знакогенератора 0 и 24 строки с очисткой экранаselect standard symbols set 24 linesCRISS4.58
#27 G 1Выбор знакогенератора 2 и 24 строки с очисткой экранаselect symbols set 2 and 24 linesCRISS4.58
#27 G 2Выбор знакогенератора 3 и 24 строки с очисткой экранаselect symbols set 3 and 24 linesCRISS4.58
#27 G 3Выбор знакогенератора 4 с очисткой экранаselect symbols set 4 and 24 linesCRISS4.58
#27 G 4Переключение в графический режим с очисткой экранаselect graphic modeKAYPRO
#27 G 5Выбор знакогенератора 0 и 25 строк с очисткой экранаselect standard symbols set 25 linesCRISS4.58

CRISS CP/M supports basic graphic capabilities providing monochrome resolution 160x96 pixels, each pixel can be set/clear individually. Video memory for the graphic mode is the same as for text mode and located at address 0xF800.

In graphic mode CRISS CP/M provides some useful commands for graphic primitives that can be called via the ESC-sequences. Bresenham's algorithms are used.

ESC-seqОписаниеDescriptioStandardFW
#27 G 4включить графический режимGraphics modeKAYPRO
#27 G Nвключить текстовый режим 24x80Text mode 24x80KAYPRO
#27 * chr(y) chr(x)установка точки в графическом режимеPut pixelKAYPRO
#27 chr(32) chr(y) chr(x)стирание точки в графическом режимеClear pixelKAYPRO
#27 # chr(y) chr(x)инверсия точки в графическом режимеInvert the pixelCRISS
#27 L chr(y1) chr(x1) chr(y2) chr(x2)рисование линии в графическом режимеDraw lineKAYPRO
#27 D chr(y1) chr(x1) chr(y2) chr(x2)стирание линии в графическом режимеClear lineKAYPRO
#27 x chr(y1) chr(x1) chr(y2) chr(x2)инверсия линии в графическом режимеInvert the lineCRISS
#27 c chr(S) chr(y) chr(x) chr(R)рисование сегментов окружности (S)Draw circleCRISS

In addition to basic primitives there is special fie format *.cri that can be prepared in advance converting 160x96 b/w bmp file using special program for MS Windows. This format allows to load file directly to the video memory area and provides the fastest way to show image.

Using printers

Printer

OS CP/M supports printers via the special BIOS command LSTOUT. By default RS-232 interface is used and serial printer is assumed. CRISS CP/M provides full compatibility and some extended features like mapping LST channel to LAN, UART and support of LPT interface that is realized as special GPIO module.

Standard setting for the RS-232 interface are 9600 bod, 8 bit, no parity, 1 stop-bit. RS-232 interface contains only RX and TX lines, hardware flow control is not supported.

CRISS CP/M allows to use printer output channel flexibly by setting the LST IO byte in the system console or from the user's program. LST output can be redirected to:

  • LST - standard RS-232 channel/printer;
  • system UART;
  • LPT - GPIO LPT adapter assumed, LPT printers are partially supported;
  • LAN - all printer output is sent to the P-SERVER, that can be set in the system console, UDP 1-byte packets are used.

By default LST channel is checked. User program may change this settings, what allow to use LST function for other purposes.

LSTST BIOS function (LST status) returns real printer status if LPT adapter is used and 0xff (ready) in other cases.

Peripheral

This section describes how to communicate with the standard on-board peripheral. No program languages have been customized to work with CRISS CP/M peripheral so only low-level access is available. Probably partially this interaction will be simplified to ESC-sequences.

Melody generator

CRISS CP/M has on-board amplifier and single-tone melody generator that allows to play 16-notes melody asynchronously with the main program. If enabled end of melody rises the interrupt.

To use this feature there are 17 ports reserved: 16 ports for the notes and 1 control port.

Control port 214 (0xD6) accepts commands as follow:

76543210
PD2PD1PD0ND4ND3ND2ND1ND0
  • PD2..PD1 - pause between notes duration, may be from 0 to 6
  • ND2..PD1 - 1/8 note basic duration

When playing is finished reading from this port returns 0.

Notes to play are store in ports 224-239, value structure is the following:

76543210
NI4NI3NI2NI1NI0SPBDI1DI0
  • NI4..NI0 - tone index
  • SPB - when 1 forces pause suppressing
  • DI1..DI0 - note duration: 0 = 1/8, 1 = 1/4, 2 = 1/2, 3 = 1

There are two special values:

  • 0x04 - end of melody
  • 0x05 - repeat from the beginning.

Reference table for the tone indexes:

ИндексNI4..NI0Символьный кодЧастота, ГцНотаПримечание
00---Пауза
182-6880.00 AЛя второй октавы
2162-5/6830.60 G#Соль-диез второй октавы
3242-5784.00GСоль второй октавы
4322-4/5739.98F#Фа-диез второй октавы
5402-4698.46FФа второй октавы
6482-3659.26EМи второй октавы
7562-2/3622.26D#Ре-диез второй октавы
8642-2587.32DРе второй октавы
9722-1/2554.36C#До-диез второй октавы
10802-1523.25CДо второй октавы
11881-7493.88BСи первой октавы
12961-6/7466.16A#Ля-диез первой октавы
131041-6440.00AЛя первой октавы
141121-5/6415.30G#Соль-диез первой октавы
151201-5392.00GСоль первой октавы
161281-4/5369.99F#Фа-диез первой октавы
171361-4349.23FФа первой октавы
181441-3329.63EМи первой октавы
191521-2/3311.13D#Ре-диез первой октавы
201601-2293.66DРе первой октавы
211681-1/2277.18C#До-диез первой октавы
221761-1261.63CДо первой октавы
231840-7246.96BСи малой октавы
241920-6/7233.08A#Ля-диез малой октавы
252000-6220.00AЛя малой октавы
262080-5/6207.00G#Соль-диез малой октавы
272160-5196.00GСоль малой октавы
282240-4/5185.00F#Фа-диез малой октавы
292320-4174.62FФа малой октавы
302400-3164.81EМи малой октавы
312480-2/3155.56D#Ре-диез малой октавы
Code example

Plays short melody.

procedure music; const m:array[224..233] of byte = (121,145,106,122,161,137,145,161,178,4); var i:integer; begin for i:=224 to 233 do port[i]:=m[i]; port[214]:=10; end;

Mouse

This chapter is actual for CPD firmware 0.21+, CPU firmware 4.61+

CRISS CP/M supports standard PS/2 mouse in standard mode, wheel is not supported. Mouse has to be connected to the I2C lines: DATA = SDA, CLOCK = SCL. There is no way to use mouse and GPIO in the same time, but you can use them concurrently physically switching devices.

Mouse processing has the peculiarity that in contrast to other peripheral devices it is processed asynchronously. So, for example, when I2C GPIO chip is controlled, it doesn't affect other tools: timer, VGA output etc are working without delays. But mouse poll stops all other processes until the response or timeout will be detected. Usually it takes about 1ms for the normal procedure and approx 20ms if the request is cancelled with the timeout. For that time VGA output, sound control and timer stop, that may lead sometime to missing of the timer step. Please take it into account.

To use mouse in the user program you should do the following steps:

Init the mouse sending 0xe0 to port 215, wait at least 5ms and check port 215 for the value returned: 0 means that mouse is detected and successfully initialized, 1 means error condition, usually it means that no mouse is connected.

If mouse is detected it is signaled by the NumLock led (on).

To get mouse state you should send 0xe1 to port 215, wait at least 10ms and check port 215 for the value returned: 0 means that data was successfully read. In this case port 216 will contain buttons states:

76543210
1*Left*Middle*Right1LeftMiddleRight

where prefix * means previous state before the request. Ports 217, 218 will contain 8-bit signed X and Y shift movement since these ports were cleared, i.e. each poll changes these values to the accumulated shift from the previous request. You'll need to clear or correct data in ports 217, 218 to avoid overflow.

After the program need not more mouse interface it must send 0xe4 to port 215 that will release interface lines. NumLock led will be turned off, indicating that command has been accepted.

If you need perform hardware mouse reset send 0xe4 to port 215 and wait at least 1s for completion. This command returns immediately after sending "Reset mode" command and doesn't wait for the response.

Code example

begin port[215]:=$e0; delay(10); if port[216]<>0 then begin write('Error'); halt; end; port[216]:=0; repeat port[215]:=$e1; delay(10); if port[216] and 4 >0 then write('Left button pressed'); until port[216] and 1>0; port[215]:=$e4; end.

Timers

There are two system timers that can be used:

  • count-down 8-bit timer with 10ms step holding by peripheral MCU
  • incremental 8 bit timer holding by CPU MCU

To access count-down timer simply write any value to port 222 (0xDE) and read it until it comes to zero. If it is allowed an interrupt will occur.

Code example (waiting key for 1s):

port[222]:=100; repeat until (bios(1)<>0) or (port[222]=0);

The second timer is accessed via the system memory block by writing 86 (dec) to port 0xF6 and than reading from the port 0xF7. This timer is incremented each 10 ms. You can reset this timer writing any value to port 0xF7 (after writing 86 (dec) to port 0xF6) but it not advised because resident programs may use it. Better to use count-down described above.

GPIO

CRISS CP/M supports external GPIO module built using PCF8574(A) IMCs via I2C SCL and SDA lines that are available via external MPS connector. These lines can be used in several ways:

  • external custom user's I2C GPIO module up to 128 lines connection;
  • external display/keyboard module based on TM1637 chip connection;
  • PS/2 mice connection;
  • connection of LPT module that also can be used as 24-lines GPIO block.

Typical GPIO module has the structure like following:

GPIO module cirquit

In the user's program there are two ports responsible for the standard GPIO block control:

  • 0xD7 (215) - control port;
  • 0xD8 (216) - data port.

If you want to send/read data to/from your GPIO chip, you need out command to the control block:

! где {$\Delta H_{c}$} -- теплота сгорания полимера, {$c_{p}$} -- удельная теплоёмкость полимера, {$\Delta H_{e}$} -- эффективная энтальпия газификации, {$r$} -- стехиометрическое соотношение кислорода и горючего, {$Y_{ox}$} -- относительная массовая концентрация окислителя в окружающей среде.

where C3-C0 is the I2C chip code equal 0100 for PCF8574 and 0111 for PCF8574A, A2-A0 is the slave address (see the datasheet for more details) and RW is access mode: 0 for write and 1 for read.

Data port responds request data.

So, if you need to write data to GPIO module having PCF8574 chip with slave address 000 (all three pins A* are connected to ground) you have to write data to be set to data port 0xD8 and then write control port 0xD7 with the command 01000000, it will start command execution. Read control port until it will return to 0 that means success or 1 what means error condition, data port will contain the error code.

Writing the code 01000001 (RW=1) will cause read operation from the chip, after the completion data port will contain read value.

Standard CRISS CP/M LPT module when is used in GPIO mode has three PCF8574A chips with slave code 0, 1 and 2 and can be controlled in the standard way.

When working with PCF8574 chips approximate time to change it state is 250us, simple code written in Pascal generating the pulse on one pin gives approximately 350us pulse duration. Using PCA8574 chips will allow to decrease this timing, but you'll need to re-init the TWI interface for the 400kHz/1MHz operation. Default setting after the startup is 100kHz.

Code example

Output random values to the LPT module running in GPIO mode, BBC Basic syntax:

10 P=112:GOSUB 100 20 P=114:GOSUB 100 30 P=115:GOSUB 100 40 STOP 100 PUT 216, RND(256) 110 PUT 215, P 120 IF GET(215)>1 THEN 120 130 RETURN

UART

Please write request to prepare this section!

RS-232 interface

Serial communication via the RS-232 interface is governed by peripheral controller MCU and uses its hardware UART interface with external MAX232 chip that serves to shift signal levels to standard values for the RS-232 signalling.

This port depending on the IOBYTE settings can be used as:

  • LST channel output and for serial printer connection;
  • PUNCH/READER communication interface;
  • console I/O interface;
  • general-purpose serial interface.

This chapter describes using this interface as general-purpose.

Default settings for the RS-232 interface are: 9600 bod, 8 bit, 1 stop, no parity.

User program may customize port setting via the following procedure:

  • out 0xC4 to the port 0xDC (220);
  • out baud rate index value from the table below to the port 0xDD (221);
  • out 0x82 the the port 0xDB (219).
Baud rateIndex, decimal value
9600129
1440086
1920064
2880042
3840032
5760021
11520010

To send data to the port the following sequence of operations should be used:

  • write data to be sent to the port 0xF2 (242);
  • write 1 to the port 0xDF (223) to initiate the transmission.

After the completion reading from the port 0xDF (223) will return 0 that means that channel is ready for the next symbol. If you need to send the same symbol more than 1 time on the step 2 write instead of 1 the number of times to send data byte. Writing 0 to the port 0xDF (223) will cancel sending procedure.

Reading the data from the port should be done in the following way: read RS-232 status port 0xF1 (241) and check the bit 7: when this bit is set (1) it means that data byte is received, read it from the port 0xF3 (243). Reading from the status port clears bit 7 flag.

There is no input buffer at the peripheral controller and new symbol will rewrite previous one, if it was not read it will be lost without traces.

If interrupts are configured char reception and completing of the transmission will rise interrupts.

Ethernet LAN

There are several ways how to use Ethernet interface:

  • assigning standard I/O interfaces to the LAN and setting IP and MAC addresses in the system console will allow you to send/receive data without writing any code - please refer to User's manual;
  • simplified UDP data send/receive from the user program using pre-default commands;
  • direct access to ENC28J60 chip for unlimited advanced applications - please refer to the IC datasheet and to "Advanced" section of this manual.

For LAN communication CRISS CP/M has a set of tools that allow to use this interface within just few code lines.

Please write request to complete this section!

Real-time clock

Please write request to prepare this section!

EEPROM

Please write request to prepare this section!

Advanced

Floating point operations

Please write request to prepare this section!

SPI bus direct access

Please write request to prepare this section!

Custom modules

Please write request to prepare this section!

Interrupts

Please write request to prepare this section!

Appendix

Instructions set

Basic functions

.----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | | 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 00 | NOP | LD BC,nn | LD (BC),A | INC BC | INC B | DEC B | LD B,n | RLCA | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 08 | EX AF,AFe | ADD HL,BC | LD A,(BC) | DEC BC | INC C | DEC C | LD C,n | RRCA | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 10 | DJNZ s | LD DE,nn | LD (DE),A | INC DE | INC D | DEC D | LD D,n | RLA | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 18 | JR *,s | ADD HL,DE | LD A,(DE) | DEC DE | INC E | DEC E | LD E,n | RRA | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 20 | JR NZ,s | LD HL,nn | LD (ww),HL | INC HL | INC H | DEC H | LD H,n | DAA | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 28 | JR Z,s | ADD HL,HL | LD HL,(ww) | DEC HL | INC L | DEC L | LD L,n | CPL A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 30 | JR NC,s | LD SP,nn | LD (nn),A | INC SP | INC (HL) | DEC (HL) | LD (HL),n | SCF | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 38 | JR C,s | ADD HL,SP | LD A,(nn) | DEC SP | INC A | DEC A | LD A,n | CCF | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 40 | LD B,B | LD B,C | LD B,D | LD B,E | LD B,H | LD B,L | LD B,(HL) | LD B,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 48 | LD C,B | LD C,C | LD C,D | LD C,E | LD C,H | LD C,L | LD C,(HL) | LD C,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 50 | LD D,B | LD D,C | LD D,D | LD D,E | LD D,H | LD D,L | LD D,(HL) | LD D,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 58 | LD E,B | LD E,C | LD E,D | LD E,E | LD E,H | LD E,L | LD E,(HL) | LD E,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 60 | LD H,B | LD H,C | LD H,D | LD H,E | LD H,H | LD H,L | LD H,(HL) | LD H,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 68 | LD L,B | LD L,C | LD L,D | LD L,E | LD L,H | LD L,L | LD L,(HL) | LD L,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 70 | LD (HL),B | LD (HL),C | LD (HL),D | LD (HL),E | LD (HL),H | LD (HL),L | HALT | LD (HL),A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 78 | LD A,B | LD A,C | LD A,D | LD A,E | LD A,H | LD A,L | LD A,(HL) | LD A,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 80 | ADD A,B | ADD A,C | ADD A,D | ADD A,E | ADD A,H | ADD A,L | ADD A,(HL) | ADD A,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 88 | ADC A,B | ADC A,C | ADC A,D | ADC A,E | ADC A,H | ADC A,L | ADC A,(HL) | ADC A,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 90 | SUB A,B | SUB A,C | SUB A,D | SUB A,E | SUB A,H | SUB A,L | SUB A,(HL) | SUB A,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 98 | SBC A,B | SBC A,C | SBC A,D | SBC A,E | SBC A,H | SBC A,L | SBC A,(HL) | SBC A,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | a0 | AND A,B | AND A,C | AND A,D | AND A,E | AND A,H | AND A,L | AND A,(HL) | AND A,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | a8 | XOR A,B | XOR A,C | XOR A,D | XOR A,E | XOR A,H | XOR A,L | XOR A,(HL) | XOR A,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | b0 | OR A,B | OR A,C | OR A,D | OR A,E | OR A,H | OR A,L | OR A,(HL) | OR A,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | b8 | CP A,B | CP A,C | CP A,D | CP A,E | CP A,H | CP A,L | CP A,(HL) | CP A,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | c0 | RET NZ | POP BC | JP NZ,nn | JP *,nn | CALL NZ,nn | PUSH BC | ADD A,n | RST 00h | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | c8 | RET Z | RET * | JP Z,nn | CB* | CALL Z,nn | CALL *,nn | ADC A,n | RST 08h | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | d0 | RET NC | POP DE | JP NC,nn | OUT (n),A | CALL NC,nn | PUSH DE | SUB A,n | RST 10h | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | d8 | RET C | EXX | JP C,nn | IN A,(n) | CALL C,nn | DD* | SBC A,n | RST 18h | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | e0 | RET PO | POP HL | JP PO,nn | EX (SP),HL | CALL PO,nn | PUSH HL | AND A,n | RST 20h | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | e8 | RET PE | JP *,HL | JP PE,nn | EX DE,HL | CALL PE,nn | ED* | XOR A,n | RST 28h | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | f0 | RET P | POP AF | JP P,nn | DI | CALL P,nn | PUSH AF | OR A,n | RST 30h | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | f8 | RET M | LD SP,HL | JP M,nn | EI | CALL M,nn | FD* | CP A,n | RST 38h | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|

CB-prefixed commands

.----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | | 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 00 | RLC B | RLC C | RLC D | RLC E | RLC H | RLC L | RLC (HL) | RLC A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 08 | RRC B | RRC C | RRC D | RRC E | RRC H | RRC L | RRC (HL) | RRC A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 10 | RL B | RL C | RL D | RL E | RL H | RL L | RL (HL) | RL A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 18 | RR B | RR C | RR D | RR E | RR H | RR L | RR (HL) | RR A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 20 | SLA B | SLA C | SLA D | SLA E | SLA H | SLA L | SLA (HL) | SLA A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 28 | SRA B | SRA C | SRA D | SRA E | SRA H | SRA L | SRA (HL) | SRA A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 30 | SLL B | SLL C | SLL D | SLL E | SLL H | SLL L | SLL (HL) | SLL A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 38 | SRL B | SRL C | SRL D | SRL E | SRL H | SRL L | SRL (HL) | SRL A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 40 | BIT 0,B | BIT 0,C | BIT 0,D | BIT 0,E | BIT 0,H | BIT 0,L | BIT 0,(HL) | BIT 0,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 48 | BIT 1,B | BIT 1,C | BIT 1,D | BIT 1,E | BIT 1,H | BIT 1,L | BIT 1,(HL) | BIT 1,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 50 | BIT 2,B | BIT 2,C | BIT 2,D | BIT 2,E | BIT 2,H | BIT 2,L | BIT 2,(HL) | BIT 2,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 58 | BIT 3,B | BIT 3,C | BIT 3,D | BIT 3,E | BIT 3,H | BIT 3,L | BIT 3,(HL) | BIT 3,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 60 | BIT 4,B | BIT 4,C | BIT 4,D | BIT 4,E | BIT 4,H | BIT 4,L | BIT 4,(HL) | BIT 4,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 68 | BIT 5,B | BIT 5,C | BIT 5,D | BIT 5,E | BIT 5,H | BIT 5,L | BIT 5,(HL) | BIT 5,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 70 | BIT 6,B | BIT 6,C | BIT 6,D | BIT 6,E | BIT 6,H | BIT 6,L | BIT 6,(HL) | BIT 6,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 78 | BIT 7,B | BIT 7,C | BIT 7,D | BIT 7,E | BIT 7,H | BIT 7,L | BIT 7,(HL) | BIT 7,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 80 | RES 0,B | RES 0,C | RES 0,D | RES 0,E | RES 0,H | RES 0,L | RES 0,(HL) | RES 0,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 88 | RES 1,B | RES 1,C | RES 1,D | RES 1,E | RES 1,H | RES 1,L | RES 1,(HL) | RES 1,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 90 | RES 2,B | RES 2,C | RES 2,D | RES 2,E | RES 2,H | RES 2,L | RES 2,(HL) | RES 2,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 98 | RES 3,B | RES 3,C | RES 3,D | RES 3,E | RES 3,H | RES 3,L | RES 3,(HL) | RES 3,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | a0 | RES 4,B | RES 4,C | RES 4,D | RES 4,E | RES 4,H | RES 4,L | RES 4,(HL) | RES 4,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | a8 | RES 5,B | RES 5,C | RES 5,D | RES 5,E | RES 5,H | RES 5,L | RES 5,(HL) | RES 5,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | b0 | RES 6,B | RES 6,C | RES 6,D | RES 6,E | RES 6,H | RES 6,L | RES 6,(HL) | RES 6,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | b8 | RES 7,B | RES 7,C | RES 7,D | RES 7,E | RES 7,H | RES 7,L | RES 7,(HL) | RES 7,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | c0 | SET 0,B | SET 0,C | SET 0,D | SET 0,E | SET 0,H | SET 0,L | SET 0,(HL) | SET 0,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | c8 | SET 1,B | SET 1,C | SET 1,D | SET 1,E | SET 1,H | SET 1,L | SET 1,(HL) | SET 1,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | d0 | SET 2,B | SET 2,C | SET 2,D | SET 2,E | SET 2,H | SET 2,L | SET 2,(HL) | SET 2,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | d8 | SET 3,B | SET 3,C | SET 3,D | SET 3,E | SET 3,H | SET 3,L | SET 3,(HL) | SET 3,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | e0 | SET 4,B | SET 4,C | SET 4,D | SET 4,E | SET 4,H | SET 4,L | SET 4,(HL) | SET 4,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | e8 | SET 5,B | SET 5,C | SET 5,D | SET 5,E | SET 5,H | SET 5,L | SET 5,(HL) | SET 5,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | f0 | SET 6,B | SET 6,C | SET 6,D | SET 6,E | SET 6,H | SET 6,L | SET 6,(HL) | SET 6,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | f8 | SET 7,B | SET 7,C | SET 7,D | SET 7,E | SET 7,H | SET 7,L | SET 7,(HL) | SET 7,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|

DD-prefixed commands

.----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | | 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 00 | NOP | LD BC,nn | LD (BC),A | INC BC | INC B | DEC B | LD B,n | RLCA | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 08 | EX AF,AFe | ADD IX,BC | LD A,(BC) | DEC BC | INC C | DEC C | LD C,n | RRCA | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 10 | DJNZ s | LD DE,nn | LD (DE),A | INC DE | INC D | DEC D | LD D,n | RLA | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 18 | JR *,s | ADD IX,DE | LD A,(DE) | DEC DE | INC E | DEC E | LD E,n | RRA | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 20 | JR NZ,s | LD IX,nn | LD (ww),IX | INC IX | INC IXh | DEC IXh | LD IXh,n | DAA | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 28 | JR Z,s | ADD IX,IX | LD IX,(ww) | DEC IX | INC IXl | DEC IXl | LD IXl,n | CPL A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 30 | JR NC,s | LD SP,nn | LD (nn),A | INC SP | INC (IX+d) | DEC (IX+d) | LD (IX+d),n | SCF | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 38 | JR C,s | ADD IX,SP | LD A,(nn) | DEC SP | INC A | DEC A | LD A,n | CCF | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 40 | LD B,B | LD B,C | LD B,D | LD B,E | LD B,IXh | LD B,IXl | LD B,(IX+d) | LD B,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 48 | LD C,B | LD C,C | LD C,D | LD C,E | LD C,IXh | LD C,IXl | LD C,(IX+d) | LD C,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 50 | LD D,B | LD D,C | LD D,D | LD D,E | LD D,IXh | LD D,IXl | LD D,(IX+d) | LD D,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 58 | LD E,B | LD E,C | LD E,D | LD E,E | LD E,IXh | LD E,IXl | LD E,(IX+d) | LD E,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 60 | LD IXh,B | LD IXh,C | LD IXh,D | LD IXh,E | LD IXh,IXh | LD IXh,IXl | LD H,(IX+d) | LD IXh,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 68 | LD IXl,B | LD IXl,C | LD IXl,D | LD IXl,E | LD IXl,IXh | LD IXl,IXl | LD L,(IX+d) | LD IXl,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 70 | LD (IX+d),B | LD (IX+d),C | LD (IX+d),D | LD (IX+d),E | LD (IX+d),H | LD (IX+d),L | HALT | LD (IX+d),A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 78 | LD A,B | LD A,C | LD A,D | LD A,E | LD A,IXh | LD A,IXl | LD A,(IX+d) | LD A,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 80 | ADD A,B | ADD A,C | ADD A,D | ADD A,E | ADD A,IXh | ADD A,IXl | ADD A,(IX+d) | ADD A,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 88 | ADC A,B | ADC A,C | ADC A,D | ADC A,E | ADC A,IXh | ADC A,IXl | ADC A,(IX+d) | ADC A,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 90 | SUB A,B | SUB A,C | SUB A,D | SUB A,E | SUB A,IXh | SUB A,IXl | SUB A,(IX+d) | SUB A,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 98 | SBC A,B | SBC A,C | SBC A,D | SBC A,E | SBC A,IXh | SBC A,IXl | SBC A,(IX+d) | SBC A,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | a0 | AND A,B | AND A,C | AND A,D | AND A,E | AND A,IXh | AND A,IXl | AND A,(IX+d) | AND A,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | a8 | XOR A,B | XOR A,C | XOR A,D | XOR A,E | XOR A,IXh | XOR A,IXl | XOR A,(IX+d) | XOR A,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | b0 | OR A,B | OR A,C | OR A,D | OR A,E | OR A,IXh | OR A,IXl | OR A,(IX+d) | OR A,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | b8 | CP A,B | CP A,C | CP A,D | CP A,E | CP A,IXh | CP A,IXl | CP A,(IX+d) | CP A,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | c0 | RET NZ | POP BC | JP NZ,nn | JP *,nn | CALL NZ,nn | PUSH BC | ADD A,n | RST 00h | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | c8 | RET Z | RET * | JP Z,nn | DDCB | CALL Z,nn | CALL *,nn | ADC A,n | RST 08h | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | d0 | RET NC | POP DE | JP NC,nn | OUT (n),A | CALL NC,nn | PUSH DE | SUB A,n | RST 10h | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | d8 | RET C | EXX | JP C,nn | IN A,(n) | CALL C,nn | NONI | SBC A,n | RST 18h | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | e0 | RET PO | POP IX | JP PO,nn | EX (SP),IX | CALL PO,nn | PUSH IX | AND A,n | RST 20h | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | e8 | RET PE | JP *,IX | JP PE,nn | EX DE,IX | CALL PE,nn | NONI | XOR A,n | RST 28h | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | f0 | RET P | POP AF | JP P,nn | DI | CALL P,nn | PUSH AF | OR A,n | RST 30h | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | f8 | RET M | LD SP,IX | JP M,nn | EI | CALL M,nn | NONI | CP A,n | RST 38h | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|

ED-prefixed commands

.----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | | 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 00 | BIOS 0 | BIOS 1 | BIOS 2 | BIOS 3 | BIOS 4 | BIOS 5 | BIOS 6 | BIOS 7 | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 08 | BIOS 8 | BIOS 9 | BIOS 10 | BIOS 11 | BIOS 12 | BIOS 13 | BIOS 14 | BIOS 15 | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 10 | BIOS 16 | BIOS 17 | BIOS 18 | BIOS 19 | BIOS 20 | BIOS 21 | BIOS 22 | BIOS 23 | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 18 | BIOS 24 | BIOS 25 | BIOS 26 | BIOS 27 | BIOS 28 | BIOS 29 | BIOS 30 | BIOS 31 | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 20 | BIOS 32 | BIOS 33 | BIOS 34 | BIOS 35 | BIOS 36 | BIOS 37 | BIOS 38 | BDOS | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 28 | NONI | NONI | NONI | NONI | NONI | NONI | NONI | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 30 | NONI | NONI | NONI | NONI | NONI | NONI | NONI | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 38 | NONI | NONI | NONI | NONI | NONI | NONI | NONI | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 40 | IN B,(C) | OUT (C),B | SBC HL,BC | LD (ww),BC | NEG A | RETN | IM 0 | LD I,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 48 | IN C,(C) | OUT (C),C | ADC HL,BC | LD BC,(ww) | NEG A | RETI | IM 3 | LD R,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 50 | IN D,(C) | OUT (C),D | SBC HL,DE | LD (ww),DE | NEG A | RETN | IM 1 | LD A,I | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 58 | IN E,(C) | OUT (C),E | ADC HL,DE | LD DE,(ww) | NEG A | RETN | IM 2 | LD A,R | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 60 | IN H,(C) | OUT (C),H | SBC HL,HL | LD (ww),HL | NEG A | RETN | IM 0 | RRD A,(HL) | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 68 | IN L,(C) | OUT (C),L | ADC HL,HL | LD HL,(ww) | NEG A | RETN | IM 3 | RLD A,(HL) | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 70 | NONI | OUT (C),0 | SBC HL,SP | LD (ww),SP | NEG A | RETN | IM 1 | MUL | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 78 | IN A,(C) | OUT (C),A | ADC HL,SP | LD SP,(ww) | NEG A | RETN | IM 2 | DIV | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 80 | NONI | NONI | NONI | NONI | NONI | NONI | NONI | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 88 | NONI | NONI | NONI | NONI | NONI | NONI | NONI | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 90 | NONI | NONI | NONI | NONI | NONI | NONI | NONI | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 98 | NONI | NONI | NONI | NONI | NONI | NONI | NONI | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | a0 | LDI | CPI | INI | OUTI | FL32 0 | FL32 1 | FL32 2 | FL32 3 | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | a8 | LDD | CPD | IND | OUTD | NONI | NONI | NONI | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | b0 | LDIR | CPIR | INIR | OTIR | NONI | NONI | NONI | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | b8 | LDDR | CPDR | INDR | OTDR | NONI | NONI | NONI | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | c0 | NONI | NONI | NONI | NONI | NONI | NONI | NONI | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | c8 | NONI | NONI | NONI | NONI | NONI | NONI | NONI | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | d0 | NONI | NONI | NONI | NONI | NONI | NONI | NONI | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | d8 | NONI | NONI | NONI | NONI | NONI | NONI | NONI | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | e0 | NONI | NONI | NONI | NONI | NONI | NONI | NONI | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | e8 | NONI | NONI | NONI | NONI | NONI | NONI | NONI | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | f0 | NONI | NONI | NONI | NONI | NONI | NONI | NONI | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | f8 | NONI | NONI | NONI | NONI | NONI | NONI | NONI | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|

FD-prefixed commands

.----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | | 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 00 | NOP | LD BC,nn | LD (BC),A | INC BC | INC B | DEC B | LD B,n | RLCA | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 08 | EX AF,AFe | ADD IY,BC | LD A,(BC) | DEC BC | INC C | DEC C | LD C,n | RRCA | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 10 | DJNZ s | LD DE,nn | LD (DE),A | INC DE | INC D | DEC D | LD D,n | RLA | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 18 | JR *,s | ADD IY,DE | LD A,(DE) | DEC DE | INC E | DEC E | LD E,n | RRA | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 20 | JR NZ,s | LD IY,nn | LD (ww),IY | INC IY | INC IYh | DEC IYh | LD IYh,n | DAA | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 28 | JR Z,s | ADD IY,IY | LD IY,(ww) | DEC IY | INC IYl | DEC IYl | LD IYl,n | CPL A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 30 | JR NC,s | LD SP,nn | LD (nn),A | INC SP | INC (IY+d) | DEC (IY+d) | LD (IY+d),n | SCF | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 38 | JR C,s | ADD IY,SP | LD A,(nn) | DEC SP | INC A | DEC A | LD A,n | CCF | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 40 | LD B,B | LD B,C | LD B,D | LD B,E | LD B,IYh | LD B,IYl | LD B,(IY+d) | LD B,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 48 | LD C,B | LD C,C | LD C,D | LD C,E | LD C,IYh | LD C,IYl | LD C,(IY+d) | LD C,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 50 | LD D,B | LD D,C | LD D,D | LD D,E | LD D,IYh | LD D,IYl | LD D,(IY+d) | LD D,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 58 | LD E,B | LD E,C | LD E,D | LD E,E | LD E,IYh | LD E,IYl | LD E,(IY+d) | LD E,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 60 | LD IYh,B | LD IYh,C | LD IYh,D | LD IYh,E | LD IYh,IYh | LD IYh,IYl | LD H,(IY+d) | LD IYh,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 68 | LD IYl,B | LD IYl,C | LD IYl,D | LD IYl,E | LD IYl,IYh | LD IYl,IYl | LD L,(IY+d) | LD IYl,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 70 | LD (IY+d),B | LD (IY+d),C | LD (IY+d),D | LD (IY+d),E | LD (IY+d),H | LD (IY+d),L | HALT | LD (IY+d),A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 78 | LD A,B | LD A,C | LD A,D | LD A,E | LD A,IYh | LD A,IYl | LD A,(IY+d) | LD A,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 80 | ADD A,B | ADD A,C | ADD A,D | ADD A,E | ADD A,IYh | ADD A,IYl | ADD A,(IY+d) | ADD A,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 88 | ADC A,B | ADC A,C | ADC A,D | ADC A,E | ADC A,IYh | ADC A,IYl | ADC A,(IY+d) | ADC A,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 90 | SUB A,B | SUB A,C | SUB A,D | SUB A,E | SUB A,IYh | SUB A,IYl | SUB A,(IY+d) | SUB A,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 98 | SBC A,B | SBC A,C | SBC A,D | SBC A,E | SBC A,IYh | SBC A,IYl | SBC A,(IY+d) | SBC A,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | a0 | AND A,B | AND A,C | AND A,D | AND A,E | AND A,IYh | AND A,IYl | AND A,(IY+d) | AND A,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | a8 | XOR A,B | XOR A,C | XOR A,D | XOR A,E | XOR A,IYh | XOR A,IYl | XOR A,(IY+d) | XOR A,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | b0 | OR A,B | OR A,C | OR A,D | OR A,E | OR A,IYh | OR A,IYl | OR A,(IY+d) | OR A,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | b8 | CP A,B | CP A,C | CP A,D | CP A,E | CP A,IYh | CP A,IYl | CP A,(IY+d) | CP A,A | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | c0 | RET NZ | POP BC | JP NZ,nn | JP *,nn | CALL NZ,nn | PUSH BC | ADD A,n | RST 00h | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | c8 | RET Z | RET * | JP Z,nn | FDCB | CALL Z,nn | CALL *,nn | ADC A,n | RST 08h | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | d0 | RET NC | POP DE | JP NC,nn | OUT (n),A | CALL NC,nn | PUSH DE | SUB A,n | RST 10h | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | d8 | RET C | EXX | JP C,nn | IN A,(n) | CALL C,nn | NONI | SBC A,n | RST 18h | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | e0 | RET PO | POP IY | JP PO,nn | EX (SP),IY | CALL PO,nn | PUSH IY | AND A,n | RST 20h | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | e8 | RET PE | JP *,IY | JP PE,nn | EX DE,IY | CALL PE,nn | NONI | XOR A,n | RST 28h | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | f0 | RET P | POP AF | JP P,nn | DI | CALL P,nn | PUSH AF | OR A,n | RST 30h | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | f8 | RET M | LD SP,IY | JP M,nn | EI | CALL M,nn | NONI | CP A,n | RST 38h | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|

DDCB-prefixed commands

.----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | | 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 00 | NONI | NONI | NONI | NONI | NONI | NONI | RLC (IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 08 | NONI | NONI | NONI | NONI | NONI | NONI | RRC (IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 10 | NONI | NONI | NONI | NONI | NONI | NONI | RL (IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 18 | NONI | NONI | NONI | NONI | NONI | NONI | RR (IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 20 | NONI | NONI | NONI | NONI | NONI | NONI | SLA (IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 28 | NONI | NONI | NONI | NONI | NONI | NONI | SRA (IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 30 | NONI | NONI | NONI | NONI | NONI | NONI | SLL (IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 38 | NONI | NONI | NONI | NONI | NONI | NONI | SRL (IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 40 | NONI | NONI | NONI | NONI | NONI | NONI | BIT 0,(IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 48 | NONI | NONI | NONI | NONI | NONI | NONI | BIT 1,(IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 50 | NONI | NONI | NONI | NONI | NONI | NONI | BIT 2,(IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 58 | NONI | NONI | NONI | NONI | NONI | NONI | BIT 3,(IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 60 | NONI | NONI | NONI | NONI | NONI | NONI | BIT 4,(IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 68 | NONI | NONI | NONI | NONI | NONI | NONI | BIT 5,(IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 70 | NONI | NONI | NONI | NONI | NONI | NONI | BIT 6,(IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 78 | NONI | NONI | NONI | NONI | NONI | NONI | BIT 7,(IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 80 | NONI | NONI | NONI | NONI | NONI | NONI | RES 0,(IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 88 | NONI | NONI | NONI | NONI | NONI | NONI | RES 1,(IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 90 | NONI | NONI | NONI | NONI | NONI | NONI | RES 2,(IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 98 | NONI | NONI | NONI | NONI | NONI | NONI | RES 3,(IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | a0 | NONI | NONI | NONI | NONI | NONI | NONI | RES 4,(IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | a8 | NONI | NONI | NONI | NONI | NONI | NONI | RES 5,(IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | b0 | NONI | NONI | NONI | NONI | NONI | NONI | RES 6,(IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | b8 | NONI | NONI | NONI | NONI | NONI | NONI | RES 7,(IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | c0 | NONI | NONI | NONI | NONI | NONI | NONI | SET 0,(IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | c8 | NONI | NONI | NONI | NONI | NONI | NONI | SET 1,(IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | d0 | NONI | NONI | NONI | NONI | NONI | NONI | SET 2,(IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | d8 | NONI | NONI | NONI | NONI | NONI | NONI | SET 3,(IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | e0 | NONI | NONI | NONI | NONI | NONI | NONI | SET 4,(IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | e8 | NONI | NONI | NONI | NONI | NONI | NONI | SET 5,(IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | f0 | NONI | NONI | NONI | NONI | NONI | NONI | SET 6,(IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | f8 | NONI | NONI | NONI | NONI | NONI | NONI | SET 7,(IX+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|

FDCB-prefixed commands

.----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | | 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 00 | NONI | NONI | NONI | NONI | NONI | NONI | RLC (IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 08 | NONI | NONI | NONI | NONI | NONI | NONI | RRC (IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 10 | NONI | NONI | NONI | NONI | NONI | NONI | RL (IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 18 | NONI | NONI | NONI | NONI | NONI | NONI | RR (IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 20 | NONI | NONI | NONI | NONI | NONI | NONI | SLA (IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 28 | NONI | NONI | NONI | NONI | NONI | NONI | SRA (IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 30 | NONI | NONI | NONI | NONI | NONI | NONI | SLL (IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 38 | NONI | NONI | NONI | NONI | NONI | NONI | SRL (IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 40 | NONI | NONI | NONI | NONI | NONI | NONI | BIT 0,(IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 48 | NONI | NONI | NONI | NONI | NONI | NONI | BIT 1,(IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 50 | NONI | NONI | NONI | NONI | NONI | NONI | BIT 2,(IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 58 | NONI | NONI | NONI | NONI | NONI | NONI | BIT 3,(IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 60 | NONI | NONI | NONI | NONI | NONI | NONI | BIT 4,(IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 68 | NONI | NONI | NONI | NONI | NONI | NONI | BIT 5,(IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 70 | NONI | NONI | NONI | NONI | NONI | NONI | BIT 6,(IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 78 | NONI | NONI | NONI | NONI | NONI | NONI | BIT 7,(IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 80 | NONI | NONI | NONI | NONI | NONI | NONI | RES 0,(IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 88 | NONI | NONI | NONI | NONI | NONI | NONI | RES 1,(IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 90 | NONI | NONI | NONI | NONI | NONI | NONI | RES 2,(IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | 98 | NONI | NONI | NONI | NONI | NONI | NONI | RES 3,(IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | a0 | NONI | NONI | NONI | NONI | NONI | NONI | RES 4,(IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | a8 | NONI | NONI | NONI | NONI | NONI | NONI | RES 5,(IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | b0 | NONI | NONI | NONI | NONI | NONI | NONI | RES 6,(IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | b8 | NONI | NONI | NONI | NONI | NONI | NONI | RES 7,(IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | c0 | NONI | NONI | NONI | NONI | NONI | NONI | SET 0,(IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | c8 | NONI | NONI | NONI | NONI | NONI | NONI | SET 1,(IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | d0 | NONI | NONI | NONI | NONI | NONI | NONI | SET 2,(IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | d8 | NONI | NONI | NONI | NONI | NONI | NONI | SET 3,(IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | e0 | NONI | NONI | NONI | NONI | NONI | NONI | SET 4,(IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | e8 | NONI | NONI | NONI | NONI | NONI | NONI | SET 5,(IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | f0 | NONI | NONI | NONI | NONI | NONI | NONI | SET 6,(IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------| | f8 | NONI | NONI | NONI | NONI | NONI | NONI | SET 7,(IY+d) | NONI | |----|--------------|--------------|--------------|--------------|--------------|--------------|--------------|--------------|

Pripheral controller I/O ports

HEXDECIndexНазваниеTitleОписаниеDescription*
DO208VSTATПорт видеоконтроллераVideo controller control portУстановка кодовой страницы и числа строк экранаLine number and code page settingsR/W
D1209VCURH-"--"-Адрес отображаемого курсора (старший байт)Cursor address HR/W
D2210VCURL-"--"-Адрес отображаемого курсора (младший байт)Cursor address LR/W
D3211KMODKПорт контроллера клавиатурыKeyboard controller control portЗначение модификаторовModkeys valuesR
D4212KACTK-"--"-Скан-код клавишиKey scan-code valueR
D5213KCHAR-"--"-CP866 Код нажатой клавишиDecoded key valueR/W
D6214MPCMDПорт управления синтезатора мелодийMelody generator control portКоманда для выполнения синтезатором мелодийCommandR/W
E0-EF224-239MPBUF-"--"-Ноты для воспроизведенияNotes bufferR/W
D7215TWCMDПорт управления GPIOGPIO controller control portTWI-команда для выполненияTWI command to be executedR/W
D8216TWDTI-"--"-Параметр или возвращаемое значение командыTWI parameterR/W
DB219SYSRQСистемный портSystem command control portКомандаCommand to executeR/W
DC220SYSAA-"--"-АдресAddress valueW
DD221SYSVV-"--"-ЗначениеParameter valueR/W
DE222CTCVVПорт управления таймеромTimer portЗадание/текущее состояния таймера 10мсCurrent value 10ms stepR/W
DF223COMTCПорт управления COM-каналомRS-232 control portУстановка/чтение счётчика передачиOutput counterR/W
F1241COMST-"--"-Флаг наличия символа во буфереSymbol ready flagR, Clear-on-read port
F2242COMTX-"--"-Символ для передачиSymbol to transmitW
F3243COMRX-"--"-Принятый символReceived symbolR, Clear-on-read port

Symbol pages

Standard CRISS symbol set based on CP866 codepage:

Кодовая страница 0

Code page 1, used for graphic mode:

Кодовая страница 1

Code page 2:

Кодовая страница 2

Code page 3:

Кодовая страница 3

Codepage 4 is reserved for custom user application. All character sets can be customized.

Work is in the progress

Didn't find information you need? Work is in the progress, information will be available soon! Please send requests what you need "ASAP"!

© Copyright Radio / Радио / OGSS / НГСС 2020-2021