Searching \ for '[Bulk] Re: [Bulk] Re: [PIC] .hex format for PIC18?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: massmind.org/techref/microchip/devices.htm?key=pic
Search entire site for: 'Re: [Bulk] Re: [PIC] .hex format for PIC18?'.

Exact match. Not showing close matches.
PICList Thread
'[Bulk] Re: [Bulk] Re: [PIC] .hex format for PIC18?'
2009\03\28@105345 by Isaac Marino Bavaresco

flavicon
face
Olin Lathrop escreveu:
> Tamas Rudnai wrote:
>  
>> I have not tried what would happen if you jump into a middle
>> of double word instruction.
>>    
>
> You can't.  There is no such thing as a odd execution addres since the low
> bit of the PC is not implemented, or you can think of it as being hard wired
> to 0.
>  

Yes, he can!

It is impossible to jump to the middle of single-word instructions, but
it is possible for double-word instructions.

Double-word instructions occupy two consecutive words, the second word
is encoded as a NOP (higher nibble equals to 0xf).

Fortunately, even if one does this, nothing wrong happens because the
second word is always executed as a NOP.

Regards,

Isaac


__________________________________________________
Faça ligações para outros computadores com o novo Yahoo! Messenger
http://br.beta.messenger.yahoo.com/

2009\03\28@105545 by Isaac Marino Bavaresco

flavicon
face
Tamas Rudnai escreveu:

>> If you try to do a "bra 1" you will get a compile (assembly) time
>>    

Hey, the dollar sign in the above line disappeared!!!

{Quote hidden}

The second word of double-word instructions are always encoded as NOPs,
because their higher nibbles is always 0xf.

Microchip did this on purpose, to avoid the possibility of someone
jumping to the middle of an instruction, and to allow the skip
instructions to work correctly with double-word instructions (the skip
instruction skips the first word and the second word is always executed
as a NOP).

Regards,

Isaac

__________________________________________________
Faça ligações para outros computadores com o novo Yahoo! Messenger
http://br.beta.messenger.yahoo.com/

2009\03\28@111758 by Jan-Erik Soderholm

face picon face


Isaac Marino Bavaresco wrote:
> Olin Lathrop escreveu:
>> Tamas Rudnai wrote:
>>  
>>> I have not tried what would happen if you jump into a middle
>>> of double word instruction.
>>>    
>> You can't.  There is no such thing as a odd execution addres since the low
>> bit of the PC is not implemented, or you can think of it as being hard wired
>> to 0.
>>  
>
> Yes, he can!
>
> It is impossible to jump to the middle of single-word instructions, but
> it is possible for double-word instructions.

But that is not an "odd" adress. It's still an even adress with
last bit of the address set to "0". That was not was what discussed.
So "You can't" is still the correct answer... :-)

Jan-Erik.



{Quote hidden}

>

2009\03\28@113021 by olin piclist

face picon face
Isaac Marino Bavaresco wrote:
> Yes, he can!
>
> It is impossible to jump to the middle of single-word instructions,
> but it is possible for double-word instructions.

You are right.  I missed the fact that he was talking about double-word
instructions.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.

2009\03\28@114300 by Jan-Erik Soderholm

face picon face
Olin Lathrop wrote:
> Isaac Marino Bavaresco wrote:
>> Yes, he can!
>>
>> It is impossible to jump to the middle of single-word instructions,
>> but it is possible for double-word instructions.
>
> You are right.  I missed the fact that he was talking about double-word
> instructions.

If so, I was wrong in my last "correction". Somewhere the thread
switched from "goto $+1" into 2-word instructions. When talking about
"odd" addresses, I thought we where still talking about "goto $+1"...

Both parts of an 2-word intstruction are "even" addresses.

Jan-Erik.

More... (looser matching)
- Last day of these posts
- In 2009 , 2010 only
- Today
- New search...