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.
The "outb function" above is just a macro that emits inline assembly. Translate them directly into OUT assembly language instructions with an 8-bit data operand.
Last edited by Daidalos on Thu Nov 04, 2004 12:00 am, edited 2 times in total.
cipek wrote:I don't know how reprogramable PIT to 100Hz frequency. Please help me !!!
I've got this code in C but i don't know how change it into asembly
Instead of converting the code to assembly you could also do the assembly inside of the C code with inline assembly. We've got a quick tutorial for doing this type of thing located at http://www.osdev.org/howtos/2/index.html
chase wrote:Instead of converting the code to assembly you could also do the assembly inside of the C code with inline assembly. We've got a quick tutorial for doing this type of thing located at http://www.osdev.org/howtos/2/index.html
I agree. It would be much better in most cases to use inline assembly where necessary rather than converting entire functions to assembly. However if you are dead-set on converting the code to assembly, you could just use the -S option to gcc to do it.
gcc -S foo.c
will make a file called foo.s which is the assembly for your file.
That instruction is an invalid combination of opcodes and operands. The out instruction uses only AL or an immediate operand. It cannot use a memory location or any other registers either.
Two things are infinite: The universe and human stupidity. But I'm not quite sure about the universe.
--- Albert Einstein