Calling Convention

Calling Convention

The

client

 

can

invoke the SMAPI BIOS with a far-call to the entry

 

 

point

that

is

specified

in

the

header

file. All

parameters

for

the

BIOS

and

other

 

results

are stored in

the

client data

area;

the client

needs

to prepare

an

input parameter and output parameter area in

its

data

area, and informs this area by pushing

those pointers

onto

its stack

before the far-calls.

 

 

 

 

 

 

 

 

 

 

 

The

SMAPI

BIOS

uses

the

stack/data area

directly

with

the

selector

 

when

the

BIOS

is

invoked. Therefore,

the

caller needs

to

define

the

same

privilege

level

as

the

BIOS.

 

 

 

 

 

 

 

 

Parameter Structure

The

memory

allocation for

the input/output field should be prepared

by the caller. The input

field

specifies

the function

request to the

SMAPI BIOS, and the BIOS

fills

in the return value to

the output

field.

 

 

 

 

 

 

 

 

Input

Field

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Field

 

 

 

Offset

 

Length

 

 

 

 

 

 

 

 

(in Hex)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Major

Function

Number

00

 

Byte

 

 

 

 

 

 

 

 

 

 

 

 

Minor

Function

Number

01

 

Byte

 

 

 

 

 

 

 

 

 

 

 

 

Parameter

1

 

02

 

Word

 

 

 

 

 

 

 

 

 

 

 

 

Parameter

2

 

04

 

Word

 

 

 

 

 

 

 

 

 

 

 

 

Parameter

3

 

06

 

Word

 

 

 

 

 

 

 

 

 

 

 

 

Parameter

4

 

08

 

Double

word

 

 

 

 

 

 

 

 

 

 

 

Parameter

5

 

0C

 

Double

word

 

 

 

 

 

 

 

 

 

 

 

 

 

B-6 SMAPI BIOS

Page 82
Image 82
IBM 770 manual Calling Convention, Parameter Structure, B-6 SMAPI BIOS