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.
I saw many things(such as: video implementation, mouse control, etc.) that uses int 86. So I need to make an compatible funtion. Generating intrrerupt is simple, but i don't know how to move some data in registers. Can anyone help me? please...
Moved from OS Design and Theory. Not sure if this really belongs in General Programming - could you be a little more specific please - 'int 86'? Do you just mean that you want to be able to handle interrupts on an x86, do you want to use real mode BIOS interrupts or do you want to do something else where I have missed the point completely?
If you want to move data from memory to registers and vice versa, I suggest you look around for a good assembly programming tutorial.
I said I want to use only C and inline assembler.
What I Want is int86(INT int_no, REGS in_regs, REGS out_regs), a native dos function.
This function copies in_regs to registries, make an software intrerupt , and copies registries to out_regs.
Uses:
it should be very easy to implement .... eg... define the Regs structure ...
... save the initial regs ... call the given int ( or use a far jmp) ... save the resulting regs ....
Sorry ... you cant .... AS AJ pointed out ..you should read a good book on assembly language or 80x86 architecture .... I have provided u enough information .. or hints ... We are not here to do your work .. you should put some effort on ur part .... I am sorry if i sound rude ....
GCC is aimed at protected mode code, Turbo C and friends for real mode. You can't call bios interrupts directly from protected mode, you need to provide the proper environment first.
Given that you want to do video stuff, I suggest look at the various threads on the matter.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
eddyb wrote:on my djgpp compiler inline asm is confusing..
This inline assembly tutorial for GCC might help (but then again, it might not help if you don't have enough basic knowledge)...
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.