| 1 |
|
| 2 |
|
| 3 |
#include "pdcdos.h" |
| 4 |
|
| 5 |
RCSID("$Id: pdcsetsc.c,v 1.39 2008/07/13 16:08:17 wmcbrine Exp $") |
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
int PDC_curs_set(int visibility) |
| 35 |
{ |
| 36 |
PDCREGS regs; |
| 37 |
int ret_vis, start, end; |
| 38 |
|
| 39 |
PDC_LOG(("PDC_curs_set() - called: visibility=%d\n", visibility)); |
| 40 |
|
| 41 |
ret_vis = SP->visibility; |
| 42 |
SP->visibility = visibility; |
| 43 |
|
| 44 |
switch (visibility) |
| 45 |
{ |
| 46 |
case 0: |
| 47 |
start = 32; |
| 48 |
end = 0; |
| 49 |
break; |
| 50 |
case 2: |
| 51 |
start = 0; |
| 52 |
end = 7; |
| 53 |
break; |
| 54 |
default: |
| 55 |
start = (SP->orig_cursor >> 8) & 0xff; |
| 56 |
end = SP->orig_cursor & 0xff; |
| 57 |
} |
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
regs.h.ah = 0x01; |
| 62 |
regs.h.al = (unsigned char)pdc_scrnmode; |
| 63 |
regs.h.ch = (unsigned char)start; |
| 64 |
regs.h.cl = (unsigned char)end; |
| 65 |
PDCINT(0x10, regs); |
| 66 |
|
| 67 |
return ret_vis; |
| 68 |
} |
| 69 |
|
| 70 |
void PDC_set_title(const char *title) |
| 71 |
{ |
| 72 |
PDC_LOG(("PDC_set_title() - called: <%s>\n", title)); |
| 73 |
} |
| 74 |
|
| 75 |
int PDC_set_blink(bool blinkon) |
| 76 |
{ |
| 77 |
PDCREGS regs; |
| 78 |
|
| 79 |
switch (pdc_adapter) |
| 80 |
{ |
| 81 |
case _EGACOLOR: |
| 82 |
case _EGAMONO: |
| 83 |
case _VGACOLOR: |
| 84 |
case _VGAMONO: |
| 85 |
regs.W.ax = 0x1003; |
| 86 |
regs.W.bx = blinkon; |
| 87 |
|
| 88 |
PDCINT(0x10, regs); |
| 89 |
|
| 90 |
if (pdc_color_started) |
| 91 |
COLORS = blinkon ? 8 : 16; |
| 92 |
|
| 93 |
break; |
| 94 |
default: |
| 95 |
COLORS = 8; |
| 96 |
} |
| 97 |
|
| 98 |
return (COLORS - (blinkon * 8) != 8) ? OK : ERR; |
| 99 |
} |