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>vgetchrsa</b> <u>introduced: v3.12</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  VGETCHRSA                             Introduced: v3.12

  .  Summary

  vgetchrsa(int <x>, int <y>, str <buf>, int <pos>, int <num>);

  .  Description

  The vgetchrsa function is used to read multiple characters starting
  from a spot on the screen into a specified variable.  Vgetchrsa
  saves both the characters and color attributes (a series of double
  bytes). <x>,<y> is the spot on the screen to start reading characters.
  <buf> is the string variable to put characters into, starting at an
  offset of <pos> in the variable. Note that each character read in with
  vgetchrsa will take up two bytes in the string variable, since the
  color attribute is also saved. Note also that this function does not
  put a 0 (NULL, or end of string character) at the end of the sequence
  of characters it grabs. If the characters returned by vgetchrsa are to
  be manipulated as a string a 0 must be added at the end with the setchr
  function.

  .  Return Value

  None.

  .  Example

  // copy a 20 by 10 grid of characters with a left hand corner of
  // 10,5 to 40,7, and keep color attributes
  str buffer[400];   // 20 wide * 10 tall * 2 bytes per character
  int y;
  for (y = 5; y < 15; y = y+1)         // read chars in a loop
   vgetchrsa(10, y, buffer, 2 * 20 * (y - 5), 20);
  for (y = 7; y < 17; y = y+1)         // now write them in a loop
   vputchrs(10, y, buffer, 2 * 20 * (y - 7), 20);

See Also: vgetchr color chart ASCII table vgetchrs vputchrs vputchrsa

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