Remote-processing BASIC 52 Manuel d'utilisateur Page 99

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 163
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 98
RPBASIC-52 PROGRAMMING GUIDE
2-80
PEEKW
Syntax: PEEKW(segment,address)
Where: segment = 0 to 7, specifies a 64K segment.
address = 0 to 65535, w ord address in a segment.
Function: Reads an unsigned 16 bit number from RAM
Mode: Command, Run
Use: A = PEEKW(0,AD)
Cards: All
DESCRIPTION
Use this function in conjunction w ith POKEW. Data is retrieved from any mem ory location as a single 16 bit
(2 byte) number. Numbers in the range of 0 to 65535 are retrieved. Two bytes of data are required for data
retrieval.
PEEKW can access up to 512K of ram by selecting a segment and an address. A segment selects a 64K block
while the address selects a location within this block.
See POKEB for addressing and segment information.
RELATED
POKEW
ERRORS
BAD SYNTAX If W, segment, or address is missing.
BAD DATA If segment is > 7, or address > 65535
EXAMPLE
This exam ple takes 500 readings from analog input 0, saves it to segment 1 of a 128K R AM, and then prints
out all of the values
10 FOR N=0 TO 500
20 POKE W1,N*2,AIN(0)
30 NEXT
40 FOR N=0 TO 500
50 A=PEEKW(1,N*2)
60 PRINT A,
70 NEXT
Vue de la page 98
1 2 ... 94 95 96 97 98 99 100 101 102 103 104 ... 162 163

Commentaires sur ces manuels

Pas de commentaire