/* * display.h -- PC/AT display routine * * Copyright (C) 1997 by Sony Computer Entertainment * All rights Reserved */ #include #include #include #include #include "display.h" static char cprintbuf[1000]; void dispch(int cdata) { char chdata; chdata = (char)cdata; /* __asm { mov ah,6 mov dl,chdata int 21h }*/ putchar(chdata); } void disps(char *string) { /* char chdata; while( *string ) { chdata = *string++; __asm { mov ah,6 mov dl,chdata int 21h } } */ printf("%s", string); } void dispf(va_alist) va_dcl { va_list args; char *fmt; va_start(args); fmt = va_arg(args, char *); (void)vsprintf(cprintbuf, fmt, args); disps(cprintbuf); va_end(args); } /********************************************************************** **********************************************************************/ #ifndef PC98 void setcursor_type(int curtype) { /*__asm { mov ah, 1 mov cx, curtype int 10h }*/ } int getcursor_type() { /*__asm { mov bh, 0 mov ah, 3 int 10h mov ax,cx }*/ return 1; } /********************************************************************** **********************************************************************/ #else static long rcurtype = CURSOR_BOX; static unsigned char scrpt[4][3] = { { 0x93,0x00,0x9b }, { 0x93,0x10,0x8b }, /* for 20 lines */ { 0x8f,0x00,0x7b }, { 0x8f,0x0e,0x7b }, /* for 25 lines */ }; void _delay( int n ) { volatile int i; for( i=0; i