Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FUNCky - <b>name:</b> <b>peek() - get a value from a memory location</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     peek() - get a value from a memory location
  Usage:    <integer> = peek(<seg>,<off>)
  Params:   integer <seg> - the segment address to peek
            integer <off> - the offset address to peek
            The segment and offset address can also be specified
            as a hexadecimal string, ie: peek("FFF0","FFFE").
            This is convenient since many times memory address
            locations are specified in hexadecimal format. If you
            specify addresses as hexadecimal strings, you must
            pass both parameters as hex strings.

  Returns:  an integer equal to the byte found at <seg>:<off>

 ---------------------------------- Example ---------------------------------

            * This example reads the system ID byte at location F000:FFFE

                 IDbyte = peek("F000","FFFE")

            * This example displays the bit settings of the keyboard
            * status display byte at location 0040:0017. Press the
            * shift keys, num lock, caps lock etc. to see the effect.

            csroff()
            do while inkey() != 27

                 @ 10,0 say byte2bin(peek("0040","00017"))

            enddo
            csron()


See Also: poke() peekstr()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson