Literals/Integer: Difference between revisions

m
Line 1,372:
.byte 0b00000000,0b11111111,0,255
.halfword 0xCAFE,0xBABE</lang>
 
A minus sign can be used to indicate a negative number. Negative number literals are sign-extended to fit whatever operand size matches the context.
<lang mips>addi $t0,-1 ;assembled the same as "addi $t0,0xFFFF"
li $t0,-2 ;assembled the same as "li $t0,0xFFFFFFFE"</lang>
 
=={{header|Modula-3}}==
1,489

edits