 |

CpcAlive
is a
programming
environment
Amstrad CPC
compatible
for graphics
animations
creation. |
|
Français
INTERRUPTION 018H MANAGEMENT
The AH values to transmit to acced of the various functions of
this interruption are:
0 = Read the byte pointed by SI (bank 0 Cpc) and put it in AL
1 = Write the value of the register AL in the byte
pointed by
DI (bank 0 Cpc)
2 = Read the value pointed by SI (bank 0 Cpc) and put it in the register
indicated by AL:
| AL
value |
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
| Register
to load |
AH |
BL |
BH |
CL |
CH |
DL |
DH |
AX |
BX |
CX |
DX |
SI |
DI |
BP |
| AL
value |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
|
|
|
|
|
|
|
| Register
to load |
EAX |
EBX |
ECX |
EDX |
ESI |
EDI |
EBP |
|
|
|
|
|
|
|
3 = Write the value of the register
indicated by AL in
the memory address pointed by DI (bank 0 Cpc) :
| AL
value |
- |
1 |
2 |
3 |
4 |
5 |
6 |
- |
8 |
9 |
10 |
11 |
- |
13 |
| Register
to write |
- |
BL |
BH |
CL |
CH |
DL |
DH |
- |
BX |
CX |
DX |
SI |
- |
BP |
| AL
value |
- |
15 |
16 |
17 |
18 |
- |
20 |
|
|
|
|
|
|
|
| Register
to write |
- |
EBX |
ECX |
EDX |
ESI |
- |
EBP |
|
|
|
|
|
|
|
4 = memory blocks connection
depending of values
in the corresponding fields.
5 = data block transfer from Bank 0 of the Cpc to the connected X86 module.
Input conditions: SI=Cpc source address, DI=X86 destination address, CX=size block in bytes
6 = (V1.19g) data block transfer from the X86 module to the Cpc Bank 0.
Input conditions: SI=address source X86, DI=Cpc destination address, CX=size block in bytes
7 = data block transfer from the Cpc memory (State before call module) to the connected X86 module.
Input conditions: SI=Cpc source address, DI=X86 destination address, CX=size block in bytes
8 = (V1.19g) data block transfer from the X86 module connected to the Cpc memory (State before call module).
Input conditions: SI=address source X86, DI=Cpc destination address, CX=size block in bytes
9 = data block transfer from the Cpc Bank 0 to buffer.
Input conditions: SI=Cpc source address, CX=size block in bytes (0200h maxi)
Output: ES:BX points to the beginning of the area wich have received data
10 = data block transfer from the Cpc memory (State before call module) to buffer.
Input conditions: SI=Cpc source address, CX=size block in bytes (0200h maxi)
Output: ES:BX points to the beginning of the area wich have received data
SCREEN MANAGEMENT WITH 'MODE 3' USING INTERRUPT 018H
The value of AH to pass to this interrupt to access the various functions managing the screen is 15
(The program EX\X86IOPix.BAS included in the archive (V1.19g) is an example of an implementation of these functions)
| AX=0F00h |
SCREEN INFOS:
Output: AX=screen height,BX=screen width |
| AX=0F01h |
SET BACKGROUND COLOR (mode 3)
Input conditions: EBX=Background PEN number (-1=not set)
|
| AX=0F02h |
SET FOREGROUND COLOR (mode 3)
Input conditions: EBX=PEN number (-1=not set), DX=Type of treatment
The different types of treatment are:
0=The pixel is displayed if its value is higher than the screen pixel and the 'FOREGROUND COLOR' value
1=An XOR operation is performed between the value of the pixel to be
displayed and the pixel on the screen if its value is greater than the
'FOREGROUND COLOR' value
2=An OR operation is performed between the value of the pixel to be
displayed and the pixel on the screen if its value is greater than the
'FOREGROUND COLOR' value
3=An AND operation is performed between the value of the pixel to be
displayed and the pixel on the screen if its value is greater than the
'FOREGROUND COLOR' value |
| AX=0F10h |
SCREEN BLOCK TRANSFER TO BUFFER (mode 3)
Input conditions:
DX=source screen line (Y), CX=window start(X) in pixels
BX=window width in pixels, high EBX=window height in pixels
Output:
ES:[DI+0]=X source
ES:[DI+2]=Y source
ES:[DI+4]=window width in pixels
ES:[DI+6]=window height in pixels
ES:DI+8 point to start of saved pixel block |
| AX=0F11h |
SCREEN BLOCK TRANSFERT TO RAM (mode 3)
Input conditions:
ES:DI point to destination buffer
DX=source screen line (Y), CX=window start(X) in pixels
BX=window width in pixels, high EBX=window height in pixels
Output:
ES:[DI+0]=X source
ES:[DI+2]=Y source
ES:[DI+4]=window width in pixels
ES:[DI+6]=window height in pixels
ES:DI+8 point to start of saved pixel block |
| AX=0F12h |
RAM BLOCK TRANSFERT TO SCREEN with BackGround/ForeGround handling (mode 3)
Input conditions:
DS:SI point to source buffer
DX=destination screen line (Y)
CX=window start (X) in pixels
DS:[SI+4]=window width in pixels
DS:[SI+6]=window height in pixels
DS:SI+8 point to the block of pixels |
| AX=0F13h |
CLEAR SCREEN BLOCK WITH COLOR (mode 3)
Input conditions:
DX=destination screen line (Y)
CX=window start (X) in pixels
BX=window width in pixels
high EBX=window height in pixels
EDI=PEN number |
|