// // 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 // 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