Where can I find the address in the code?

General discussion on mikroPascal PRO for PIC.
Post Reply
Author
Message
Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Where can I find the address in the code?

#1 Post by Dany » 07 Jun 2021 13:16

0x0000 0xF030EFC0 GOTO 24960
Above is an extract of a list file of the reset vector of a P18F2550 program. The hex value of 24960 is $6180, but I do not see $61 nor $80 in the opcodes.

According the datasheet they should be visible.

Can anyone help me?

Thanks in advance.
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)

janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

Re: Where can I find the address in the code?

#2 Post by janni » 07 Jun 2021 14:02

Hi Dany,

Assembly instructions consist of 16-bit words (one or more) in PIC18s so program memory is addressed in words within assembly instruction, i.e. twice smaller than in bytes. In your case, the address $6180 is coded as $30C0 in the GOTO instruction (F030EFC0). You've worked too long with bigger processors, apparently :) .

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

Re: Where can I find the address in the code?

#3 Post by Dany » 07 Jun 2021 17:59

janni wrote:
07 Jun 2021 14:02
Hi Dany,

Assembly instructions consist of 16-bit words (one or more) in PIC18s so program memory is addressed in words within assembly instruction, i.e. twice smaller than in bytes. In your case, the address $6180 is coded as $30C0 in the GOTO instruction (F030EFC0). You've worked too long with bigger processors, apparently :) .
Thanks very much Janni! Problem solved... :D :D
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)

Post Reply

Return to “mikroPascal PRO for PIC General”