Mail Archives: djgpp/1994/02/10/18:49:37
> Since it would be great to be able make same C/ASM sources to
> work in OS2 and DOS. What I especially need is the ability to use virtually
> same 32bit assembler routines that access video memory (text/graphics)
> under both operating systems.
It's relatively easy if you are writing in assembler. See DOSMEM.S for an
example of how to get a selector which points at the first MB in either VCPI
or DPMI mode. Then, load this selector in gs and use it to access DOS
memory. What I did was to write my video access routines in C as if I had a
pointer to low memory, then got assembly language output and added gs
overrides by hand. I'm only working in text mode; I don't know if graphics
mode complicates things.
- Raw text -