prog START 0 LDA #5 JSUB sum halt J halt sum CLEAR B sumLoop ADDR A, B SUB #1 COMP #0 JGT sumLoop RMO B, A RSUB END prog