Ok , I see
But the first person that posted gave this
If you want to use a parameter that was passed on the stack as the graphics mode, the function should be written in one of the following ways:
movzx ax,byte ptr [bp+4]
If you just want to pass the parameter in AL and not on the stack, the code would be:
I am wondering about the first set_graphics_mode as well as the second one.
In the second one why does he do 2 pops and a push instruction ?
Also this statement
And to answer your original question: using interrupts is very very slow. In Pmode, it is one of only 3 ways to handle "privilege level switching" -- from usermode to kernelmode, so you may be FORCED to use it because you have no other real choice. If you are not in Pmode, then it is always better to use CALL/RET rather than INT/IRET for writing functions.
well I am in 16bit mode and if I want to set a graphics screen resolution I would need to use an int command.
I am curious though why int /IRETcommands is much slower then the call/ret commands.
I thought the int command just pushed an addition flags registar on the stack as opposed to just pushing the cs ip registers on the stack....etc
So it would only be one more thing it does more then the call command . Correct me if I am wrong.
Also correct me if I am wrong
when the computer first starts up the only thing we have availible function wise is the bios interrupts and the VGA/VESA graphics interrupts (i.e int 13h , int 10h )
Is their any other interrupts that are universial (i.e you can pretty much count on them to be availble at bootup)
I know their is a list of interrupts ,...etc here http://www.ctyme.com/intr/int.htm
and many other places but I am not sure how univerial they are for a particular computer .
can you count on keyboard interrupts int 16h , mouse , sound ,...etc as well.