Difference between revisions of "DEF SEG"

From QB64 Wiki
Jump to navigation Jump to search
imported>Clippy
m
Line 15: Line 15:
  
  
''See also:'' [[VARPTR]], [[VARSEG]]
+
''See also:'' [[VARPTR]], [[VARSEG]], [[PEEK]], [[POKE]]
  
  

Revision as of 01:57, 7 October 2009

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


Navigation:

Go to Keyword Reference - Alphabetical

Go to Keyword Reference - By usage