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 
    28
      
    AND    logical AND 
    AND performs a bitwise logical AND operation on two numeric values; i.e. each bit of the first operand is ANDed with the 
    equivalent bit in the second operand.  The result of 12 AND 5 is therefore calculated as follows: 
     operand 1 12 = 00000000 00001100 
      operand 2    5 = 00000000 00000101 
     result 4 = 00000000 00000100 
    The most common use of AND is to check whether or not two or more test conditions are true: 
    IF (X = 2) AND (Y=10) THEN ....
    The first stage in evaluating this IF command is to check if X=2.  If it is, then the first operand for AND will be TRUE (1).  If 
    Y=10 is also true then the second operand will also be TRUE (1), and the resulting test will be: 
     operand 1 1 = 00000000 00000001 
     operand 2 1 = 00000000 00000001 
     result 1 = 00000000 00000001 
    Because both operands are TRUE the result is also TRUE and the IF condition is satisfied. 
    Examples: 
    SWITCH(1)=RTS AND CTS
    IF MONTH=1 AND DDAY=1 THEN PRINT New Year!
    IF X>0 AND Y80
    Syntax: 
    [num-var] = [integer] AND [integer]
    See also: 
    EOR, OR, NOT
      
    						
    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    29
      
    ANSWER    answer a call 
    ANSWER is used to make the modem answer a call and is identical to the modem command A (ATA).  The modem will take 
    the line and produce an answer tone, and a carrier or a baud rate scan, as set with the various relevant S-registers. 
    A typical application is when you do not want to make the modem auto-answer, but first want to observe certain conditions 
    e.g.: 
    50 ON RING %test
    .
    200 %TEST
    210 IF DTR#2 ANSWER
    220 RETURN
    On exit the system variable RESULT can be read to determine the status of the modem (CONNECT,  NO CARRIER).  
    When DCD#3 is set, a successful modem connection is made.  This can also be detected by the ON CONNECT event. 
     
    ANSWER can also be used to set the number of rings that is required before the modem will answer an incoming call.  E.g.: 
    ANSWER 3
    A third syntax is ANSWER ON|OFF.  ANSWER ON on is identical to the modem command ATS0=1 and ANSWER
    OFF to ATS0=0. 
    Examples: 
    ON RING ANSWER
    ANSWER = 3
    ANSWER OFF
    Syntax: 
    ANSWER
    ANSWER [num]
    ANSWER ON|OFF
    See also: 
    CONNECT, HANGUP, ON RING, ON CONNECT, ON HANGUP
      
    						
    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    30
      
    ASC    ASCII value 
    ASC returns the ASCII code of its character parameter.  For example: 
    ASCB
    will return the value 66. 
     
    When the parameter is a string of more than one character, the ASCII code for the first character in the string is returned, so 
    that: 
    ASCJohn
    will return the value 74 -- the ASCII code for the letter J. 
    Examples: 
    X=ASC @
    X=ASC X$
    PRINT ASC g
    Char=ASC GET$
    Syntax: 
    [num-var] = ASC[string]
    See also: 
    CHR$
      
    						
    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    31
      
    AT    AT scan 
    AT is used to initiate AT scanning on one or both of the two serial ports.  This is the means by which Hayes compatible 
    modems determine the speed and data format being used by the terminal to which they are attached.  When operating in this 
    mode, the modem will scan the specified ports for incoming data.  The bit pattern produced by the two characters A and T 
    is unique and can be recognized at baud rates from 75 through to 38400 in a variety of data formats.  The advantage of this 
    is that the modem need not be pre-configured for baud rate and data format before connection -- it can determine the 
    appropriate settings when the user first enters AT. 
     
    Note that the number of stop bits cannot be recognized, so that if your terminal is set to 7, Even, 2, the modem will detect the 
    AT and configure the serial port for 7, Even, 1 operation.  Most computers and terminals will not be affected by the missing 
    stop bit, but if you do encounter problems you should set the number of stop bits explicitly, using the SBITS command. 
     
    The modem will successfully AT-detect at the following speeds and data formats: 
     
    75 
     
    4800 150 
     
    9600 300 
     
    14400 600 
     
    19200 1200 
     
    38400 2400 
     
    57600 
     
      7 bits, even parity 
      7 bits, odd parity 
      8 bits, even parity 
      8 bits, odd parity 
      8 bits, no parity 
     
    If no port number is specified, the default input port as defined by IPORT will be assumed. 
      
    						
    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    32
      
    There are four variations of the command: 
    AT (#[port]) (SLASH) ON/OFF 
    This will enable or disable the state of a port, where it is waiting for an AT to be entered.  When AT is entered, the port is re-
    configured.  To respond to the AT entered, you will have to enable and use the ON AT event.  When SLASH is added as 
    an option and the ON SLASH event is enabled, this event can also be generated when a / is received, but then the port is 
    not reconfigured. 
    AT INPUT (#[port]) 
    Will input a line and send it to the modem command line interpreter.  The result of the execution of the command line is 
    returned in the system variable RESULT.  If you want a written output, you can use the command REPORT instead. 
    AT REPEAT 
    Will repeat the last command line sent to the modem. 
    AT [string] 
    Will send the string to the command line interpreter of the modem.  The string itself should not start with AT.  So you will 
    have to enter: 
    AT DT123
    to make the modem dtmf-dial the number 123 from BASIC. Reading the system variable RESULT will return the result of the 
    action taken. 
    Notes 
    When the modem is AT scanning, the complete reception of characters inclusive of ESCAPE is disabled for the selected 
    port; i.e. if port 1 is being scanned, an ESCAPE on port 2 will still be recognized, and vice versa.  These will be reset to their 
    previous values when the AT scan is complete. 
     
    All active background processes including any LINKs, ON TIMEOUT or ON BUTTON functions, remain active during 
    AT scanning. 
     
    After a scan, the baud rate, parity and character length can be read by your program using BAUD, LENGTH, etc. 
     
    Examples: 
    AT#2 ON
    AT SLASH#1 ON
    AT INPUT
    AT REPEAT
    AT DT+Number$
    Syntax: 
    AT (#[port]) (SLASH) ON|OFF
    AT INPUT (#[PORT])
    AT REPEAT 
    						
    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    33
      
    AT [string]
    See also: 
    BAUD, LENGTH, PARITY, SBITS, INPUT AT,
    ON AT,ON SLASH
      
    						
    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    34
      
    AUTO    automatic line numbering 
    AUTO is used during direct programming to enable automatic generation of the next line number each time [Return] is 
    pressed. 
     
    The command has two optional parameters which specify the start line number and the increment. 
     
    When used without parameters, the start line number and increment are both 10, and the sequence of line numbers 
    generated will be 10, 20, 30, etc. 
     
    If a single parameter is used, such as: 
    AUTO 50
    this is taken as the start line number which is incremented by 10, giving the sequence 50, 60, 70, etc. 
     
    When two parameters are given, the first is used as the start line and the second as the line increment.  The following 
    example will generate numbers 100, 105, 110, etc. 
    AUTO 100,5
    The first parameter can be omitted by including a comma before the second: 
    AUTO ,5
    In this case the line numbers generated will be 10, 15, 20, etc. 
     
    If you use AUTO while there is already a program in memory, duplicate lines will be overwritten. 
     
    To cancel auto line numbering you must enter the appropriate ESCAPE character (which is [Ctrl-C] by default), so you 
    should make sure that ESCAPE is enabled. 
    If you forget to enable ESCAPE, the STOP button will also cancel auto line numbering. 
     
    \ added behind AUTO line can be used for remarks.  These remarks will not be stored as part of the program. 
    Examples: 
    AUTO 5,5
    AUTO ,5
    AUTO 100
    Syntax: 
    AUTO ( [integer])(,[integer] )
    See also: 
    RENUM
      
    						
    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    35
      
    BAUD    set baud rate 
    BAUD is used to set or read the communications speed of the specified serial port.  If no port number is specified, the default 
    output port as defined by OPORT will be assumed.  The second parameter is a code which represents the required baud 
    rate according to the following table: 
     
    Code Baud rate 
    0 75 
    1 150 
    2 300 
    3 600 
    4 1200 
    5 2400 
    6 4800 
    7 7200 
    8 9600 
    9 14400 
    10 19200 
    11 38400 
    12 57600 
    13 115200 
     
    One or more port numbers may be specified in a single BAUD command, as in the following example, which sets ports 1, 2 
    and 3 to 2400 baud: 
    BAUD#1#2#3=5
    The baud rate of Port 1 (the main port) can be set at either a positive or negative number.  Setting the baud rate to a 
    negative number will configure the port for synchronous operation.  Using a positive number, will configure the port for 
    asynchronous operation 
     
    When you set the S-register 51 of the modem to 0, the baud rate of the modem port (port #3) will also influence the modem 
    operation.  The modem will only connect to carriers that match the baud rate.  However, any AT-command sent to the 
    modem will override this baud rate setting. 
     
    It is not very practical to set the baud rate on a port if you intend to effect an AT scan on that port directly afterwards - 
    because the AT scan will reconfigure the port.  In this case, either you set the port for a certain baud rate using BAUD; or 
    you carry out an AT scan on the port and read the baud rate that results with BAUD.  For example: 
    Print BAUD#2
    Pressing the RESET button does not affect the baud rate, but does re-initialize serial communication and flush the 
    send/receive buffers. 
    Examples: 
    BAUD 11
    BAUD#1, 12
    BAUD#Port, Rate
    PRINT BAUD
    Syntax: 
    BAUD ( #[integer 1..3],)(#... ,) [integer 1..15]
    See also:  
    						
    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    36
      
    AT, LENGTH, PARITY, SBITS
      
    						
    							ARGUS Programmable Modem 
    BASIC Programmers Reference Manual 
    © 1990 - 1997 Vidicode Datacommunicatie BV 
    37
      
    BOOT ON/OFF    enable/disable BOOT file 
    After every reset, the modem looks for a file BOOT in the RAM/ROM/FLASH- or Hard-disk. 
     
    In case of a RAM-disk in an Argus Programmable Modem, it first looks in socket 1, with the first filing system and if it cannot 
    find it, it will look in socket 2, if there is a ROM/RAM in socket 2. 
     
    If the BOOT file is found, it is loaded in BASIC at PBOT=&3000 and then executed.  It overwrites the ON RESET rules. 
     
    If the BOOT file is not found, the normal ON RESET rules will apply.  With BOOT ON, this feature is enabled. 
     
    With BOOT OFF, the search for the BOOT file is not done after a reset, and the normal ON RESET rules will apply. 
    See also: 
    ON RESET, ROM 
    						
    All Vidicode manuals Comments (0)

    Related Manuals for Vidicode Argus Basic Programmers Reference Manual