!commentStart //author: rrs //name: add1to10 //hwk: //description: This program adds numbers 1 to 10. // Save the sum in memory and also print it. //assembles: yes/no //executes: yes/no/partly !commentEnd !dataStart 70 cnt initword #10 valx initword #1 result initword #0 !dataEnd !textStart 80 loop: sub #1 cnt //if cnt<0, done jumpct #1 done //else do more work out result //add teh val add valx result //incr valx for next round add #1 valx jumpa loop done: nop out result halt !textEnd !stackStart 128 !stackEnd