简体   繁体   中英

Ori assembly mips

Why use "ori" in this code?

#case 3:
switch02_code_3 :
#a [ 5 ] = 50000;
ori $t0 , $zero , 0xC350        # $t0 <− 0x0000C350 = 50000
la $t1 , a                      # $t1 <− base address from a
sw $t0 , 20($t1)                # a [ 5 ] = 50000
#break;
j switch02_end                  # finish switch block

I don't see why it is necessary to expand the number of bits

That line is li $t0,0xC350 . The li instruction isn't real, it uses addi or ori to do the job.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM