DEF SEG

From QB64 Wiki
Revision as of 01:58, 7 October 2009 by 90.231.62.232 (talk)
Jump to navigation Jump to search

DEF SEG is used to define the area in memory to access.


Syntax: DEF SEG = VARSEG(Array(index))


  • Used to set the pointer to a register or variable in memory.
  • PEEK and POKE require a segment memory address (often just 0) without using VARSEG.
  • Important segments using PEEK and POKE include &HB800 (text segment) and &HA000 (graphics segment).
  • BSAVE and BLOAD require a VARSEG reference to the grahic array used.
  • Use just DEF SEG when the procedure is completed to reset the segment to default!


See also: VARPTR, VARSEG, PEEK, POKE, BSAVE, BLOAD


Navigation:

Go to Keyword Reference - Alphabetical

Go to Keyword Reference - By usage