assembly - How to modify .data values inside the .text segment in Mips? -
i have global variable in mips declared @ .data segment
.data globalvariable: .word 10
how can access , modify content inside .text segment?
.data globalvariable: .word 10 .text #access lw $a0, globalvariable #modify la $a0, globalvariable #get address li $a1, 11 #new value sw $a1 0($a0) #save new value lw $a2, globalvariable #get new value
Comments
Post a Comment