Advanced LMC

There are three commands in LMC to branch a program which means to take the program away from its linear order:

BRA- Branch always. This will set the program counter to a given address where it will continue from there.

BRZ- Branch on zero. This will set the program counter to a given address if the value is zero where it will continue from there.

BRP- Branch on positive. This will set the program counter to a given address if the value is a positive where it will continue from there.

 

 

 

 

 

 

 

 

 

 

 

 

Leave a comment