07.05.2013 Views

Tema 3: El nivel de lenguaje máquina - Blearning

Tema 3: El nivel de lenguaje máquina - Blearning

Tema 3: El nivel de lenguaje máquina - Blearning

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Operaciones sobre la pila<br />

sp-4<br />

sp<br />

Guardar (push)<br />

1. Decrementar puntero<br />

2. Escribir en memoria (store)<br />

MIPS:<br />

addi $sp,$sp,-4<br />

sw $reg, 0($sp)<br />

Memoria Dirección<br />

Valor guardado<br />

Baja<br />

Alta<br />

Recuperar (pop)<br />

1. Leer <strong>de</strong> memoria (load)<br />

2. Incrementar puntero<br />

MIPS:<br />

lw $reg, 0($sp)<br />

addi $sp,$sp,4<br />

Memoria Dirección<br />

Valor leído<br />

Fundamento <strong>de</strong> Computadores (1º II) Cap 2: <strong>El</strong> <strong>nivel</strong> <strong>de</strong> <strong>lenguaje</strong> <strong>máquina</strong> 35 <strong>de</strong> 64<br />

sp<br />

sp+4<br />

Baja<br />

Alta

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!