home *** CD-ROM | disk | FTP | other *** search
- * The source code provided herein remains the property of Rick
- * Spence and Software Design Consultants. You are, however, free to
- * use it, but please do not republish.
-
- * REGS.CH
- *
- * Rick Spence's Clipper header file from the Advnced C presentation,
- * 1900 Devcon
-
- #define NUM_REGS 7
-
- * Array index of each register. These values are important
- * and must not be changed
-
- #define AX 1
- #define BX 2
- #define CX 3
- #define DX 4
- #define SI 5
- #define DI 6
-
- #define GET_HREG(regs, reg_num) (int(regs[reg_num] / 256))
- #define GET_LREG(regs, reg_num) (int(regs[reg_num] % 256))
-
- #define SET_HREG(regs, reg_num, value) regs[reg_num] = ((value) * 256 + GET_LREG(regs, reg_num))
-
- * Same goes for this one
- #define SET_LREG(regs, reg_num, value) regs[reg_num] = ((value) + GET_HREG(regs, reg_num) * 256)