Noob question:INT 41 or INT 10

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
gmax136

Noob question:INT 41 or INT 10

Post by gmax136 »

while writing a string INT 41 easier than INT 10 :D, 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 :D


and i want use this asm function in C code
example:

check(); //like this, i want call my asm function,


THANKS
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Noob question:INT 41 or INT 10

Post 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 :P 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 :P

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.
Post Reply