What does the BEQ instruction do exactly?

The exact answer will depend on which microcontroller you are using. In general, if there are no operands, BEQ would be expected to branch if the Accumulator is 0. This is most likely on simple micros where the Accumulator is the primary register for calculations.

Which microcontroller are you using? You should be able to find a definition for the BEQ instruction in the manual for that micro.


On Motorola 68k family, it stands for "branch if equal" which means "jump to given address if zero flag is set" such as when previous comparison is successful.

However, 68332 seems to be different. Based on uppercase syntax, it could be a macro around another instruction which essentially does the same thing.

Assembly programmers who port code from other systems can make use of similar macros to ease the porting process.