Howdy, Stranger!

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

Categories

Need help with Motorola MC68HC05 programming

methimethi Member Posts: 2
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 Member Posts: 748
    : 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 Member Posts: 19
    [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.