1.5 Addressing Modes | MIPS | Computer Architecture
2.5 هزار بار بازدید -
2 سال پیش
-
There are five types of
There are five types of addressing modes used by MIPS Architecture
1.Immediate addressing mode - addi $s1,$s0,5
2. Register addressing mode - add $s1,$s2,$s3
3. Base / Displacement / Indirect addressing mode - lw $s1, 32($s3)
The value 32 is added with the value stored in the register s3 and this value is used as address to read the data from the memory. This data is stored in the register s1.
4. PC (Program Counter) -relative addressing mode –
e.g. bne $s0, $s1, 100 PC+4+(100*4)
5. Pseudo direct addressing mode - j 2500
Here 2500 is multiplied by 4 and this value is concatenated with the upper 6 bits of the program counter (PC) to get the effective address.
1.Immediate addressing mode - addi $s1,$s0,5
2. Register addressing mode - add $s1,$s2,$s3
3. Base / Displacement / Indirect addressing mode - lw $s1, 32($s3)
The value 32 is added with the value stored in the register s3 and this value is used as address to read the data from the memory. This data is stored in the register s1.
4. PC (Program Counter) -relative addressing mode –
e.g. bne $s0, $s1, 100 PC+4+(100*4)
5. Pseudo direct addressing mode - j 2500
Here 2500 is multiplied by 4 and this value is concatenated with the upper 6 bits of the program counter (PC) to get the effective address.
2 سال پیش
در تاریخ 1401/05/25 منتشر شده
است.
2,513
بـار بازدید شده