Absolute in mB PRO??

General discussion on mikroBasic PRO for PIC.
Post Reply
Author
Message
dejan_mrtt
Posts: 101
Joined: 24 Jan 2007 18:43
Location: Skopje, Macedonia
Contact:

Absolute in mB PRO??

#1 Post by dejan_mrtt » 04 May 2009 18:10

From the help of mBPRO:
Note: You must specify an even address when using the directive absolute.
Why is it that we need to specify an even address??

I am used to, and most of my code is written in this way:

I have lets say DWORD variable, and I also want to access its individual bytes separately. For example:

Code: Select all

Dim myX as Dword absolute 60
Dim myX_Lo as byte absolute 60
Dim myX_Hi as byte absolute 61
Dim myX_Hr as byte absolute 62
Dim myX_Hs as byte absolyte 63
In this way I have easier access to all 4 individual bytes of the "myX",

and without using functions like Lo(myX), Hi(... , Higher(... , Highest..

Actually using them I dont have access to individual bytes, which will affect the whole Dword. (which is required)

My question is = if we look the above declaration, there are two ODD addreses (not even ones), 61 and 63.

What is the solution?

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

Re: Absolute in mB PRO??

#2 Post by zristic » 05 May 2009 11:19

There is no reason for not using the odd addresses, this is just a mistake in help (it probably referred to the ORG directive which has to be even for P18).

Post Reply

Return to “mikroBasic PRO for PIC General”