5

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?

1 Answer 1

5

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.