This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

a question about the memory space of one instruction

HELLO,
every one.
you know,the instruction
' mov r1 , #15 ' needs 2 bytes space , and the instruction 'mov r1 ,#16 ' needs 4 bytes space .
the question is :
how to make the instruction ' mov r1, #15 ' need 4 bytes space ?

thank you!

Parents
  • Quite simple:

    --------                    4     c100 section code
                                5     p100 proc
    00000000 E0F1               6          mov  r1,#15
    00000002 E6F11000           7          mov  r1,#16
    00000006 E6F10F00           8          mov  r1,#WORD 15
    0000000A E6F11000           9          mov  r1,#WORD 16
                               10
                               11     p100 endp
    --------                   12     c100 ends
                               13
                               14     end
    
    

Reply
  • Quite simple:

    --------                    4     c100 section code
                                5     p100 proc
    00000000 E0F1               6          mov  r1,#15
    00000002 E6F11000           7          mov  r1,#16
    00000006 E6F10F00           8          mov  r1,#WORD 15
    0000000A E6F11000           9          mov  r1,#WORD 16
                               10
                               11     p100 endp
    --------                   12     c100 ends
                               13
                               14     end
    
    

Children