If you want to verify for yourself, you can try something like (works only with non-packed records). The type casts to Pointer are there to prevent GPC from assuming another base size than 1.
Only reason I'd need to verify really is to make sure the Beta's working right, I'll keep you posted if it doesn't :)
On the x86 platform, it is. All variables (global, local and dynamic) and code are in the same segment, and pointers and references are just 32-bit offsets. (On other platforms, there may not be anything like Descriptors, or pointers may have a different size, e.g. 64 bits.)
Cool :) Where can I Get info on the Machine specifics of Alphas? I want to know the low level details like how graphics are displayed, if sound is available, the architecture of the memory (for example: PC has segments, offsets, etc). BTW, are there plans to port DJGPP and/or GPC to the Mac platform? Are there any free tools you or anybody know of that compile on it?
Unfortunately, there is something wrong there, namely the declaration of __dpmi_regs. Instead of ShortCard (16 bit unsigned integers on the x86, and the natural translation of the "unsigned short" of dpmi.h), it uses Bytes for the 16-bit registers. Try changing it as below. (I did not check your program, however, because I'm too lazy now to boot DosEmu... ;-)
Doh! It's *always* those dang pesky minor details that are so elusive, the ones that you would never think could possibly go wrong :P One thing tho, I think I tried it using the following declarations (and I changed the sizes accordingly as well):
TYPE DWord = Cardinal(32); Word = Cardinal(16); Byte = Cardinal(8);
So what said Byte previously, I changed to Word, and what was Word previously I changed to DWord. I'll try it again, mayhaps I did something wrong :}
BTW: "Packed" is (I think) not necessary for this record, because all fields are aligned, anyway, i.e. 32-bit fields are preceeded only by other 32-bit fields, and so on. The original record is a "struct" in dpmi.h, and I think C's "struct"s correspond to non-packed records in Pascal. Is this right?
Does Packed align on a Dword boundary? Or does it lump all the fields together to ensure that they are continuous? I ask because from what I remmeber about Pascal, it's to keep them continuous (the only time in Borin... errr... Standard Pascal that I've seen Packed is for a character array).
Is there anything in C that corresponds to packed records in Pascal?
Got me on that one :( Although I am very familiar with the types, type definitions, and I haven't seen anything really about packing the records like in Pascal. I could be wrong tho, if there is something, it's one of those deep dark secrets of C :P
See ya! Orlando Llanes
"Hey, we all did the drug thing, we all did the money thing, and eventually you find out that none of that stuff fixes anything, and we have nowhere else to go except to evolve spiritually and intellectually" -- Meredith Brooks
"Look out fo' flyeeng feet" O__/ a010111t@bc.seflin.org /|____. O <__. /> / \ ____________|_________ http://ourworld.compuserve.com/homepages/Monkey414