Guest User

Untitled

a guest
Jul 16th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1.  
  2. jmp start
  3.  
  4. intfunc1:
  5. cli
  6. mov edi, 0xB8000
  7. mov esi, string
  8. mov ah, 0x0F
  9. .displaying:
  10. lodsb
  11. stosw
  12. or al, al
  13. jnz .displaying
  14. iret
  15.  
  16. string: db "Hello world!", 0
  17.  
  18.  
  19. start:
  20. mov ax , 0 ; move zero into ax
  21. mov es , ax ; make es point to begining of IVT which is 0000:0000
  22. mov eax , dword intfunc1 ; move interrupt function address into eax
  23. mov dword [es:0400] , eax ; move eax into the 100th entry of the IVT
  24. sti
  25. int 64h ; call the 100th interrupt service routine
  26.  
  27. end:
  28. jmp end
  29.  
  30. times 510-($-$$) db 0
  31. dw 0AA55h ; some BIOSes require this signature
Add Comment
Please, Sign In to add comment