MEMGET

From QB64 Wiki
Revision as of 22:01, 21 April 2012 by imported>Clippy (Created page with 'The '''_MEMGET''' statement reads a portion of a designated memory block at an OFFSET position. {{CodeStart}} '' '' {{Cl|SCREEN}} 13 {{Cl|PSET}} (0, 0), 123 {{Cl|PSET}} (1, 0)…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The _MEMGET statement reads a portion of a designated memory block at an OFFSET position.


SCREEN 13 PSET (0, 0), 123 PSET (1, 0), 222 'create screen image 'here is an array DIM screen_array(319, 199) AS _UNSIGNED _BYTE 'here's how we can copy the screen to our array DIM m AS _MEM m = _MEMIMAGE 'no handle necessary or 0 when accessing the program screen _MEMGET m, m.OFFSET, screen_array() 'here's the proof PRINT screen_array(0, 0) 'print 123 PRINT screen_array(1, 0) 'print 222 END