Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
offseting
#1
what is offseting?
Reply
#2
Depends.

In Real Mode, (QB) memory is divided in 64 KB segments and each data or code in a segment can be accessed using and offset.

Ie. Address = Segment:offset

Like:

Def seg = &ha000 'VGA seg

c=Peek(320) 'c= color in first pixel of 2nd row
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#3
Nice explanation rel. But a more understandable one would be:
In order to address memory you need two parameters: 1 is the segment the other is the offset.

Segment can be thought of as an array and the offset would refer to a particular element in that array. For example 56404:3212 means the 3212th element in the 56404 segment. Its just a neat way of addressing memory =P.
Reply
#4
Quote:In Real Mode, (QB) memory is divided in 64 KB segments and each data or code in a segment can be accessed using and offset.

Ssssshhh... Don't let Glenn read this or he will flame you to the biggest extents!
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#5
BTW what happened to him? The last time I saw him nosing around was on the qb45.com's board =P.
Reply
#6
so wiht offsetting you can get 16 bit color?
Reply
#7
Offseting also applies to Pmode. :*)

In Relamode:

Address = Seg:off

Pmode.

Just the offset up to 4gig.

16 bit colors work in both modes. ;*)

Ie. UGL or Flib . Both real mode but uses Vesa.


Nath. Shhh. Glenny boy is enjoying his extended vacation. :*)
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#8
Quote:so wiht offsetting you can get 16 bit color?

Ahem offsetting is a method of addressing memory. It has nothing to with getting 16bit colors =P.
Reply
#9
You could use the offset to determine if ur using 16bit colour....
Find the screen memory and scan DOS colour mode (i have the code here sumplace.......i'll post it when i find it)

Oz~
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)