![](/images/new-backgrounds/1174422/174422139x1.webp)
Calling Convention
The | client can invoke the SMAPI | BIOS | with | a |
|
| ||||||||||
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 / output | parameter area in its data |
| ||||||||||||||
area, and informs | this | area | by | pushing | those pointers | onto | the | its |
| |||||||
stack before the |
|
|
|
|
|
|
|
|
|
| ||||||
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 |
|
|
|
|
|
|
|
|
|
|
|
|
| |||
Major | Function | Number |
| 00h |
| Byte |
|
|
| |||
|
|
|
|
|
|
|
|
|
|
| ||
Minor | Function | Number |
|
| 01h |
| Byte |
|
|
| ||
|
|
|
|
|
|
|
|
|
|
| ||
Parameter | 1 |
|
|
| 02h |
| Word |
|
|
| ||
|
|
|
|
|
|
|
|
|
|
| ||
Parameter | 2 |
|
|
| 04h |
| Word |
|
|
| ||
|
|
|
|
|
|
|
|
|
|
| ||
Parameter | 3 |
|
|
| 06h |
| Word |
|
|
| ||
|
|
|
|
|
|
|
|
|
|
| ||
Parameter | 4 |
|
|
| 08h |
| Dword |
|
|
| ||
|
|
|
|
|
|
|
|
|
|
| ||
Parameter | 5 |
|
|
| 0Ch |
| Dword |
|
|
| ||
|
|
|
|
|
|
|
|
|
|
| ||
Output Field |
|
|
|
|
|
|
|
|
|
| ||
|
|
|
|
|
|
|
|
|
|
|
| |
Field |
|
|
|
|
|
| Offset |
| Length |
|
|
|
|
|
|
|
|
|
|
|
|
| |||
Return Code |
|
|
| 00h |
| Byte |
|
|
| |||
|
|
|
|
|
|
|
|
| ||||
Auxiliary | Return Code |
| 01h |
| Byte |
|
|
| ||||
|
|
|
|
|
|
|
|
|
|
| ||
Parameter | 1 |
|
|
| 02h |
| Word |
|
|
| ||
|
|
|
|
|
|
|
|
|
|
| ||
Parameter | 2 |
|
|
| 04h |
| Word |
|
|
| ||
|
|
|
|
|
|
|
|
|
|
| ||
Parameter | 3 |
|
|
| 06h |
| Word |
|
|
| ||
|
|
|
|
|
|
|
|
|
|
| ||
Parameter | 4 |
|
|
| 08h |
| Dword |
|
|
| ||
|
|
|
|
|
|
|
|
|
|
| ||
Parameter | 5 |
|
|
| 0Ch |
| Dword |
|
|
| ||
|
|
|
|
|
|
|
|
|
|
| ||
ThinkPad | 560/560E | SMAPI | BIOS |
|
|
|
|
|