•  Back 
  •  VDI Input 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-Filevsin_mode()
vsm_string()                                                            VDI

Syntax

WORD vsm_string( handle, maxlen, echo, echoxy, str )
WORD handle, maxlen, echo;
WORD *echoxy;
char *str;

Function      vsm_string() retrieves input from the 'string' device.

Opcode        31

Availability  This call is not guaranteed to be available with any driver
              and its use should therefore be restricted.

Parameters    handle specifies a valid workstation handle. This call
              inputs characters from the keyboard into the buffer pointed
              to by str up to (maxlen + 1) characters. If echo is set to
              1, characters are echoed to the screen at the location given
              by the two WORDs pointed to by outxy. If echo is set to 0,
              no echoing is performed.

Binding       WORD i;

              contrl[0] = 31;
              contrl[1] = 1;
              contrl[3] = 2;
              contrl[6] = handle;

              intin[0] = maxlen;
              intin[1] = echo;

              ptsin[0] = echoxy[0];
              ptsin[1] = echoxy[1];

              vdi();

              for(i = 0;i < contrl[4];i++)
               str[i] = (char)intout[i];

              return contrl[4];

Return Value  vsm_string() returns the number of characters actually read.

Caveats       Using this function will confuse the AES.

Comments      Though this binding does not allow for it, if maxlen is
              specified as negative, then as many as ( |maxlen| + 1 )
              characters will be read as keycodes rather than ASCII codes.
              The values in intout will occupy the full WORD rather than
              just the lower eight bits. A custom binding could be used to
              take advantage of this.

See Also      vsin_mode()

Group         VDI Input