How can I read the data from a specified address in RAM?

General discussion on mikroPascal PRO for 8051.
Post Reply
Author
Message
jd2000
Posts: 4
Joined: 07 Jun 2010 03:29

How can I read the data from a specified address in RAM?

#1 Post by jd2000 » 11 Jun 2010 21:52

Hi, if I want to read the data from a specified address (for example, 0xF1) in RAM, how to write the code in mikroPascal? It's very easy in C, but I don't know how to do it in mikroPascal. Thanks.

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: How can I read the data from a specified address in RAM?

#2 Post by Dany » 12 Jun 2010 16:45

It is also very easy in mP:

Code: Select all

var DataPtr: ^byte;
     MyData: byte;
...
  DataPtr := $F1;
  MyData := DataPtr^;
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

jd2000
Posts: 4
Joined: 07 Jun 2010 03:29

Re: How can I read the data from a specified address in RAM?

#3 Post by jd2000 » 13 Jun 2010 02:00

Thank you very much. :D

Post Reply

Return to “mikroPascal PRO for 8051 General”