--- Prashant TR <[EMAIL PROTECTED]> wrote:
> --- Trevor Warren <[EMAIL PROTECTED]> wrote:
> > but could u pliss take the trouble to
> enlighten
> > me as to how do i go abt doin this....
>
>
> Untested code,
hiyee there luggers.....
Thx to ur help things hav worked...'-). I am posting
the code so that if ny1 ever needs to make direct
access to their ROM then they won't hav to mess around
with stuff like i did...
++++++++++++++++++++++
#include <unistd.h>
#include <stdio.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <fcntl.h>
int main()
{
char c[15];
int fd, i, fd1;
fd = open("/dev/mem",O_RDONLY);
fd1 = open("/path/to/file/msg.txt",
O_RDWR|O_APPEND|O_CREAT);
//ofcourse the 0xfcdcd location will change as do
//the array and iostream buffer lengths.
lseek(fd,0xfcdcd,0);
read(fd,c,14);
write(fd1,c,14);
close (fd);
close (fd1);
return 0;
}
+++++++++++++++
Trevor Warren
=====
( >- LINUX, It's all about CHOICE -< )
/~\ __ http://www.trevorwarren.com __ /~\
| \) / mailto: [EMAIL PROTECTED] \ (/ |
|_|_ \ Urgent ->[EMAIL PROTECTED] / / _|_|
\___________________________________/
__________________________________________________
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help