Segements and Offsets
- {Nathan}
- Veteran
- Posts: 1169
- Joined: Thu Aug 19, 2004 6:08 pm
- Location: The wetlands of central Ohio, USA
- Contact:
Segements and Offsets
Ok, people. Lets get down to bissinus. ( ) ok, i wanna no more about segments and offsets. i no that A000 is vga, i n how 2 get to varibles and stuff, but HOW THE HECK do i use them in direct qb? i have always been perplexed at this, so please help me out! <b>thanks all!</b>
in Directqb
In QB when you use segments and offsets to access variables you do
Code: Select all
dim variable as string * 1
def seg = varseg(variable)
poke varptr(variable), 90 'I think thats a Z
def seg
so varseg(variable) is the segment of the variable and varptr(variable) is the pointer of the variable.
In directQB whenever the sub asks for the segment and offset it's usually talking about arrays, so you just type varseg(array(0)) where it wants the segment and varptr(array(0)) where it wants the offset.
matt
Re: Segements and Offsets
Nathan, can you tell me more what you want to do? I've had a lot of experience using DQB, and I am assuming you want to know the segment and offset of EMS layers. I guess you want to use PEEK and POKE through DQB-made layers right?Nathan1993 wrote:Ok, people. Lets get down to bissinus. ( ) ok, i wanna no more about segments and offsets. i no that A000 is vga, i n how 2 get to varibles and stuff, but HOW THE HECK do i use them in direct qb? i have always been perplexed at this, so please help me out! <b>thanks all!</b>
The DQB layers usually are in EMS memory, which means you have to have this:
- The DirectQB EMS Handle
- EMS Routines
There are cool EMS routines in NeoLib v1.6 (with code, so you can see how they work): http://qbnz.com/pages/uploads/upload/NeoLib16.zip.
- The DirectQB EMS Handle
- EMS Routines
There are cool EMS routines in NeoLib v1.6 (with code, so you can see how they work): http://qbnz.com/pages/uploads/upload/NeoLib16.zip.