I/O Function Calls (Asm/C); I/O Function Calls Parameter Passing - Fujitsu F2MC-16L Series User Manual

Hide thumbs Also See for F2MC-16L Series:
Table of Contents

Advertisement

4.1. I/O Function Calls (ASM/C)

4.1.1.

I/O Function Calls Parameter Passing

The most commonly used function vectors are those for ´I/O Function Calls´.
Specifying a function code byte and additional parameters will execute a specific I/O function.
See also "TINYBIOS.H" for easy to use macro definitions .
Two different table entries are available.
The (ASM) entry is optimised for assembly language calls, which pass the required parameters
in CPU registers.
The (C) entry is optimised for C-program calls, which pass the parameters via the stack.
The following convention is used to specify function code and parameter:
a) Function Call (ASM)
e.g. MOV
b) Function Call (C)
e.g. int (* __far BiosCall)(int, int, int) = 0xFC0014L;
On return, a 16 bit value is passed back to the calling routine via the AL register.
Generally, a negative return value is regarded as an error exit code.
NOTE: C-function calls always expect 3 bytes parameter on stack. After returning from C-
subroutines, the register RW4, RW5 and ADB may have different values.
Pointers are expected to point within the bank indicated by DTB.
© FUJITSU Mikroelektronik GmbH 1996
FUJITSU MB90675-Evaluation Board - User Manual
Register AH :
upper byte AL :
lower byte AL:
RL2:
A,#('*')
MOV
A,#H'100
CALLP
FC0010
1st word on stack:
2nd word on stack:
3rd word on stack:
BiosCall('*',0,1);
first parameter (byte/word)
function number
second parameter (byte)
32 Bit value if needed
; ASCII code of '*'
; function number shifted 8 bit left
; call BIOS function
first parameter (byte/word/lower 16 bits)
second parameter (byte/upper 16 bits)
function number
- 39 -

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb90675 series

Table of Contents