[fpc-devel] Language extension: absolute for classes

Michael Van Canneyt michael at freepascal.org
Sun Oct 1 21:49:39 CEST 2006



On Sun, 1 Oct 2006, Micha Nelissen wrote:

> Michael Van Canneyt wrote:
> > I don't think your solution is any cleaner than what he suggests.
> > It's also a 'smart hack', after all. Just like in the old DOS days,
> 
> Why?
> 
> > when one would declare an array of bytes with 'absolute' at the 
> > location of the VGA or Hercules text screen card...
> 
> Hmm? You knew that at that location in memory (0xB800 was it ? :)) 

Yep. and 0xB000 for Hercules... :-)

> text
> is to be written in a certain format, so you tell the compiler that it
> is like that. Why is this a hack ?

Because you do a typecast just as if you would override a property using a
read specifier and do the typecast there. Just the typecast is disguised 
as an 'absolute'...

But don't get me wrong, I'm not opposing this.

Michael.



More information about the fpc-devel mailing list