home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / researchmachines.zip / rml480z.c next >
Text File  |  1985-07-11  |  2KB  |  77 lines

  1.  
  2. /*****************************************************************************/
  3.  
  4. /* File K480Z.C - RML 480Z Kermit - Machine-dependent data & routines
  5.         Chris Kennington    5th July 1985.        */
  6.  
  7.  
  8. #include  "stdio.h"
  9. #include  "b:kext.h"
  10.  
  11.  
  12. /* Data which is either machine-dependent or contains text which would
  13.     not be appropriate for the Nimbus version.
  14.    All escape-sequences and general control strings are built into and
  15.     output by assembler-coded routines found in CS4COM.ZSM.        */
  16.  
  17.  
  18. char head1[]    = "  RML 480Z  Kermit  File  Transfer  Program,";
  19.  
  20. char backto[]    = " OK - back to CP/M; ";
  21. char eprompt[]    = "\r\04KmF4> ";
  22. char prompt[]   = "\r\04Km480Z";    /* \04 to unlock screen        */
  23.  
  24.  
  25.  
  26. curset(lin,col)        /* set cursor position        */
  27. char    lin, col;
  28. {
  29.     static  char  msg[] = {0x16, 32, 32, 0};
  30.  
  31.     msg[1] = lin+32;
  32.     msg[2] = col+32;
  33.     txtout(msg);
  34.     return;
  35. }        /* End of curset()            */
  36.  
  37.  
  38.  
  39. fpanel()        /* call front panel        */
  40. {
  41.     jump(0x0013);        /* magic address (ROS)    */
  42.     outc(NL);
  43.     return;
  44. }            /* End of fpanel()        */
  45.  
  46.  
  47.  
  48. unsigned  getram(bytes)        /* get reused memory        */
  49. /* Allocates the memory used by driver code etc. for overwriting */
  50. int    bytes;
  51. {
  52.     extern    unsigned    drivers();
  53.     static    unsigned    base, top;
  54.     static    char    flag = 0;
  55.     unsigned    *six;
  56.     int        ret;
  57.     char    c;
  58.  
  59.     if (flag == 0) {
  60.     base = &drivers;
  61.     six = 0x0006;        /* CP/M => bottom of BDOS    */
  62.     top = *six - 256;
  63.     ++flag;
  64.     }
  65.     ret = base;
  66.     base += bytes;
  67.     if (base < top)
  68.     return(ret);        /* OK            */
  69.     printmsg("Not enough store.");
  70.     kermkill(1);
  71. }            /* End of getram()            */
  72.  
  73.  
  74. /*******************  END of K480Z.C ****************************/
  75.  
  76.  
  77.