/* Prints the numbers from 1 to 10 * followed by "Done!" message * * $Id: simple_loop.asm,v 1.1 2004/02/24 15:54:26 schinz Exp $ */ memsize 1 // set the size of the data memory area push 1 store 0 // initialize the counter (mem[0]) to 1 loop: load 0 // load the counter (mem[0]) push 11 cmpe jnz exit // exit if mem[0] == 11 load 0 dup printi prints "\n" // print a new line character push 1 add // increment the counter store 0 goto loop // loop exit: prints "Done!" break // exit