Skip to main content
lo0446
Associate II
March 22, 2014
Question

''Branching'' to SVC Handler

  • March 22, 2014
  • 2 replies
  • 552 views
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!
    This topic has been closed for replies.

    2 replies

    Tesla DeLorean
    Guru
    March 22, 2014
    Posted on March 23, 2014 at 00:26

    How about using an IT instruction

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

    Great that worked well,  Thanks Clive