发现TC3的帮助一页内竟然有三个错误!
这一页的编辑者也太马虎了!
捱哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌哌咻
?FP_OFF, FP_SEG, and MK_FP macros ?<DOS.H>
捃苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘苘茌
?FP_OFF gets a far address offset
?FP_SEG gets a far address segment
?MK_FP makes a far pointer
Declaration:
?unsigned FP_OFF(void far *p);
?unsigned FP_SEG(void far *p);
?void far *MK_FP(unsigned seg, unsigned ofs);
Remarks:
FP_OFF is a macro that can get or set the offset of the far pointer *p. // 没有 set 功能
FP_SEG is a macro that gets or sets the segment value of the far pointer *p. // 没有 set 功能
MK_FP is a macro that makes a far pointer from its component segment (seg)
and offset (ofs) parts.
Return Value:
?FP_OFF returns an unsigned integer value representing an offset value.
?FP_SEG returns an unsigned integer representing a segment value.
?MK_FP returns a far pointer.
Portability:
?DOS ?UNIX ?ANSI C ?C++ Only ?
?Yes ? ? ? ?
韧屯屯贤屯屯拖屯屯屯屯贤屯屯屯屯图
See Also:
movedata segread
Example (for all three macros): // 说是三个,但却只说了两个例子
#include <stdio.h>
#include <dos.h>
main()
{
char *str = "Hello\n";
printf("The address pointed to by str is %04X:%04X\n",
FP_SEG(str), FP_OFF(str));
printf("The address of str is %04X:%04X\n", FP_SEG(&str), FP_OFF(&str));
return 0;