Does the assembly language have any built in functions? Where could a list of them be found? And how is an assembly function called? Arent they called interupts? :confused:
Printable View
Does the assembly language have any built in functions? Where could a list of them be found? And how is an assembly function called? Arent they called interupts? :confused:
No built-in functions. But MASM can access DLLs.
You use the call instruction to call a function. In MASM you can also use ".invoke".
Ahhhhhhh ok i see. Thanks CornedBee. :)
In assembly, you have procedures (basically like functions) and macros. Interrupts are BIOS routines that allows us to retrieve input, display to the console, and other various tasks.
Im guessing that since this is a low level language there are no built in functions though. Am i right? :confused:Quote:
posted by Darkwraith
In assembly, you have procedures (basically like functions) and macros.
Also how do you know what interrupts are available for you to use?
Thanks :D
No built-in functions. However using a linker you can access libraries written in C or Pascal.
Basically an interrupt is just a signal to the CPU. Those signals can come from hardware or software. If such a signal arrives, the CPU stops what it is currently doing (thus the name "interrupt") and looks up the handler for the interrupt in the interrupt table. It executes the handler up to an IRET instruction and then returns to what it was doing previously.
Since the interrupt table is mutable any piece of software with the access rights (BIOS, OS kernel, drivers in 32-bit, all apps in 16-bit) can hook their own interrupt handlers. OSs and BIOSs do it to provide some basic functionality or OS-routines. Those are OS-dependent and you must look them up in some reference.
See a link in the FAQ for a large table of what the interrupts are, which hardware might fire them and what the BIOS/OS does when they are fired.
Very interesting stuff. Ill have to find the time to program in assembly. Thanks. :D