cancel
Showing results for 
Search instead for 
Did you mean: 

''Branching'' to SVC Handler

lo0446
Associate II
Posted on March 22, 2014 at 18:14

MULT

 CMP r1, #1 

 BEQ Finish

 ITTT HS

 SUBHS r1, #1

 MULHS r0, r2

 BLHS MULT

Where I currently have ''BEQ Finish'' I wish to call an SVC Handler, how can I do this?

I know I can call an SVC handler with SVC 0 , SVC 1 etc.. but how do I do it conditionally like the above statement? I tried ''BEQ SVC 0'' and I get an unexpected operand statement. Once branching to the handle I never actually want to return to the Multiply function.

Please let me know if what I'm trying to do isn't quite right, I've only just began to learn assembly. 

Thanks!
2 REPLIES 2
Posted on March 23, 2014 at 00:26

How about using an IT instruction

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
lo0446
Associate II
Posted on March 26, 2014 at 14:58

Great that worked well,  Thanks Clive