Call 120: clear basic module i/ o buffers, Call 121 – Rockwell Automation 1771-DB BASIC MODULE User Manual
Page 315

Chapter
Call Routines 69–127
13
13 -57
Use this call to clear the BASIC module input and output buffers.
Input and Output Arguments
This routine has one input argument and no output arguments. The input
argument is an 8-bit word that corresponds to the BASIC module input and
output buffers shown here:
Bit
Decimal equivalent
BASIC module input and output buffer area
0
not used
1
not used
2
4
PLC BTW buffer
3
8
PLC BTR buffer
4
16
reserved
5
32
reserved
6
not used
7
not used
You must PUSH the decimal equivalent of the areas of the input and output
buffers that you want to clear. For example to clear the BTW and BTR
buffers you would push the value “12”. The BASIC module sets bits 2 and
3 true and clears the BTW and BTR buffers.
Important: CALL 120 does not clear the block-transfer buffers for
background operations (CALLs 33, 34, 49, 50, 118, 122, and 123).
The standard block-transfer buffers are cleared using the bits defined
above.
Syntax
PUSH
clear BTW and BTR buffers
CALL 120
Example
>1 REM EXAMPLE PROGRAM
>10 PUSH 12 :REM CLEAR BTW AND BTR BUFFERS
>20 CALL 120
>30 END
Undefined. If you execute an undefined call, you receive the error
message, “
ERROR–UNSUPPORTED CALL
.”
CALL 120: Clear BASIC
Module I/O Buffers
CALL 121