Home > Vidicode > Communications System > Vidicode Argus Basic Programmers Reference Manual

Vidicode Argus Basic Programmers Reference Manual

    Download as PDF Print this page Share this page

    Have a look at the manual Vidicode Argus Basic Programmers Reference Manual online for free. It’s possible to download the document as PDF or print. UserManuals.tech offer 9 Vidicode manuals and user’s guides for free. Share the user manual or guide on Facebook, Twitter or Google+.

    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    88
      
    GET    get byte (with wait) 
    GET is used to obtain the next byte from the specified input buffer, and returns an integer between 0 and 255.  Program 
    execution is suspended until data becomes available.  If no port is specified, the default input port as defined by IPORT is 
    assumed. 
    Examples: 
    Code=GET
    Char=GET#1
    REPEAT UNTIL GET=13
    PRINT GET#2
    Syntax: 
    [num-var] = GET ( #[port] )
    See also: 
    GET$, KEY, KEY$
      
    						
    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    89
      
    GET$    get character (with wait) 
    GET$ is used to obtain the next character from the specified input buffer, and returns a 1-character string.  Program 
    execution is suspended until data becomes available.  If no port is specified, the default input port as defined by IPORT is 
    assumed. 
    Examples: 
    Ch$=GET$
    A$=GET#2
    REPEAT UNTIL GET$#2=Y
    PRINT GET$#4
    Syntax: 
    [string-var] = GET$ ( #[port] )
    See also: 
    GET, KEY, KEY$
      
    						
    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    90
      
    GOSUB ... RETURN    jump to subroutine 
    The GOSUB command causes program execution to branch to the specified line number or label.  Execution proceeds from 
    this line until a RETURN command is encountered, at which point execution resumes at the command immediately following 
    the GOSUB.  The section of code executed by the GOSUB is referred to as a subroutine, and may be executed any number 
    of times within the program.  For example: 
    10 PRINT Main program start
    20 GOSUB 500
    30 ...
    400 END
    500 PRINT Now in subroutine
    510 WAIT 5
    520 PRINT Leaving subroutine
    530 RETURN
    In many versions of BASIC, subroutines are referred to by the line number of their first line, as in the example above.  In 
    Argus BASIC however, it is better to make use of the label facility, and precede each subroutine by a label that indicates the 
    function of that routine.  You could then rewrite the example as: 
    10 PRINT Main program start
    20 GOSUB Demo
    30 ...
    400 END
    500 %Demo
    510 PRINT Now in subroutine
    520 WAIT 5
    530 PRINT Leaving subroutine
    540 RETURN
    Proper use of labels can make the main program much easier to read and understand.  The use of % preceding a label with 
    GOSUB is optional.  Thus GOSUB Dial is identical to GOSUB %Dial. 
     
    A subroutine may also be called from within another subroutine, and up to sixteen calls may be nested in this way. 
    Examples: 
    GOSUB 1000
    GOSUB Dial
    Syntax: 
    GOSUB [line-num | label] 
    						
    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    91
      
    See also: 
    ON GOSUB
      
    						
    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    92
      
    GOTO    unconditional jump 
    GOTO causes an unconditional branch to the specified line number or label. 
    Examples: 
    GOTO 70
    GOTO %Check_Password
    Syntax: 
    GOTO [line-num | label]
    See also: 
    ON ... GOTO, GOSUB
      
    						
    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    93
      
    HANDSHAKE    select/enable handshaking 
    HANDSHAKE is used to select the action taken when an input buffer is almost overflowing during receipt of data.  Correct 
    selection of the type of handshaking to be used is necessary to avoid loss of data. 
     
    Each port on the modem has a 256-byte input buffer.  When characters are received at a higher speed than they can be 
    processed, the input buffer will gradually fill.  In order to avoid loss of data due to input buffer overflow, when there are only 5 
    bytes left free in a buffer, the modem will check to see if a handshake protocol has been selected; and if it has will take the 
    appropriate action as follows: 
    RTS/CTS selected: 
    The modem will take CTS low until the input buffer is half empty and then take CTS high again to restart 
    ÿransmission. 
    XON/XOFF selected: 
    The modem will send an XOFF character to the remote system, wait until the input buffer is half empty, and then 
    send an XON character to restart transmission. 
     
    To select the type of handshaking used there are two commands: 
    HANDSHAKE CTS
    and 
    HANDSHAKE XOFF
    which select hardware or software handshaking respectively. 
     
    It is also possible to use both software and hardware handshaking at the same time. Use: 
    HANDSHAKE CTS,XOFF
    A further command is used to disable the previously selected handshaking method: 
    HANDSHAKE OFF
    Each of these commands can specify the appropriate port.  If no port is specified, the default input port as defined by 
    IPORT will be assumed.  Note that the modem will always obey the RTS/CTS handshake protocol on ports defined as 
    outputs. 
    Handshaking via LINKed ports 
    The situation becomes more complex when ports have been connected using a LINK command. 
     
    To visualize this situation, assume that ports 1 and 2 are LINKed, and that the two character streams are crossed; i.e. all 
    characters received by port 1 are sent to the port 2 output buffer, and all characters received by port 2 are sent to the port 1 
    output buffer. 
     
    Assume also that port 1 is operating at a higher baud rate than port 2 (e.g. 9600 vs. 1200).  All characters received via port 1 
    will be re-transmitted via port 2 at a lower speed, so that the output buffer for port 2 will gradually fill up.  When it is almost 
    full, port 1 should take steps to stop the receipt of data by either issuing an XOFF to the connected system, or by taking CTS 
    low.  To ensure that this happens, a further command is used: 
    HANDSHAKE LINK ON
    To summarize, handshake should always be defined for input ports.  Check always whether a linked port can cause the 
    buffers of output ports to overflow.  This is especially important when baud rate conversion is used. 
      
    						
    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    94
      
    The handshake of the input ports has to be set with the HANDSHAKE command.  This is normally HANDSHAKE RTS.  
    When the data stream on a linked port is not to be monitored by a program, then the command HANDSHAKE LINK OFF 
    should be used. 
     
    The HANDSHAKE command may specify one or more port numbers, but if these are omitted, the default port as defined by 
    OPORT will be assumed. 
     
    After the STOP button has been pressed, HANDSHAKE RTS will be set for each port, and HANDSHAKE LINK will be 
    set to OFF. 
     
    Note that the XON and XOFF characters can be configured using the XON and XOFF commands. 
    Examples: 
    HANDSHAKE RTS
    HANDSHAKE#1,#2,XOFF
    HANDSHAKE#3,OFF
    HANDSHAKE LINK OFF
    HANDSHAKE#1,#2,LINK ON
    Syntax: 
    HANDSHAKE #[port] (, #...) CTS|XOFF|OFF
    HANDSHAKE #[port] (, #...) LINK ON|OFF
    See also: 
    LINK, RTS, XOFF, XON
      
    						
    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    95
      
    HANGUP    disconnect a call 
    HANGUP is used to terminate a call and is identical to the command HOOK ON and the modem command AT H0. 
     
    The command itself will not cause an ON HANGUP event. 
     
    HANGUP will also put the modem-chip in sleep-mode, if bit6 in S-register 64 is set (see RESET MODEM 2). 
    Examples: 
    HANGUP
    MATCH#3 ABC , 10 : IF MATCH HANGUP
    Syntax: 
    HANGUP
    See also: 
    ANSWER, CONNECT, ON HANGUP, RESET MODEM 2
      
    						
    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    96
      
    HOOK    hook control 
    HOOK is used to control the modem relay that puts your modem on-line. 
     
    HOOK OFF is the same as the modem command ATH1. 
     
    HOOK ON is the same as the command HANGUP and the the modem command ATH0. 
     
    HOOK on its own can be used to toggle between the two states of the relay. 
    Examples: 
    HOOK
    HOOK OFF
    HOOK ON
    Syntax: 
    HOOK (ON|OFF)
      
    						
    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    97
      
    HOUR    read/set hour of day 
    HOUR is used to read or set the hour of day on the internal clock/calendar. 
     
    The clock uses the 24 hour system, so that when reading, HOUR will return an integer from 0 to 23. 
     
    Similarly, when setting, the hour number from 1 to 23 must be specified; an incorrect value will cause the current setting to 
    remain unchanged. 
    Examples: 
    HOUR=14
    IF HOUR > 12 THEN D$=PM ELSE D$=AM
    PRINT HOUR
    Syntax: 
    HOUR = [integer 0..23]
    [num-var] = HOUR
    See also: 
    CLOCK$, MIN, SEC, TIME$
      
    						
    All Vidicode manuals Comments (0)

    Related Manuals for Vidicode Argus Basic Programmers Reference Manual