9086/boot_code/fibonacci.asm

39 lines
296 B
NASM
Raw Normal View History

INCLUDE dos_layer.asm
org 0x100
mov sp,#STACK
MOV AX,#0x1
MOV BX,#0x1
CALL PRINT_16_HEX
push bx
MAIN_LOOP:
pop bx
CALL PRINT_16_HEX
push AX
ADD AX,BX
JNC MAIN_LOOP
pop bx
MOV AH,#0x02
MOV DL,#0x0a
INT #0x21
hlt
.BLKB 200
STACK:
INCLUDE helpers.asm
.ORG 0xFFF0
MOV AX,#0x0100
JMP AX