🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #2077

Accessing memory (Monitor)

#2077
From: James R. Skinner
Date: Thu, 15 Oct 1992 03:30
25 lines
1307 bytes
	
I am trying to write a simple program to clear the monochrome monitor 
that I have attached to my system.  I am using the GCC compiler and the
following code:

#include <os2.h>

main(int argc, char *argv[], char *envp[])
{

          for (  int *p=0x80000 ; *p <= (0x80000+4000)  ; (*p++) = 0x2007  );

}

This code causes an access violation exception when executed.
How can I correct this?  How do I get access to this memory area?
Any help will be appriciated..  Thanks.

james

-- 

-----------------------------------+--------------------------------------------
        James Robie Skinner        |     Jodrey School of Computer Science        James.Skinner@dragon.acadiau.ca  |  Acadia University, Wolfville, NS, Canada
-----------------------------------+--------------------------------------------
Technical Details
Message-ID: <1992Oct15.033035.16753@dragon.acadiau.ca>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!sol.ctr.columbia.edu!destroyer!cs.ubc.ca!utcsri!torn!csd.unb.ca!morgan.ucs.mun.ca!nstn.ns.ca!dragon.acadiau.ca!880506s

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!sol.ctr.columbia.edu!destroyer!cs.ubc.ca!utcsri!torn!csd.unb.ca!morgan.ucs.mun.ca!nstn.ns.ca!dragon.acadiau.ca!880506s
From: 880506s@dragon.acadiau.ca (James R. Skinner)
Subject: Accessing memory (Monitor)
Message-ID: <1992Oct15.033035.16753@dragon.acadiau.ca>
Organization: Acadia University
Date: Thu, 15 Oct 1992 03:30:35 GMT
Lines: 25