Remote-processing BASIC 52 Manuel d'utilisateur Page 98

  • 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 97
RPBASIC-52 PROGRAMMING GUIDE
2-79
PEEKF
Syntax: PEEKF(segment,ad dress)
Where: segment = 0 to 7, specifies a 64K segment
address = 0 to 65535, byte address in a segment
Function: Reads a floating point number from RAM. Floating point range is + /- 1E-127 to +/-
0.99999999E+127
Mode: Command, Run
Use: A = PEEK F(1,AD)
Cards: All
DESCRIPTION
This function is used in conjunction with POKE F. Data is retrieved from any memory location. PEEK F
retrieves a floating point number saved by POKE F.
PEEKF 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.
Each floating point num ber req uires 6 bytes. address must be increme nted in dexed 6 bytes for eac h value.
See POKEB and POKEF commands for addressing and segment info.
RELATED
POKEF
ERRORS
BAD SYNTAX If B, segment, or address is missing.
BAD DATA If segment is > 7, or address > 65535
EXAMPLE
The following example reads the A -D port, multiplies it by a constant, and saves it to RAM. The values are
then retrieved and printed back.
10 FOR N=0 TO 500
20 A = AIN(1) * 0.2344
20 POKE F1,N*6,A
30 NEXT
40 FOR N=0 TO 500
50 A=PEEK F(1,N*6)
60 PRINT A,
70 NEXT
Vue de la page 97
1 2 ... 93 94 95 96 97 98 99 100 101 102 103 ... 162 163

Commentaires sur ces manuels

Pas de commentaire