1/* $FreeBSD$ */ 2 3#include <machine/asmacros.h> 4 5 .text 6/* 7 * smapi32(input_param, output_param) 8 * struct smapi_bios_parameter *input_parm; 9 * struct smapi_bios_parameter *output_parm; 10 */ 11ENTRY(smapi32) 12 pushl %ebp /* Save frame */ 13 movl %esp,%ebp 14 15 pushl %ds 16 pushl 0x0c(%ebp) /* Output Param */ 17 pushl %ds 18 pushl 0x08(%ebp) /* Input Param */ 19 20 movl $0,%eax /* Clear EAX (return 0) */ 21 movw %cs,smapi32_segment /* Save CS */ 22 lcall *(smapi32_offset) 23 24 leave 25 ret 26 27/* 28 * smapi32(offset, segment, input_param, output_param) 29 * u_int offset; 30 * u_short segment; 31 * struct smapi_bios_parameter *input_parm; 32 * struct smapi_bios_parameter *output_parm; 33 */ 34ENTRY(smapi32_new) 35 pushl %ebp /* Save frame */ 36 movl %esp,%ebp 37 38 movl 0x08(%ebp),%eax 39 movl %eax,smapi32_offset 40 movw 0x0c(%ebp),%ax 41 movw %ax,smapi32_segment 42 43 pushl %ds 44 pushl 0x20(%ebp) /* Output Param */ 45 pushl %ds 46 pushl 0x10(%ebp) /* Input Param */ 47 48 movl $0,%eax 49 movw %cs,smapi32_segment 50 lcall *(smapi32_offset) 51 52 leave 53 ret 54