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 parameters are usually passed through the AX and DX registers. You can use all of them if you need but AX is the most common. Yes the stack can be used as long as you don't push or pop from it in between calling and executing the interrupt.
Gizmic OS
Currently - Busy with FAT12 driver and VFS
From what I recall, Turbo C normally compiles an interrupt call to preserve registers. That means you can
a) Not return anything directly
b) Those saved registers are most likely on the stack, so you can not easily pass anything that way.
Also Turbo C compiles for a 286 architecture. It can't do 32-bit code, let alone 64-bit code.
If you're serious about OS development you should grab a GCC Cross-Compiler instead.
"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 ]
You don't need to use GNU AS. Nasm, Yasm and Fasm are popular alternatives (and they all do intel syntax).
Still, AS in intel mode is awkward to use since it occasionally uses different names for opcodes compared to the intel manuals (especially the kernel-level instructions)
"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 ]
No FASM if he wants to combine his code with any other compiler, let it be ASM, C, pascal or any other. (Well, if he wants to know the magic of hardcore hex-editing, file offsets and copying raw chunks of data, let him )
"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 ]