13.07.2015 Views

Soluciones de los ejercicios sobre instrucciones y direccionamiento

Soluciones de los ejercicios sobre instrucciones y direccionamiento

Soluciones de los ejercicios sobre instrucciones y direccionamiento

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.

3<strong>Soluciones</strong> <strong>de</strong> <strong>los</strong> <strong>ejercicios</strong> <strong>sobre</strong> <strong>instrucciones</strong> y <strong>direccionamiento</strong>(A+B)×C, o: AB+C× A+B×C, o: ABC×+LD /A LD /APUSHPUSHLD /B LD /BPUSHPUSHADD LD /CLD /C PUSHPUSHMULMULADDPOPPOP4CALL hace una operación push <strong>sobre</strong> la pila, introduciendo en ella el contenido <strong>de</strong> CP; RET hace un popSi el convenio es que PP apunta a la cima,• CALL: (PP)-k → PP; (CP) → (PP)• RET: ((PP)) → CP; (PP)+k → PPSi el convenio es que PP apunta a la primera libre por encima <strong>de</strong> la cima,• CALL: (CP) → (PP); (PP)-k → PP• RET: (PP)+k → PP; ((PP)) → CP5(I0)(I1)0 → CP,RA; ? 508 → PP---------repetir siempre(MP[RA]) → RI; (CP) + 1 → CPsi (CO) esCLR: 0 → AC;(CP) → RA...3

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

Saved successfully!

Ooh no, something went wrong!