diff --git a/dos/pdcdisp.c b/dos/pdcdisp.c index 4d9583b0..813888f5 100644 --- a/dos/pdcdisp.c +++ b/dos/pdcdisp.c @@ -15,7 +15,7 @@ #include -RCSID("$Id: pdcdisp.c,v 1.54 2006/10/15 02:42:25 wmcbrine Exp $"); +RCSID("$Id: pdcdisp.c,v 1.55 2006/10/18 22:35:11 wmcbrine Exp $"); #ifdef __PACIFIC__ void movedata(unsigned sseg, unsigned soff, unsigned dseg, @@ -82,11 +82,7 @@ static void PDC_putc(chtype ch, unsigned short count) regs.h.al = (unsigned char) (ch & 0xff); regs.h.bh = 0; regs.h.bl = chtype_attr(ch); -#ifdef __WATCOMC__ - regs.w.cx = count; -#else - regs.x.cx = count; -#endif + regs.W.cx = count; PDCINT(0x10, regs); } diff --git a/dos/pdcdos.h b/dos/pdcdos.h index abcbec13..4f8a8091 100644 --- a/dos/pdcdos.h +++ b/dos/pdcdos.h @@ -11,7 +11,7 @@ * See the file maintain.er for details of the current maintainer. * ************************************************************************/ -/* $Id: pdcdos.h,v 1.18 2006/10/15 02:42:25 wmcbrine Exp $ */ +/* $Id: pdcdos.h,v 1.19 2006/10/18 22:35:11 wmcbrine Exp $ */ #include @@ -119,6 +119,13 @@ void setdosmemword(int offs, unsigned short w); # endif #endif +/* Wide registers in REGS: w or x? */ +#ifdef __WATCOMC__ +# define W w +#else +# define W x +#endif + /* Monitor (terminal) type information */ enum { diff --git a/dos/pdckbd.c b/dos/pdckbd.c index e0b545b9..0d57964f 100644 --- a/dos/pdckbd.c +++ b/dos/pdckbd.c @@ -19,7 +19,7 @@ #include "pdcdos.h" -RCSID("$Id: pdckbd.c,v 1.41 2006/10/15 02:42:25 wmcbrine Exp $"); +RCSID("$Id: pdckbd.c,v 1.42 2006/10/18 22:35:11 wmcbrine Exp $"); /************************************************************************ * Table for key code translation of function keys in keypad mode * @@ -355,8 +355,8 @@ int PDC_set_ctrl_break(bool setting) setcbrk(setting); #else regs.h.ah = 0x33; - regs.h.al = 0x00; - regs.h.dl = (unsigned char) (setting ? 1 : 0); + regs.h.al = 0x01; + regs.h.dl = setting; PDCINT(0x21, regs); #endif return OK; diff --git a/dos/pdcscrn.c b/dos/pdcscrn.c index 11906835..cbaad9f3 100644 --- a/dos/pdcscrn.c +++ b/dos/pdcscrn.c @@ -20,7 +20,7 @@ # include #endif -RCSID("$Id: pdcscrn.c,v 1.63 2006/10/15 02:42:25 wmcbrine Exp $"); +RCSID("$Id: pdcscrn.c,v 1.64 2006/10/18 22:35:11 wmcbrine Exp $"); int pdc_adapter; /* screen type */ int pdc_scrnmode; /* default screen mode */ @@ -111,14 +111,12 @@ static void _set_font(int size) switch (size) { case _FONT8: - regs.h.ah = 0x11; - regs.h.al = 0x12; + regs.W.ax = 0x1112; regs.h.bl = 0x00; PDCINT(0x10, regs); break; case _FONT14: - regs.h.ah = 0x11; - regs.h.al = 0x11; + regs.W.ax = 0x1111; regs.h.bl = 0x00; PDCINT(0x10, regs); } @@ -132,20 +130,17 @@ static void _set_font(int size) switch (size) { case _FONT8: - regs.h.ah = 0x11; - regs.h.al = 0x12; + regs.W.ax = 0x1112; regs.h.bl = 0x00; PDCINT(0x10, regs); break; case _FONT14: - regs.h.ah = 0x11; - regs.h.al = 0x11; + regs.W.ax = 0x1111; regs.h.bl = 0x00; PDCINT(0x10, regs); break; case _FONT16: - regs.h.ah = 0x11; - regs.h.al = 0x14; + regs.W.ax = 0x1114; regs.h.bl = 0x00; PDCINT(0x10, regs); } @@ -297,8 +292,7 @@ static int _query_adapter_type(void) /* attempt to call VGA Identify Adapter Function */ - regs.h.ah = 0x1a; - regs.h.al = 0; + regs.W.ax = 0x1a00; PDCINT(0x10, regs); if ((regs.h.al == 0x1a) && (retval == _NONE)) @@ -350,11 +344,7 @@ static int _query_adapter_type(void) bx == 0x0010 --> return EGA information */ regs.h.ah = 0x12; -# ifdef __WATCOMC__ - regs.w.bx = 0x10; -# else - regs.x.bx = 0x10; -# endif + regs.W.bx = 0x10; PDCINT(0x10, regs); if ((regs.h.bl != 0x10) && (retval == _NONE)) @@ -714,8 +704,7 @@ static int _egapal(int color) { PDCREGS regs; - regs.h.ah = 0x10; - regs.h.al = 0x07; + regs.W.ax = 0x1007; regs.h.bl = color; PDCINT(0x10, regs); @@ -736,8 +725,7 @@ int PDC_color_content(short color, short *red, short *green, short *blue) /* Read single DAC register */ - regs.h.ah = 0x10; - regs.h.al = 0x15; + regs.W.ax = 0x1015; regs.h.bl = _egapal(color); PDCINT(0x10, regs); @@ -763,10 +751,8 @@ int PDC_init_color(short color, short red, short green, short blue) /* Set single DAC register */ - regs.h.ah = 0x10; - regs.h.al = 0x10; - regs.h.bh = 0; - regs.h.bl = _egapal(color); + regs.W.ax = 0x1010; + regs.W.bx = _egapal(color); PDCINT(0x10, regs); diff --git a/dos/pdcsetsc.c b/dos/pdcsetsc.c index 957fa459..37f447b6 100644 --- a/dos/pdcsetsc.c +++ b/dos/pdcsetsc.c @@ -13,7 +13,7 @@ #include "pdcdos.h" -RCSID("$Id: pdcsetsc.c,v 1.31 2006/10/15 02:42:25 wmcbrine Exp $"); +RCSID("$Id: pdcsetsc.c,v 1.32 2006/10/18 22:35:11 wmcbrine Exp $"); int PDC_curs_set(int visibility) { @@ -82,10 +82,8 @@ int PDC_set_blink(bool blinkon) case _EGAMONO: case _VGACOLOR: case _VGAMONO: - regs.h.ah = 0x10; - regs.h.al = 0x03; - regs.h.bh = 0; - regs.h.bl = blinkon; + regs.W.ax = 0x1003; + regs.W.bx = blinkon; PDCINT(0x10, regs);