How do I access memory addresses directly in Ada?
问题 So I'm new to Ada, and I'm attempting to write a kernel in it, but I cannot seem to find any good information on how to do this properly. In C, I would write: unsigned char* videoram = (char*) 0xB8000; videoram[0] = 65; to access the video ram directly and write 'a' to it. I've heard I need to use an Ada array and other pragma's to do this in a typesafe manner in Ada. Is there any good resources on this kind of Ada programming? 回答1: You can use the 'Address attribute: Videoram : String (1 ..