; Fibonacci MOV A, 1 ; first fib is 1 MOV B, 1 ; second fib is 1 MOV D, 232 ; location for output .loop: MOV [D], A ; move A to display location INC D ; move to next output location MOV C, A ; copy A's value to reg. C ADD C, B ; add B to A MOV A, B ; set 1st fib to 2nd fib MOV B, C ; set 2nd fib to sum JNC .loop ; jump if not carry/overflow HLT