Vote count:
0
In the code I inherited, a buffer is passed to a procedure using its start address and length as parameters. This procedure code uses inline assembly language to process the buffer contents.
In a new procedure that uses the same parameters, I want to refer to the buffer as an array but I want to use the same parameters and their types that the existing procedure uses. This is so I don't have to make intrusive modifications to the original code except to use the same calling signature, which is like this:
procedure Push_Buffer(
Source_Address : Address;
Count : Natural);
In this case, the buffer is just an array of machine words. I want to refer to it as an array of machine words, and already have types (Word and Buffer_Type) that are used elsewhere without a problem. (The objects of unconstrained type Buffer_Type have their constraints defined where they are used.)
I would like to refer to the buffer that's being passed by address as an array within my procedure. How would I do this?
Ada 83 Address to Array Conversion
Aucun commentaire:
Enregistrer un commentaire