Advertisement
theguild42

ASM hello

Apr 6th, 2023
1,123
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. org 7c00h
  2. use16
  3.  
  4.  
  5. debut:
  6.     mov si, message
  7.     call print
  8.  
  9.     jmp $
  10.  
  11.  
  12. print:
  13.     include "./video.asm"
  14. ;    include "./color.asm"
  15. ;    t720x400
  16.     g640x480
  17.     red
  18. .loop:
  19.     lodsb
  20.     cmp al, 00h
  21.     jz .done
  22.     call print_char
  23.     jmp .loop
  24. .done:
  25.     ret
  26.  
  27. print_char:
  28.     mov ah, 00eh ; write charcter and advance cursor
  29.     int 010h
  30.     ret
  31.  
  32. ;    jmp $
  33. ;    include "./stoschar.asm"
  34.  
  35.  
  36. message:
  37.     db 'Hello, World!', 00h
  38. ;    stoschar 048h, 065h, 06ch, 06ch, 06fh, 0afh, 00h
  39.  
  40. fin:
  41.     cli
  42.     hlt
  43.  
  44.     times 510-($-$$) db 0
  45.     dw 0aa55h
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement