echo

echo - // push 0x0 for comparison IF_ICMPEQ L2 // if no...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
// // echo.jas // // Author // Dan Stone // // Description // Sample assembly program that reads a key press and echoes the result to // standard output. // / .main . L1: IN // request character input from memory DUP // duplicate top of stack (inputed char) for comparing BIPUSH 0x0
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: // push 0x0 for comparison IF_ICMPEQ L2 // if no characters are available for input, loop OUT // else, print character GOTO L1 // loop back to beginning of program L2: POP // No key has been pushed, so clear the stack, GOTO L1 // and start over .end-main...
View Full Document

This note was uploaded on 12/02/2010 for the course CS 570 at USC.

Ask a homework question - tutors are online