How to do an assemble-time modulus on constants in ARM assembly language

后端 未结 3 1140
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-18 16:16

I want to know how to do modulus in arm assembly language

I\'ve tried the code in this page MOD operator in arm website:

MOV     R1,#12 MOD 7   ; R1         


        
3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-18 16:45

    If you're using the GNU assembler (you don't say), then the mod (remainder) operator is %, same as C.

    The fine manual is here.

提交回复
热议问题