Rockwell-automation 1771-DB BASIC MODULE Bedienungsanleitung Seite 264

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 394
  • Inhaltsverzeichnis
  • FEHLERBEHEBUNG
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 263
Chapter
Call Routines 69–127
13
13 -6
Use CALL 77 to reserve the top of RAM memory for protected variable
storage. Values are saved if you enabled CALL 74 (page13 -5).
You store values with the ST@ (page11 -35) statement and retrieve them
with the LD@ (page11 -18) statement. Each variable you store requires 6
bytes of storage space.
You must subtract 6 times the number of protected variables you are
storing from MTOP. This reduces the available RAM memory. PUSH this
value onto the stack as the new MTOP address. All appropriate variable
pointers are reconfigured. Do this only in Command mode to ensure
proper operation.
Important:
Use CALL 77 from Command mode only.
Do not let the ST@ address write over the MTOP address. This could
alter the value of a variable or string.
CALL 77 de-allocates all the string memory along with all the string
contents. Therefore, make sure you perform this call before execution
of the string statement.
Input and Output Arguments
This routine has one input argument and no output arguments. The input
argument is the new MTOP address.
Syntax
PUSH
new MTOP address
CALL
77
Example
>
PRINT MTOP
14335
>
PRINT MTOP-12 (2 VARIABLES TIMES 6 BYTES EACH
)
14323
>
PUSH 14323 (NEW MTOP ADDRESS)
>
CALL 77
>
10 K = 678 * PI
>
20 L = 520
>
25 PUSH K
>
30 ST@ 14335:REM STORE K IN PROTECTED AREA
>
40 PUSH L
>
50 ST@ 14329
>
55 REM TO RETRIEVE PROTECTED VARIABLES
CALL 77: Protected Variable
Storage
Seitenansicht 263
1 2 ... 259 260 261 262 263 264 265 266 267 268 269 ... 393 394

Kommentare zu diesen Handbüchern

Keine Kommentare