Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Telix/SALT v3.15 & RS-232, Hayes - <b>pstra</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  PSTRA

  .  Summary

  pstra(str <s>, int <color>);

  .  Description

  The pstra (Print STRing with color Attribute) function is used to
  print a string to the screen, similar to the prints/printsc func-
  tions. This function is much faster however, and should be used when
  speed is important. As well, it allows a color to be specified for
  the text. <s> will be printed to the screen at the current cursor
  position using a color as specified by <color>.

  The pstraxy function is similar to the above, but allows you to
  specify where to print the string. The string is printed at <x>,<y>,
  with 0,0 being the upper left corner of the screen.

  Note that prints goes through a basic TTY type terminal emulator, so
  strings printed using it may contain the basic cursor control code,
  while pstra writes directly to the screen, ignoring these sequences.
  Anything written with pstra will NOT appear in the scrollback buffer.

  Possible colors are numbered as follows:

                      Black          00
                      Blue           01
                      Green          02
                      Cyan           03
                      Red            04
                      Magenta        05
                      Brown          06
                      Light Grey     07
                      Dark Grey      08
                      Light Blue     09
                      Light Green    10
                      Light Cyan     11
                      Light Red      12
                      Light Magenta  13
                      Yellow         14
                      White          15

  To obtain a color attribute value for a color combination, the for-
  mula is

       color attribute value =

             foreground color value + (16 * background color value)

  Therefore, a Yellow character on a Blue background would have a
  color attribute value of 30 (14 + (16 * 1)).

  .  Return Value

  None.

  .  Example

  pstra("Enter name:", 112);   // print in inverse text

See Also: prints printsc pstraxy color chart

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson