Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Need help with Motorola MC68HC05 programming

methimethi Posts: 2Member
Hi..I am learning the assembly language of the Motorola MC68HC05 chip..and have some doubts regd the programming

LOOP BRA LOOP
followed by some instructions

Wat would this do?

As far as I know...BRA is Branch Always..tat wud mean it wud keep coming back to LOOP...so when does it come out of the LOOP and execute the instructions following it?

Thanks alot

Comments

  • DrMartenDrMarten Posts: 748Member
    : Hi..I am learning the assembly language of the Motorola MC68HC05 chip..and have some doubts regd the programming
    :
    : LOOP BRA LOOP
    : followed by some instructions
    :
    : Wat would this do?
    :
    : As far as I know...BRA is Branch Always..tat wud mean it wud keep coming back to LOOP...so when does it come out of the LOOP and execute the instructions following it?
    :
    : Thanks alot
    :
    ==============

    I do not think it would exit this loop unless a another BRANCH condition was entered within the loop or a call to exit the program.

    Hope this helps. :-)


  • htakeuchihtakeuchi Posts: 19Member
    [b][red]This message was edited by htakeuchi at 2005-7-20 22:12:47[/red][/b][hr]
    : : Hi..I am learning the assembly language of the Motorola MC68HC05 chip..and have some doubts regd the programming
    : :
    : : LOOP BRA LOOP
    : : followed by some instructions
    : :
    : : Wat would this do?
    : :
    : : As far as I know...BRA is Branch Always..tat wud mean it wud keep coming back to LOOP...so when does it come out of the LOOP and execute the instructions following it?
    : :
    : : Thanks alot
    : :
    : ==============
    :
    : I do not think it would exit this loop unless a another BRANCH condition was entered within the loop or a call to exit the program.
    :
    : Hope this helps. :-)

    This is an idle loop. The loop can only be "exited" by hardware interrupts. Microcontrollers generally have a number of peripherals that can be programmed to produce interrupts.


Sign In or Register to comment.