Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

overflow when using poke

Status
Not open for further replies.

shanley06

Programmer
Nov 26, 2002
101
US
when i use

poke varptr(vscreen%(0))+(320*320)+200,15

it gives me an overflow error, i was wondering if there was a way around this or a way to fix it
 
This is the code you want to use

DEF SEG = VARPTR(screen%(0))
POKE (320 * 320) + 200, 15
DEF SEG

The address of the POKE can only be between 0 and 65535, so you have to change the segment address to go any higher
 
^^^^^ Don't use ^^^^^

never mind - i did that completely wrong, I must not have gotten enough sleep or something. I looked at your other post and you did use DEF SEG.
The reason you are getting the error is because (320 * 320) + 200 = 102600, which is must higher that 65535. You have to change your segment address again.
 
how can i tell waht to change the segment to if the offset is too high?
 
Read faq314-290.
vcn.gif

Bozo: "You're never a loser on the Bozo show, you're just an almost winner."
Kid: "Cram it, clown!"
Bozo: "That's a Bozo no-no."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top