Retro Rocket OS
BASIC-Powered Operating System
Loading...
Searching...
No Matches
PEEKW Function
X = PEEKW(address)

Reads a 16-bit word from address and returns it as an integer (0–65535).

Note
The full 2-byte span must be valid and mapped, or Bad Address at <address> is raised.

How to read it

  • Loads 2 bytes, little-endian (low at address, high at address+1).
  • Unaligned reads are allowed.

Examples

REM Read a 16-bit word
W = PEEKW(&100020)
PRINT W

Notes

  • Match the width to the device register size for MMIO.

See also:
PEEK · PEEKD · PEEKQ · POKEW