after storing 2 numbers, how add them , display answer??
this have far, need output answer @ end. appreciated:
.orig x3000 lea r0, ln1 puts lea r2, no1 loop1 getc str r0, r2, 0 add r2, r2, 1 add r1, r0, -10 brz out1 out brnzp loop1 out1 lea r0, ln2 puts lea r2, no2 loop2 getc str r0, r2, 0 add r2, r2, 1 add r1, r0, -10 brz out2 out brnzp loop2 out2 lea r0, ln3 puts halt no1 .blkw 15 no2 .blkw 15 ln3 .stringz "\nsum: " ln1 .stringz "\nenter first number: " ln2 .stringz "\nenter second number: " .end
Comments
Post a Comment