🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #6193

Re: Fix for Zortech 386 Screen Memory Access wanted

#6193
From: Joe Huffman
Date: Sun, 27 Dec 1992 00:02
41 lines
2026 bytes
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). */
}

Send me email if you still are having problems...

Joe Huffman
FlashTek, Inc.                  FlashTek, Ltd.
121 Sweet Ave                   Partnership House
Moscow, Idaho 83843             Grantham, Lincs
U.S.A.                          NG31 9ST  England

FAX:    208-882-7275            FAX:   +44-476-61382
Voice:  208-882-6893            Voice: +44-476-74108
Orders: 800-397-7310
Email:  flashtek@proto.com      Email: flashtek@cix.compulink.co.uk
CIS:    71332,203               CIS: 100042,1673
-- 
netcom!proto!joe
joe@proto.com
Technical Details
Message-ID: <1992Dec27.000209.19554@proto.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!apple!netcomsv!proto!joe
References: <rwallace.724701384@unix1.tcd.ie> <1992Dec23.190904.14515@proto.com> <rwallace.725390879@unix1.tcd.ie>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!apple!netcomsv!proto!joe
From: joe@proto.com (Joe Huffman)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Fix for Zortech 386 Screen Memory Access wanted
Message-ID: <1992Dec27.000209.19554@proto.com>
Date: 27 Dec 92 00:02:09 GMT
References: <rwallace.724701384@unix1.tcd.ie> <1992Dec23.190904.14515@proto.com> <rwallace.725390879@unix1.tcd.ie>
Organization: FlashTek, Inc.
Lines: 41