/**************************************************************************
**************************************************************************/
#define NO_SWITCH /* saves space */
/**************************************************************************
**************************************************************************/
putchar(tiddles
[(count
++)&3]);
/**************************************************************************
**************************************************************************/
/**************************************************************************
**************************************************************************/
/**************************************************************************
**************************************************************************/
if (*(d
++) != *(s
++)) return(0);
/**************************************************************************
**************************************************************************/
if (*fmt
== '%') { /* switch() uses more space */
putchar(*(dp
++) & 0x00FF);
while (*p
) putchar(*p
++);
/**************************************************************************
PRINTDEC - Print a number in decimal
**************************************************************************/
while ((--p
) >= buf
) putchar(*p
);
if (n
/100) *(p
++) = '0' + (n
/100);
if (n
/10) *(p
++) = '0' + ((n
/10) % 10);
/**************************************************************************
PRINTDEC - Print a number in decimal
**************************************************************************/
static char hex
[]="0123456789ABCDEF";
putchar(hex
[(h
>>4)& 0x0F]);
/**************************************************************************
PRINTIP - Print an IP address in x.x.x.x notation
**************************************************************************/
printdec((i
>>24) & 0x0FF);
printdec((i
>>16) & 0x0FF);
printdec((i
>>8) & 0x0FF);
/**************************************************************************
SETIP - Convert an ascii x.x.x.x to binary form
**************************************************************************/
if (((val
= getdec(&p
)) < 0) || (val
> 255)) return(0);
if (*p
!= '.') return(0);
if (((val
= getdec(&p
)) < 0) || (val
> 255)) return(0);
if (*p
!= '.') return(0);
if (((val
= getdec(&p
)) < 0) || (val
> 255)) return(0);
if (*p
!= '.') return(0);
if (((val
= getdec(&p
)) < 0) || (val
> 255)) return(0);
if ((*p
< '0') || (*p
> '9')) return(-1);
while ((*p
>= '0') && (*p
<= '9')) {
ret
= ret
*10 + (*p
- '0');
#define K_RDWR 0x60 /* keyboard data & cmds (read/write) */
#define K_STATUS 0x64 /* keyboard status */
#define K_CMD 0x64 /* keybd ctlr command (write-only) */
#define K_OBUF_FUL 0x01 /* output buffer full */
#define K_IBUF_FUL 0x02 /* input buffer full */
#define KC_CMD_WIN 0xd0 /* read output port */
#define KC_CMD_WOUT 0xd1 /* write output port */
#define KB_A20 0x9f /* enable A20,
enable output buffer full interrupt
* Gate A20 for high memory
unsigned char x_20
= KB_A20
;
while (inb(K_STATUS
) & K_IBUF_FUL
);
while (inb(K_STATUS
) & K_OBUF_FUL
)
outb(K_CMD
, KC_CMD_WOUT
);
while (inb(K_STATUS
) & K_IBUF_FUL
);
while (inb(K_STATUS
) & K_IBUF_FUL
);