C Board  

Go Back   C Board > Platform Specific Boards > Linux Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 03-23-2004, 02:32 PM   #1
Registered User
 
Join Date: Mar 2004
Posts: 38
writing to vdu memory

i'm new to linux programming
but done enough c programming in dos

my problem is that i use the following code set a poniter to VDu memory in dos

char far *scr=(char far *)0xB8000000L;

unaware that gcc supports flat memory model i used the same code in programming for linux

obviously it didn't work and error was flashed
then i read some documentation and found where the problem was

so i modified the above code as(removed far keyword and converted 0xB8000000 to flat model equivalent 0xB800000 ..tell me if i'm wron here)
char *scr=(char *)0xB800000;

this time it compiled successfully but when i treid to run the executable it didn't give proper result .......

please help me how to do this(ihave also treid including farptr.h ..but no use)
surdy is offline   Reply With Quote
Old 03-23-2004, 02:37 PM   #2
and the hat of Jobseeking
 
Salem's Avatar
 
Join Date: Aug 2001
Location: The edge of the known universe
Posts: 21,676
There is no direct access to the hardware, Linux is a protected operating system.
__________________
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.

Salem is offline   Reply With Quote
Old 03-24-2004, 01:32 AM   #3
Registered User
 
Join Date: Mar 2004
Posts: 38
thanks buddy
well .......what does a closed post mean
surdy is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
memory reading vs. writing R.Stiltskin C++ Programming 14 08-20-2008 04:57 AM
help! fifo read problem judoman C Programming 1 08-16-2004 09:19 AM
Pointer's xlordt C Programming 13 10-14-2003 02:15 PM
Managing shared memory lookups clancyPC Linux Programming 0 10-08-2003 04:44 AM


All times are GMT -6. The time now is 01:19 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22