Author Topic: xio/86 bootLoader  (Read 15846 times)

Offline Structure

  • Jr. Member
  • *
  • Posts: 21
xio/86 bootLoader
« on: January 07, 2020, 02:03:43 PM »
 8)

Code: [Select]
bits 16
org 0x7C00

jmp init_boot_loader

__OEM: db "ready...", 0x0a, 0x0d, 0

%macro print 1
    mov si, %1
    %%char_loop:
        mov cl, [si]
        inc si
        cmp cl, 0
        je  %%exit_loop
        mov al, cl
        mov ah, 0x0e
        int 0x10
    call %%char_loop
  %%exit_loop:
%endmacro

init_boot_loader:
  pusha
     mov ah, 0x02
     mov dl, 0
     mov ch, 0
     mov dh, 0
     mov al, 2
     mov cl, 2
     mov bx, 0x7C00 + 512
     int 0x13
  popa
jmp boot_loader_main

times 510-($-$$) db 0
dw 0xAA55

boot_loader_main:
 
  print __OEM

  jmp $

times (512+1024)-($-$$) db 0