mk_fp.gml
来自「开放源码的编译器open watcom 1.6.0版的源代码」· GML 代码 · 共 40 行
GML
40 行
.func MK_FP
#include <i86.h>
void __far *MK_FP( unsigned int segment,
unsigned int offset );
.funcend
.desc begin
The &func macro can be used to obtain the far
pointer value given by the
.arg segment
segment value and the
.arg offset
offset value.
These values may be obtained by using the
.kw FP_SEG
and
.kw FP_OFF
macros.
.desc end
.return begin
The macro returns a far pointer.
.return end
.see begin
.seelist MK_FP FP_OFF FP_SEG segread
.see end
.exmp begin
#include <i86.h>
#include <stdio.h>
void main()
{
unsigned short __far *bios_prtr_port_1;
.exmp break
bios_prtr_port_1 =
(unsigned short __far *) MK_FP( 0x40, 0x8 );
printf( "Port address is %x\n", *bios_prtr_port_1 );
}
.exmp end
.class Intel
.system
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?