🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.programmer
Article #155

Re: reading directly from screen

#155
From: D Spinellis
Date: Fri, 23 Mar 1990 22:15
25 lines
1252 bytes
In article <3850@plains.UUCP> person@plains.UUCP (Brett G. Person) writes:
>
>How do I make Microsoft C read directly from video memory.  I need to 
>access the memory starting from b800.
>
>What does the c code that allows me to do this look like?

It looks like this:

/*
 * Read a byte from video memory starting at b800.
 * Location is the offset in the video RAM.
 */
char
readbyte(int location)
{
	return *(location + (char far *)(0xb8000000l));
}

Diomidis
--
Diomidis Spinellis                  Internet:                 dds@cc.ic.ac.uk
Department of Computing             UUCP:                    ...!ukc!iccc!dds
Imperial College                    JANET:                    dds@uk.ac.ic.cc
London SW7 2BZ                      #include "/dev/tty"
Technical Details
Message-ID: <1748@gould.doc.ic.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!ukc!icdoc!zmact61
References: <3850@plains.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!ukc!icdoc!zmact61
From: zmact61@doc.ic.ac.uk (D Spinellis)
Newsgroups: comp.sys.ibm.pc.programmer
Subject: Re: reading directly from screen
Message-ID: <1748@gould.doc.ic.ac.uk>
Date: 23 Mar 90 22:15:20 GMT
References: <3850@plains.UUCP>
Sender: news@doc.ic.ac.uk
Reply-To: dds@cc.ic.ac.uk (Diomidis Spinellis)
Organization: Imperial College Department of Computing
Lines: 25