Skip to content

Instantly share code, notes, and snippets.

@x1unix
Created October 1, 2019 21:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save x1unix/764095075f72f4e3358614bd3992f6a1 to your computer and use it in GitHub Desktop.
Save x1unix/764095075f72f4e3358614bd3992f6a1 to your computer and use it in GitHub Desktop.
; Infinite loop (e9 fd ff)
jmp start
message db 'Hello yoba' ; 10 bytes
start:
mov ah, 0x0e ; tty mode
mov cx, 0
mov bx, message
print:
cmp cx, 10
je end
mov al, byte [bx]
int 0x10
inc cx
inc bx
jmp print
end:
jmp end
; Fill with 510 zeros minus the size of the previous code
times 510-($-$$) db 0
; Magic number
dw 0xaa55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment