8 static void hFillRect(
int x1,
int y1,
int x2,
int y2 )
13 int chars = (x2 - x1 + 1) * (y2 - y1 + 1);
26 __dpmi_int(0x10, ®s);
34 if( (x2 - x1 + 1) == cols )
36 unsigned short *
buffer = alloca( chars *
sizeof(
short ) );
38 for( i = 0, buffer += chars; i < chars; ++i )
39 *--buffer = attr | 0x20;
41 _movedataw( _my_ds(), (
int)buffer,
42 _dos_ds, physAddr + (cols << 1) * y1,
48 unsigned short *
buffer = alloca( chars *
sizeof(
short ) );
50 for( i = 0, buffer += chars; i < chars; ++i )
51 *--buffer = attr | 0x20;
53 for( i = y1; i < y2; i++ )
54 _movedataw( _my_ds(), (
int)buffer,
55 _dos_ds, physAddr + (cols << 1) * i + (x1 << 1),
61 static void hMoveRect(
int x1,
int y1,
int x2,
int y2,
int nrows )
66 int chars = (x2 - x1 + 1) * (y2 - y1 + 1 - nrows);
75 if( (x2 - x1 + 1) == cols )
77 _movedataw( _dos_ds, physAddr + (cols << 1) * (y1+nrows),
78 _dos_ds, physAddr + (cols << 1) * y1,
85 for( i = y1; i < y2 - nrows; i++ )
86 _movedataw( _dos_ds, physAddr + (cols << 1) * (i+1) + (x1 << 1),
87 _dos_ds, physAddr + (cols << 1) * i + (x1 << 1),
116 regs.h.cl = (
unsigned char) x1;
117 regs.h.ch = (
unsigned char) y1;
118 regs.h.dl = (
unsigned char) x2;
119 regs.h.dh = (
unsigned char) y2;
122 regs.x.ax = (
unsigned short) (0x0600 + nrows);
124 regs.x.ax = (
unsigned short) (0x0700 + -nrows);
126 __dpmi_int(0x10, ®s);
138 if( nrows <= -rows || nrows >= rows )
146 }
else if( nrows < 0 ) {