Page 1 of 1
Noob question:INT 41 or INT 10
Posted: Fri Feb 24, 2006 4:09 am
by gmax136
while writing a string INT 41 easier than INT 10
, but what is different?Why everbody using INT 10? Can we write colored strings(but use INT 41)?And last question;
Creating a kernel: f. Ex. :
[BITS 32]
mov eax,1234 ;(may not true
)
cmp eax,1234
je .exit
jne .repeat
;end
may my program have a problem but this an example
and i want use this asm function in C code
example:
check(); //like this, i want call my asm function,
THANKS
Re:Noob question:INT 41 or INT 10
Posted: Fri Feb 24, 2006 5:11 am
by Pype.Clicker
Int 41/AX=0000h - MS Windows debugging kernel - OUTPUT CHARACTER FOR USER
Int 41/AX=0001h - MS Windows debugging kernel - INPUT CHARACTER
Int 41/AX=000Dh - MS Windows debugging kernel - TASK GOING OUT
Int 41/AX=000Eh - MS Windows debugging kernel - TASK COMING IN
Int 41/AX=0012h - MS Windows debugging kernel - OutputDebugString
Int 41/AX=004Fh - MS Windows debugging kernel - DEBUGGER INSTALLATION CHECK
I guess that should plainly explain why we prefer sticking to INT 10
Unless you're booted by Windows, you're unlikely to have those services installed.
... not mentionning that the 'regular' use for that int vector is to
store the address of disk parameters as used by the BIOS
Code: Select all
[BITS 32]
mov eax,1234 ;(may not true )
cmp eax,1234
je .exit
jne .repeat
;end
; may my program have a problem but this an example
<puzzled>
what exactly are you trying to do here ? what "problem" do you expect ? except the fact there's neither ".exit" nor ".repeat" here ...
</puzzled>
and i want use this asm function in C code
example:
check(); //like this, i want call my asm function,
Then make sure you don't have underscores generated ahead of your C symbols and learn the C calling conventions.
Code: Select all
global check
check:
; do_stuff
mov eax, return_value
ret
should do it. Read your assembler manual and tutorials to find out if it works differently than mine.