I’m looking at making a hardware debug tool that runs on the bare CPU (x86), 32-bit protected mode and no OS. Due to time constraints, I won’t be writing the tool all in x86 assembly. I like the Ada language (but am inexperienced with it) and thought it might be interesting to use Ada rather than C for this project.
With C one can use inline assembly or call subprograms written in assembly to access the BIOS for basic things like keyboard I/O or displaying text on the screen. Does Ada have a similar capability? And if so, does anyone know of any resources or tutorials for calling assembly methods and linking with them?
You can use inline assembly code in Ada. You need to use the
System.Machine_Codepackage which provides the (overloaded)Asmfunction.