Article 367 of comp.sys.ibm.pc.programmer: | |
Path: | 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 |
Content-Length: | 784 |
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"