home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
archives
/
researchmachines.zip
/
rmlnim.c
< prev
next >
Wrap
Text File
|
1985-07-11
|
4KB
|
175 lines
/*****************************************************************************/
/* File KNIMB.C - RML Nimbus Kermit - Machine-dependent data & routines
Chris Kennington 5th July 1985. */
#include "stdio.h"
#include "b:kext.h"
/* Data which is either machine-dependent or contains text which would
not be appropriate for the 480Z version. */
char head1[] = " RM NIMBUS Kermit File Transfer Program,";
char prompt[] = "\rKmNimbus";
char eprompt[] = "\rKmF4> ";
char backto[] = " OK - back to MSDOS; ";
static char keyc[] = { /* assigned arrow values for CONN */
ESC,"[0;72;\"\013\"p", /* uparrow = UP */
ESC,"[0;80;10p", /* downarrow = DOWN (LF)*/
ESC,"[0;77;24p", /* rightarrow = FWD */
ESC,"[0;75;\"\010\"p", /* leftarrow = BKSP */
ESC,"[0;116;24p", /* c/rightarrow = FWD */
ESC,"[0;115;\"\010\"p", /* c/leftarrow = BKSP */
ESC,"[0;83;\"\177\"p", /* DEL = 0x7f */
ESC,"[6;1;25;80~B", /* scroll lines 6-25 */
ESC,"[25;1f", /* cursor bottom left */
ESC,"[0;0;0;;1~A", /* & remove it */
0xff};
static char keys[] = { /* assigned arrow-pad values */
/* all assigned letters with top bit set - (nulls deleted) */
ESC,"[156;96p", /* pound = backquote */
ESC,"[0;72;\"\325\"p", /* uparrow = U */
ESC,"[0;80;\"\304\"p", /* downarrow = D */
ESC,"[0;77;\"\322\"p", /* rightarrow = R */
ESC,"[0;75;\"\314\"p", /* leftarrow = L */
ESC,"[0;73;\"\302\"p", /* PG UP = B */
ESC,"[0;79;\"\316\"p", /* END = N */
ESC,"[0;81;\"\316\"p", /* PG DN = N */
ESC,"[0;83;\"\177\"p", /* DEL = 0x7f */
ESC,"[0;59;\"\302\"p", /* F1 = B */
ESC,"[0;60;09p", /* F2 = TAB */
ESC,"[0;61;\"\316\"p", /* F3 = N */
ESC,"[0;62;\"\233\"p", /* F4 = ESC */
ESC,"[0;63;96p", /* F5 = ` (back-quote) */
ESC,"[0;64;\"\233S\"p", /* F6 = ESC S */
ESC,"[0;65;\"\233R\"p", /* F7 = ESC R */
ESC,"[0;66;\"\233Q\"p", /* F8 = ESC Q */
ESC,"[0;67;\"\233K\"p", /* F9 = ESC K */
ESC,"[0;68;\"\233B\"p", /* F10 = Break */
ESC,"[6;1;25;80~B", /* scroll lines 6-25 */
ESC,"[25;1f", /* cursor bottom left */
ESC,"[0;0;0;;1~A", /* & remove it */
0xff};
static char keyr[] = {
ESC,'c', /* R.I.S. */
ESC,"[0;59;p", /* F1 */
ESC,"[0;60;p", /* F2 */
ESC,"[0;61;p", /* F3 */
ESC,"[0;62;p", /* F4 */
ESC,"[0;63;p", /* F5 */
ESC,"[0;64;p", /* F6 */
ESC,"[0;65;p", /* F7 */
ESC,"[0;66;p", /* F8 */
ESC,"[0;67;p", /* F9 */
ESC,"[0;68;p", /* F10 */
"Returned to MSDOS. ",
0xff};
cpmgo()
{
exit();
}
fpanel()
{
txtout("Front-Panel not yet implemented\r");
return;
} /* end of fpanel() */
unsigned getram(n) /* allocate store */
int n; /* # of bytes */
{
char *addr;
if ( (addr = malloc(n)) != 0 )
return(addr);
txtout("\rUnable to allocate buffers.\r");
cpmgo();
} /* end of getram() */
char kbdin() /* char or not from keyboard */
{
char c;
c = bdos(0x06,0xff,0);
return(c);
} /* end of kbdin() */
keyconn() /* set up keypad for CONN mode */
{
CHAR c;
int i;
i = 0;
while ( (c = keyc[i++]) != 0xff ) {
if (c != 0)
putchar(c);
}
} /* end of keyconn() */
keyinit() /* initialize keyboard & screen */
{
CHAR c;
int i;
static char done = 0;
i = 0; /* keyboard initialization */
while ( (c = keys[i++]) != 0xff ) {
if (c != 0)
putchar(c);
}
if (done == 0) { /* screen init once only */
init_screen();
++done;
for (i=0; i<(256*25); i+=256)
vtline(i,blanx);
}
return;
} /* end if keyinit() */
keyrest() /* restore keyboard & screen */
{
CHAR c;
int i;
i = 0; /* keyboard restoration */
while ( (c = keyr[i++]) != 0xff ) {
if (c != 0)
putchar(c);
}
return;
} /* end of keyrest() */
netcool()
{
return;
}
/************ End of File, KNIMB.C ***********************************/