branch never

Discussion in 'Computer Science & Culture' started by leopold, Nov 2, 2011.

Thread Status:
Not open for further replies.
  1. leopold Valued Senior Member

    Messages:
    17,455
    what?
    yup, you heard it right folks.
    it's been a long time ago but motorola introduced a microprocessor with an instruction set that had a branch never instruction.

    my question is WHY?

    Please Register or Log in to view the hidden image!

     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. AlexG Like nailing Jello to a tree Valued Senior Member

    Messages:
    4,304
    Dunno.

    There was a guy in my Assembler class who wrote 'br on high, br on low, br on equal, br'.
    I guess the last branch was just to make sure.
     
  4. Google AdSense Guest Advertisement



    to hide all adverts.
  5. Dywyddyr Penguinaciously duckalicious. Valued Senior Member

    Messages:
    19,252
  6. Google AdSense Guest Advertisement



    to hide all adverts.
  7. leopold Valued Senior Member

    Messages:
    17,455
    no.
    from the link:
    "Though hundreds of uses for this spring to mind immediately, the assembler manual suggests that it can be used if you should become tired of NOP."

    that's my point, what are these "hundreds of uses" the author speaks of?
    there are only 2 i can think of, one relates directly to the NOP function.
    the other relates to a 3 byte place holder for other branch or jmp instructions.
    another use is for program expansion.
    you cannot simply "insert" an instruction there must be a place for it to go.
    a series of NOPs did this in earlier processors.

    a fourth use could be some kind of arcane programming technique but that would make the resulting code next to impossible to debug.

    any others?
     
  8. James R Just this guy, you know? Staff Member

    Messages:
    39,397
    One reason might be for debugging purposes.
     
  9. billvon Valued Senior Member

    Messages:
    21,634
    That was from the old 8 bit 6809 processor, which was about as powerful as 8 bit von Neumann processors got before the transition to 16 bit and Harvard architectures. It was the complement to the "branch always" instruction, and was effectively a NOP.
     
  10. Chipz Banned Banned

    Messages:
    838
    I think more curious was Motorolla's "branch when you feel like it [byf]" command.
     
  11. leopold Valued Senior Member

    Messages:
    17,455
    i cannot see how you would use this instruction for debugging.
    it doesn't alter any flags nor does it load any register.
    the branch itself is never taken, for any reason.
    it's essentially a 3 byte NOP.
     
  12. leopold Valued Senior Member

    Messages:
    17,455
    the 6809 had some 16 bit capability.
    it also had hardwired multiply capability.
    the 6809E had multiprocessor support.
    the code could be relocated to anywhere in the memory map.
    the introduction of a user stack allowed code to be re-entrant.

    at the same time motorola introduced a couple of processors that could honestly be called complete computers on a chip.
     
Thread Status:
Not open for further replies.

Share This Page