PEEK

Format

number1 = PEEK (number2)

Description

This statement is used to examine actual memory location values directly. By default, the ASIC DS address is assumed. However, this may be overridden with the use of the DEFSEG command. The value of the byte at address number2 is stored in number1.

Example

DEFSEG = &hexB800
A = PEEK (0)
The above statements will retrieve the first byte of video memory for a CGA/EGA/VGA card and store it in variable "A".

Comments

Since the Intel 8088 architecture is segmented in 64k segments, number2 is limited to the range of 0-65535.

See Also

  • DEFSEG
  • POKE