|
-.0
32bit 프로그래밍에서는 far 포인터는 의미가 없습니다.
모든 포인터가 32bit 형이기 때문이죠.
참고적으로 far 포인터는 16 비트 세크먼그 먼트 주소 + 16 비트 옵셋으로 구성되는데
이를 염두하여 컨버팅 하시면 되겠습니다.
어떤 부분인지 모르겠지만... 그냥 무시하시면 되겠습니다.
이윤성 님이 쓰신 글 :
: 우연히 도스용 프로그램을 윈도우용으로 바꾸게 되었는데..
: 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);
: }
|