Hell and assembly

I am looking for a hardware debugging tool that runs on a clean CPU (x86), 32-bit protected mode and no OS. Due to time constraints, I will not write a tool in x86 assembly. I like the Ada language (but I'm inexperienced) and thought it would be interesting to use Ada rather than C for this project.

With C, you can use the built-in assemblies or calls to routines written in the assembly to access the BIOS for basic things, such as keyboard I / O or displaying text on the screen. Does Ada have a similar opportunity? And if so, does anyone know any resources or tutorials to call assembly methods and reference them?

+5
source share
2 answers

You can use the built-in assembler code in Ada. You need to use a package System.Machine_Codethat provides a function (overloaded) Asm.

+5
source

The GNAT reference manual has a section on Machine Code Inserts , and although it is defined in GNAT, you need to be able to get a general idea of ​​how it works, even if you use a different compiler.

+2
source

All Articles