|
우연히 도스용 프로그램을 윈도우용으로 바꾸게 되었는데..
FP_SEG ,FP_OFF 이거 변환 부분에서 막히네요..
이걸 윈도우용으로 바꿀려면 어떻게 바꾸어야 할지 조언 부탁 드립니다.
FP_SEG() 에 대해서 찾아 보았습니다.
FP_SEG() Get or Set Segment Portion of a Far Pointer (Macro)
#include <dos.h>
unsigned FP_SEG(longptr);
void far *longptr; Long pointer to memory address
FP_SEG() gets or sets the segment portion of the far pointer
'longptr'.
Returns: An unsigned integer representing a segment address.
Notes: FP_SEG() is a macro.
Portability: MS-DOS only.
-------------------------------- Example ---------------------------------
The following example gets the segment and offset portion of a far
pointer and increments the offset by one.
#include <dos.h>
char far *ptr;
unsigned int seg_val, off_val;
main()
{
seg_val = FP_SEG(ptr);
off_val = FP_OFF(ptr);
FP_OFF(ptr) = ++off_val;
printf("%04x:%04x",seg_val,off_val);
}
|