TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: andrew clarke
from: Paul Edwards
date: 1996-04-04 00:18:38
subject: Direct memory access using emx/gcc

ac> Hi folks.  How do I directly access memory in a DOS application (ie. 
ac> _osmode == DOS_MODE) compiled with EMX 0.9b / GCC 2.7.2?  Specifically, I 
ac> want to access areas such as 0040:004AH (current screen width), B800:0000H 
ac> (color screen text display), and so forth.  Thanks.

With either Watcom or EMX (can't remember), to access screen memory,
you just go:

char *p = 0xb8000;

*p = 'A';
*(p+1) = 'A';

etc.  I believe different DOS extenders do it differently.

BFN.  Paul.
@EOT:

---
* Origin: X (3:711/934.9)

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.