Skip to content

Instantly share code, notes, and snippets.

@alex-robert-fr
Last active November 28, 2022 15:29
Show Gist options
  • Save alex-robert-fr/aa3c485c3e06b4432032471311b4a761 to your computer and use it in GitHub Desktop.
Save alex-robert-fr/aa3c485c3e06b4432032471311b4a761 to your computer and use it in GitHub Desktop.
Function with parameter in asm
;main.asm
[org 0x7c00]
global _start
_start:
mov bx, HELLO_MSG
call print
mov ah, 0x0e
mov al, bl
int 0x10
jmp $
%include "print_string.asm"
times 510-($-$$) db 0
dw 0xaa55
;print_string.asm
print:
pusha
mov ah, 0x0e
mov al, bl
int 0x10
popa
ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment