Mail Archives: djgpp/1999/10/22/06:32:06
John S. Fine (johnfine AT erols DOT com) wrote:
: I couldn't follow most of what you said, and the <snip>'ed parts
: of your code contain the parts that are the problem, so I can't
: give you an exact answer.
Sorry for that.
: You may know that the entire value fits in 24-bits (maybe even
: 16) but there is no way for the compiler to communicate that to
: the linker in COFF format.
Ah, I see. Never suspected that that could be the problem. Now I see why
an other pointer (to a function) I used did work: it fitted nicely in
a 32bits variable.
: One kludge I used before I wrote that linker was to have a version
: of the descriptor structure in which the middle dword is defined
: as a single value. (Make sure you use __attribute__((packed)) so
: that a long can be placed at offset 2 in a struct). I then init
: it with address+(attributes<<24). Since attributes is a compile
: time constant, it is no problem; And since the field is a long,
: COFF format handles not knowing the address until link time. (You
: still need to make sure the address fits in 24-bits.)
Thanks! It works, now.
: BTW, the descriptor needs a linear address. The linker will give
: you an offset. If there is a difference between those, you must
: handle that as well.
Had that handled, already.
Thank you very much for your help. Sometimes I just don't know what these
djgpp error messages are about. Anyway, it works fine now.
David
- Raw text -