Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MIPS understand binary representation

On the process of learning Assembly i got one question

If i do the following:

la  $a1, 0x3f 

The number 63 is loaded into a1.

And if I use a constant without a leading 0x it's decimal, giving the same result:

la  $a1, 63

But how can I handle binary? Lets say

la  $a1, 00111111

How can MIPS understand that 00111111 is the number 63 in binary?

like image 484
Favolas Avatar asked Mar 22 '12 18:03

Favolas


1 Answers

Binary literal constants are not typically supported. What assembler are you using? If it supports C style preprocessing, there are several options available.

Here is one example.

like image 121
Kevin Coffey Avatar answered Oct 11 '22 11:10

Kevin Coffey