home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / simtel / sigm / vols000 / vol024 / cursor.lib < prev    next >
Text File  |  1984-04-29  |  1KB  |  34 lines

  1. (*****************************************************
  2. *    LIBRARY CURSOR CONTROL SUBROUTINE
  3. *        written by Charlie Foster,Dec 80
  4. ******************************************************)
  5.  
  6. PROCEDURE CURSOR (X,Y : INTEGER; Z : CHAR );
  7. (*This subroutine is designed to input the proper series
  8. of characters to the SD SALES Video Board 8024 to give
  9. XY Cursor. It needs ESC=XYZ where Z=character to print.
  10. It has a offset to worry about so this subroutine needs
  11. to take care everything. X=row, Y=column, Z=character  *)
  12.  
  13. VAR
  14.             CODE : STRING 5;    (*gets output to video*)
  15.   C1,C2,C3,C4,C5 : CHAR;    (*elements of CODE*)
  16.  
  17. BEGIN
  18.     Y := Y + 31;        (*add offset*)
  19.     X := X + 31;        (*add offset*)
  20.     C1 := CHR(27);        (*ESC character*)
  21.     C2 := CHR(61);        (* = character*)
  22.     C3 := CHR(X);        (*integer*)
  23.     C4 := CHR(Y);        (*integer*)
  24.     C5 := Z;        (*any ASCII character*)
  25.     CODE := C1;        (*string it all togeather*)
  26.     APPEND(CODE,C2);
  27.     APPEND(CODE,C3);
  28.     APPEND(CODE,C4);
  29.     WRITE(CODE);        (*write position to Video*)
  30.     WRITE(C5);        (*can call anything here*)
  31. END;
  32.  
  33.  
  34.