; Simple example -- Gauss JMP start total: DB 0 ; Variable count: DB 1 ; limit: DB 10; start: MOV A, [total]; MOV B, [count]; MOV C, [limit]; ADD C, 1 .loop: ADD A, B ADD B, 1 CMP B, C JNZ .loop HLT