Rockwell Automation 1771-DB BASIC MODULE User Manual
Page 308

Chapter
Call Routines 69–127
13
13 -50
Use this call to execute a user generated assembly language routine.
This call performs some preliminary checks. If all the checks pass, then
the user generated code is executed.
Input and Output Arguments
The number of input and output arguments are user defined. There must
be at least one input argument. The last input argument must be the
absolute address of the first byte of the header which precedes the routine.
The user generated assembly language code must be preceded by a four
byte header and followed by a two byte footer:
first header byte
must be a AAH
second header byte
must be a 55H
third header byte
absolute address of the first byte of footer
fourth header byte
absolute address of the first byte of footer
first footer byte
must be a 55H
second footer byte
must be a AAH
If any of the checks fail, then the stack is cleared, an error message is
printed to the program port and the BASIC code execution stops.
Important: Programming the BASIC module with assembly language is
extremely difficult and complex. Allen-Bradley does not support assembly
language programming with the BASIC module. We recommend you
instead use the C tool kit and C compiler available from one of our
Pyramid Solutions Program Partners.
Syntax
PUSH
address
CALL 116
Example
>100 PUSH 8000H : CALL 116
>110 POP a,B,C
CALL 116: Call User
Defined Assembly Language
Routine