Hello,
I have a question about accessing memory using GPC. I'm running GPC on a FreeBSD UNIX system. How do you directly access memory via a generic pointer in GPC? In Borlan Pascal 7, there are special array called Mem, MemW, and MemL. Does GPC have anything equivilent?
Dan.
Rocker73@aol.com wrote:
Hello,
I have a question about accessing memory using GPC. I'm running
GPC on a FreeBSD UNIX system. How do you directly access memory via a generic pointer in GPC? In Borlan Pascal 7, there are special array called Mem, MemW, and MemL. Does GPC have anything equivilent?
No. See section 6.2.10 in the docs. Also for reference to dirty tricks to replace them in case of djgpp.
Maurice
Maurice Lombardi wrote:
Rocker73@aol.com wrote:
Hello,
I have a question about accessing memory using GPC. I'm running
GPC on a FreeBSD UNIX system. How do you directly access memory via a generic pointer in GPC? In Borlan Pascal 7, there are special array called Mem, MemW, and MemL. Does GPC have anything equivilent?
As you said, a pointer is a way to go. You can set a pointer to an absolute address with something like `MyPtr := Pointer ($f0000000)'.
GPC also supports `absolute' variables `var Foo: Integer absolute $f0000000' (of course, without segment/offset unlike Dos), but I'd recommend pointers where only the initial setting uses a nonstandard extension, and further use of the pointers can be done in regular Pascal.
No. See section 6.2.10 in the docs. Also for reference to dirty tricks to replace them in case of djgpp.
Side note: Referring to section numbers is not recommended since they're likely to change when something is added/moved, and some formats (e.g., Info) don't show the numbers at all. Better refer to them by title.
To Dan: Please turn of HTML.
Frank