Article View: comp.os.msdos.programmer
Article #6207Re: Fix for Zortech 386 Screen Memory Access wanted
From: russell wallace
Date: Mon, 28 Dec 1992 09:45
Date: Mon, 28 Dec 1992 09:45
33 lines
2007 bytes
2007 bytes
In <1992Dec27.000209.19554@proto.com> joe@proto.com (Joe Huffman) writes:
>rwallace@unix1.tcd.ie (russell wallace) writes:
>>Basically the method of accessing screen memory I'm using is with a far
>>pointer with segment = B800h and offset = row*160 + column*2, to give a
>>pointer to the character+attribute at (row,column). This works fine in
>>tiny, small, large etc. memory models, but does not work in extended
>>(option mx) memory model - as soon as I try to write a value into the
>The following should work:
>#include <dos.h> /* For the declaration of _x386_zero_base_selector. */
> /* Also, MK_FP() is prototyped. */
>int main()
>{
> char _far *screen_ptr = MK_FP(_x386_zero_base_selector, 0xb800);
> /* Now use the screen_ptr as you normally would, it points to the base
> address of the start of the screen. */
> /* If you get the X-32VM extender (the successor to DOSX) from FlashTek,
> there is a near pointer that points to the start of memory 0000:0000 that
> you could also use for somewhat faster access. It is called
> _x32_zero_base_pointer (or ptr, I forget right now). */
>}
Thanks, this works perfectly! (Except the typo: 0xb800 in the above
should read 0xb8000. With this, there are no further problems.)
--
"To summarize the summary of the summary: people are a problem"
Russell Wallace, Trinity College, Dublin
rwallace@unix1.tcd.ie
Technical Details
Message-ID:
<rwallace.725535933@unix1.tcd.ie>Path:
arc1-ca.pugleaf.net!sparky!uunet!pipex!bnr.co.uk!uknet!ieunet!tcdcs!unix1.tcd.ie!rwallaceReferences:
<rwallace.724701384@unix1.tcd.ie> <1992Dec23.190904.14515@proto.com> <rwallace.725390879@unix1.tcd.ie> <1992Dec27.000209.19554@proto.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!pipex!bnr.co.uk!uknet!ieunet!tcdcs!unix1.tcd.ie!rwallace From: rwallace@unix1.tcd.ie (russell wallace) Newsgroups: comp.os.msdos.programmer Subject: Re: Fix for Zortech 386 Screen Memory Access wanted Message-ID: <rwallace.725535933@unix1.tcd.ie> Date: 28 Dec 92 09:45:33 GMT References: <rwallace.724701384@unix1.tcd.ie> <1992Dec23.190904.14515@proto.com> <rwallace.725390879@unix1.tcd.ie> <1992Dec27.000209.19554@proto.com> Sender: usenet@cs.tcd.ie (NN required at ashe.cs.tcd.ie) Organization: Trinity College, Dublin Lines: 33 Nntp-Posting-Host: unix1.tcd.ie