home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l200 / 6.ddi / LIB / MODEL.C < prev    next >
Encoding:
C/C++ Source or Header  |  1986-09-18  |  595 b   |  38 lines

  1. /* model - memory model dependent code for 8086/88 machines
  2.  
  3.     Copyright (c) 1984 by JMI Software Consultants, Inc.
  4. */
  5.  
  6.  
  7. #include "acom.h"
  8. #include "host.h"
  9.  
  10. #define BIG
  11. #ifdef BIG
  12. /* split a pointer into a segment and offset values */
  13.  
  14. VOID ptr_split(ptro, ptrs, pseg, poff)
  15.     BYTES ptro, ptrs;
  16.     BYTES *pseg, *poff;
  17.     {
  18.  
  19.     *poff = ptro;
  20.     *pseg = ptrs;
  21.     }
  22.  
  23. #else
  24. /* split a pointer into a segment and offset values */
  25.  
  26. VOID ptr_split(ptr, pseg, poff)
  27.     TEXT *ptr;
  28.     BYTES *pseg, *poff;
  29.     {
  30.     SEGREG seg;
  31.  
  32.     segread(&seg);
  33.     *pseg = seg.s_ds;
  34.     *poff = ptr;
  35.     }
  36.  
  37. #endif
  38.