; assumptions about the starting envionment cpu 8086 org 0x0000 _startup: mov ax, cs mov ds, ax mov es, ax mov ss, ax mov sp, 0x0000 main: xor ax, ax mov ds, ax mov si, ax mov cx, ax call debug_init int 0x2E call ivt_backup xor ax, ax mov ds, ax mov es, ax xor cx, cx mov si, ax .loop: mov ax, cx call kprint8 mov al, '=' call kputc lodsw xchg ax, dx lodsw call kprint16 mov al, ':' call kputc xchg ax, dx call kprint16 mov al, ' ' call kputc inc cx test cx, 0x0003 jnz .loop mov al, 0x0A call kputc mov al, 0x0D call kputc cmp cx, 0x0060 jl .loop .halt: hlt jmp .halt %include "heap.asm" %include "intr.asm" %include "debug.asm" %include "kprintf.asm" _reloc_end: align 16 heap: