Call 94: display current prt1 port setup, Call 95: get number of characters in prt1 buffers – Rockwell Automation 1771-DB BASIC MODULE User Manual

Page 290

Advertising
background image

Chapter
Call Routines 69–127

13

13 -32

Use CALL 94 to display the current PRT1 port configuration on the
terminal screen.

Input and Output Arguments

This routine has no input or output arguments.

Syntax

CALL 94

Return

Example

>CALL 94

COMMUNICATION RATE= 9600

DATA BITS= 8

PARITY= NONE

STOP BITS= 1

HANDSHAKING= SOFTWARE

Use CALL 95 to retrieve the number of characters in either the receive or
transmit buffer of port PRT1.

Input and Output Arguments

This routine has one input and one output argument. The input argument is
the buffer you want to examine:

0 for the transmit buffer
1 for the receive buffer

The output argument is the number of characters.

Syntax

PUSH

buffer selection

CALL 95

POP

number of characters

Example

>1 REM EXAMPLE PROGRAM

>10 PUSH 0 : REM EXAMINES THE TRANSMIT BUFFER

>20 CALL 95

>30 POP X : REM GET THE NUMBER OF CHARACTERS

>40 PRINT “NUMBER OF CHARACTERS IN PRT1 TRANSMIT BUFFER IS

”,X

>50 END

CALL 94: Display Current
PRT1 Port Setup

CALL 95: Get Number of
Characters in PRT1 Buffers

Advertising