Lenovo ThinkPad 600X Technical Reference Manual for the ThinkPad 600 - Page 86
Calling Convention Pseudo Code, Assembler Language, C Language
View all Lenovo ThinkPad 600X manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 86 highlights
Calling Convention Pseudo Code The following describes the calling convention using pseudo code. Assembler Language InputParm OutputParm SMB_INPARM SMB_OUTPARM < > 16-bit push mov push push mov push call add ds ax, offset OutputParm ax ds ax, offset InputParm ax dword ptr SmapiBios sp, 8 32-bit push mov push push mov push call add ds eax, offset OutputParm eax ds eax, offset InputParm eax fword ptr SmapiBios sp, 16 C Language typedef WORD (far SMB)(FPINPARM, FPOUTPARM) ; SMB INPARM OUTPARM WORD SmapiBios ; InputParm ; OutputParm ; RC ; RC = SmapiBios(&InputParm, &OutputParm) ; B-10 SMAPI BIOS
Calling Convention Pseudo Code
The following describes the calling convention using pseudo code.
Assembler Language
InputParm
SMB_INPARM
<>
OutputParm
SMB_OUTPARM
<>
16-bit
push
ds
mov
ax, offset OutputParm
push
ax
push
ds
mov
ax, offset InputParm
push
ax
call
dword ptr SmapiBios
add
sp, 8
32-bit
push
ds
mov
eax, offset OutputParm
push
eax
push
ds
mov
eax, offset InputParm
push
eax
call
fword ptr SmapiBios
add
sp, 16
C Language
typedef WORD (far
SMB)(FPINPARM, FPOUTPARM) ;
SMB
SmapiBios ;
INPARM
InputParm ;
OUTPARM
OutputParm ;
WORD
RC ;
RC = SmapiBios(&InputParm, &OutputParm) ;
B-10
SMAPI BIOS