Remote-processing BASIC 52 Uživatelský manuál Strana 100

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 163
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 99
RPBASIC-52 PROGRAMMING GUIDE
2-81
PEEK$
Syntax: $(n) = PEEK$(segment,address)
Where: segment = 0 to 7, specifies a 64K segment
address = 0 to 65535, starting string address in a segment
Function: Retrieves a string from RAM.
Mode: Command, Run
Use: $(0) = PEEK$(1,210)
Cards: All
DESCRIPTION
Use th is com man d to retrieve str ings sto red in R AM mem ory using the P OK E$ comm and. segment specifies
the 64K segment to save to. 0 is the base segment where RPBA SIC-52 runs its programs. Setting MTOP to a
number less than the top of memory will provide a 'protected' area from the Basic program.
Refer to the POKEB statement for addressing and segment information.
NOTE: This command works only when it is assigning another string variable. A BAD
SYNTAX error is returned when it is part of a PRINT, IF-THEN, ASC, or other command
or function. Use this function only as shown in SYNTAX above.
RELATED
POKE$
ERRORS
BAD SYNTAX If $, segment, or address is missing. Also when this function is part of
another function or command.
BAD DATA If segment is > 7
EXAMPLE
The following example assumes MTOP = 30000. It will assign and recover a string from
RAM.
10 AD = 30000
20 STRING 100,20
30 $(0) = "Test string"
40 POKE$ 0,AD,$(0)
50 $(1) = PEEK$(0,AD)
60 PRINT $(1)
Zobrazit stránku 99
1 2 ... 95 96 97 98 99 100 101 102 103 104 105 ... 162 163

Komentáře k této Příručce

Žádné komentáře