gthtrkflfx, російська. | Здесь карта харьковской области. |

COMTEST - 3


case 48: b = 2400; break;

case 24: b = 4800; break;

case 12: b = 9600; break;

case 6: b = 19200; break;

case 3: b = 38400; break;

case 2: b = 57600; break;

case 1: b = 115200; break;

default: b=0; break;

}

mode->baud = b;

//

outp(0x3fb - 0x100 * port, mode->ctl_aux.ctl & 0x7f);

}

/**

*.Name aux_init

*.Title

*

*.Descr

* ,

*

*

*.Proto int aux_init(AUX_MODE *mode, int port,

* int imask);

*

*.Params AUX_MODE *mode - ,

*

* ;

*

* int port - :

* 0 - COM1, 1 - COM2

*

* int imask -

*

*

*.Return 0 - ;

* 1 - .

**/

int aux_init(AUX_MODE *mode, int port, int imask)

{

unsigned div;

char ctl;

//

switch (mode->baud)

{

case 110: div = 1040; break;

case 150: div = 768; break;

case 300: div = 384; break;

case 600: div = 192; break;

case 1200: div = 96; break;

case 2400: div = 48; break;

case 4800: div = 24; break;

case 9600: div = 12; break;

case 19200: div = 6; break;

case 38400: div = 3; break;

case 57600: div = 2; break;

case 115200: div =1; break;

default:

return(-1); break;

}

//

ctl = inp(0x3fb - 0x100 * port);

outp(0x3fb - 0x100 * port, ctl | 0x80);

outp(0x3f9 - 0x100 * port, (div >> 8) & 0x00ff);