PRINT_INT = 1 PRINT_STR = 4 READ_INT = 5 PRINT_CHAR = 11 #include # struct s0 { # int x; # int y; # }; # struct s1{ # char c1; # char c2; # int x; # }; # struct s0 my_struct; // 8 bytes # struct s1 my_other_struct = {'A', 'Z', 99}; //8 bytes # int main(void) { # my_struct.x = 10; # my_struct.y = 3; # putchar(my_other_struct.c1); # putchar(my_other_struct.c2); # printf("%d", my_other_struct.x); # return 0; # } .text main: li $t0, 10 sb $t0, my_struct+0 li $t1, 3 sb $t1, my_struct+4 li $v0, PRINT_CHAR lb $a0, my_other_struct+0 syscall li $v0, PRINT_CHAR lb $a0, my_other_struct+1 syscall li $v0, PRINT_INT lb $a0, my_other_struct+4 syscall end: li $v0, 0 jr $ra .data my_struct: .space 8 my_other_struct: .byte 'A' .byte 'Z' .word 99