Remote Processing Coorporation RPC-320 Dokumentacja Strona 66

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 186
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 65
Commands - 36
DPEEK and DPOKE
Memory Function and Statement
SYNTAX: n = DPEEK(address)
n = DPEEK (address, segment)
DPOKE address, data
DPOKE address, data, segment
PURPOSE: DPEEK returns a 16–bit value from memory.
DPOKE writes a 16–bit value to memory.
REMARKS: A 16–bit word is formed with the lower 8 bits as the value located at memory address “address” and
the upper 8 bits as the value located at memory location “address + 1”.
The first syntax applies to the first 64K of memory (segment 0). For addresses above segment 0, use
the second syntax. Not all cards support segmented memory.
DPEEK is an extension of PEEK and executes twice as fast as two PEEK functions. DPOKE is an
extension of POKE and executes twice as fast as two pokes.
RELATED: DPOKE, PEEK, FPEEK, PEEK$, POKE, FPOKE, POKE$
EXAMPLE: The following routine POKEs or writes two numbers into memory. The DPEEK statement allows
both to be retrieved and printed ( 256 x 3 + 45 = 813). You could also say DPOKE 2000, 813.
10 POKE &A000,45 : POKE &A001,3
20 PRINT DPEEK(&A000)
RUN
813
10 A=DPEEK(1000,2)
This retrieves data from address 1000 at segment 2.
ERROR: <Data negative> – for address and segment
<Data > 65,535> – for address
<Data out of range> – if segment > 15
Przeglądanie stron 65
1 2 ... 61 62 63 64 65 66 67 68 69 70 71 ... 185 186

Komentarze do niniejszej Instrukcji

Brak uwag