Category : C Source Code
Archive   : MSPELL1_.ZIP
Filename : IBMPC.C

 
Output of file : IBMPC.C contained in archive : MSPELL1_.ZIP
/* IBMPC: IBMPC I/O routines for MicroSPELL 1.0
Spell Checker and Corrector

(C)opyright May 1987 by Daniel Lawrence
All Rights Reserved
*/

#include
#include "dopt.h"
#include "dstruct.h"
#include "ddef.h"

#if IBMPC
union REGS rg; /* cpu register for use of DOS calls */

TTopen() /* open the IBM-PC screen */

{
return(TRUE);
}

TTclose() /* close the IBM-PC screen */

{
return(TRUE);
}

TTkopen() /* open the keyboard */

{
return(TRUE);
}

TTkclose() /* close the keyboard */

{
return(TRUE);
}

TTgetc(c) /* get a character from the keyboard */

char c; /* character to print */

{
/* call the dos to get a char */
rg.h.ah = 7; /* dos Direct Console Input call */
intdos(&rg, &rg);
c = rg.h.al; /* grab the char */
return(c & 255);
}

TTputc(c)

char c; /* character to print */

{
bdos(6, c, 0);
}

TTflush() /* flush the I/O (nop) */

{
return(TRUE);
}

TTmove(row, col) /* move cursor to location on screen */


int row, col;

{
rg.h.ah = 2; /* set cursor position function code */
rg.h.dl = col;
rg.h.dh = row;
rg.h.bh = 0; /* set screen page number */
int86(0x10, &rg, &rg);
}

TTbeep() /* ring the bell */

{
TTputc(7);
}

#if 0
#define TTeeol (*term.t_eeol)
#define TTeeop (*term.t_eeop)
#define TTrev (*term.t_rev)
#define TTrez (*term.t_rez)
#if COLOR
#define TTforg (*term.t_setfor)
#define TTbacg (*term.t_setback)
#endif
#endif

#endif


  3 Responses to “Category : C Source Code
Archive   : MSPELL1_.ZIP
Filename : IBMPC.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/