Hi!
I'm wondering how to perform:
"To read and write call interrupts using instruction int (e.g. int 10h)."
(in nasm x86)
for example:
bits 32
extern _printf, _scanf
global _main
section .data
message db "Hello!", 10, 0
section .text
_main:
pushad
push dword message
call _printf <--- how to?
add esp, 4
popad
ret
and
bits 32
extern _printf, _scanf
global _main
section .bss
value resd 1
section .data
message db "Hello!", 10, 0
handler db "%d"
section .text
_main:
pushad
push dword value
push dword handler
call _scanf <--- how to?
add esp, 8
popad
ret
So I need to use int instruction instead of _scanf and _printf..
Any advise?
thanx in advance!