home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Magic 1995 #1 / CDM_5.ISO / shell / graph / ansi / printans.inf < prev    next >
Encoding:
Text File  |  1992-05-08  |  1.4 KB  |  41 lines

  1. Date: 19 Mar 92  23:26:00     From: Joe Fischer
  2. To:   Michael Arnett          Subj: ANSI CONSOLE DEVICE WRITES
  3.  
  4. Hi:
  5.      I guess maybe my message about Ansi Console device
  6. writes in BASIC and Pascal passed yours on another network.
  7.     The Console needs to be opened as a device to write
  8. Ansi through DOS ANSI.SYS in most languages because the
  9. high level languages usually do direct screen writes
  10. for speed.
  11.    The name Mnemonic for Console may be different even
  12. in different versions of the same language.
  13.     Here is a sample program in BASIC if any echo users
  14. want to try it, but the word "CONS:" may have to be
  15. changed according to the manual for the version being
  16. used.
  17.  
  18. 10 CLS
  19. 20 OPEN "CONS:" AS #1
  20. 30 A$ = CHR$(27) + "[34m   Does it work?"
  21. 40 PRINT #1, A$
  22. 60 A$ = CHR$(27) + "[32m   Does it work?"
  23. 70 PRINT #1, A$
  24. 80 A$ = CHR$(27) + "[36;43;1m   Does it work?"
  25. 85 PRINT #1, A$
  26. 90 A$ = CHR$(27) + "[20;40H IT DOES work?"
  27. 99 PINT #1, A$
  28. 100 PRINT:PRINT:PRINT
  29. 120 A$ = CHR$(27) + "[37;40;0m   Yes, it works!!!!!!!!"
  30. 160 PRINT #1, A$
  31.  
  32.      The same thing works in Pascal 4.0 and up using
  33. the word CON instead of CONS: but in Turbo Pascal 3.0
  34. a compiler directive {$P } must be inserted in the
  35. line above Program [name];
  36.     I hope everyone has fun with this,
  37.  
  38. Joe Fischer
  39.  
  40. .ORIGIN: 001/030 - ░░▒▒▓█ THE GAVEL █▓▒▒░░ * RES IPSA * HST-DS * HOUSTON
  41.