home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / TP_ADV.ZIP / LIST0405.C < prev    next >
Encoding:
C/C++ Source or Header  |  1989-07-31  |  575 b   |  15 lines

  1. /* SAVE THIS FILE AS SAVESIDI.H                              */
  2. /*                                                           */
  3. /* Header file to define a save and restore macro for the SI */
  4. /* and DI registers.  For use when a TC module is compiled   */
  5. /* with the -r directive, and the module is to be linked to  */
  6. /* a Turbo Pascal program.                                   */
  7.  
  8. typedef unsigned int WORD;
  9.  
  10. #define save_sidi {extern WORD far *_rsp; *_rsp++ = _SI; *_rsp++
  11. = _DI;}
  12. #define rest_sidi {extern WORD far *_rsp; _DI = *--_rsp; _SI =
  13. *--_rsp;}
  14.  
  15.