Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Assembly Language question

Status
Not open for further replies.

milvapp

Member level 5
Joined
Apr 17, 2010
Messages
88
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,288
Location
chania greece
Activity points
1,882
In terms of hardware is there any possible way to implement a branch instruction (beq,bne etc)
without using flags?

For example BEQ R1 R2 label if R1=R2 branches to label.
I substract R1-R2 at the ALU but how can I check that the result is zero ?

P.S. Please dont tell me compare it with a dummy register containing the value 0
because I conclude to the same point :p

Thank you in advance.
 

KerimF

Advanced Member level 4
Joined
May 17, 2011
Messages
1,461
Helped
374
Reputation
756
Reaction score
370
Trophy points
1,363
Location
Syria
Activity points
12,314
Don't you know the answer? :)
 
Last edited:

jpanhalt

Advanced Member level 3
Joined
Jun 28, 2010
Messages
724
Helped
216
Reputation
442
Reaction score
219
Trophy points
1,323
Activity points
6,952
Look up the assembler pseudo-mnemonic BZ or used BSTFC status,2>goto... Personally, I think writing it out , rather than using the pseudo-mnemonic is better. Of course, after the subtraction that yields zero.

John
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top