Implemented reading file into memory
This commit is contained in:
parent
9eb3ef1488
commit
b7b8ce8054
@ -60,8 +60,13 @@ begin
|
||||
goto THE_END;
|
||||
end if;
|
||||
I := I + 1;
|
||||
if I = 16 then
|
||||
goto END_VALID;
|
||||
end if;
|
||||
|
||||
end loop;
|
||||
<< END_VALID >>
|
||||
Bin_IO.Close(F);
|
||||
Put_Line("Header passed");
|
||||
|
||||
if Argument_Count > 1 then
|
||||
@ -75,7 +80,18 @@ begin
|
||||
MemoryArr (i) := 0;
|
||||
end loop;
|
||||
|
||||
|
||||
I := 0;
|
||||
Bin_IO.Open(F, Bin_IO.In_File, FileName);
|
||||
while not Bin_IO.End_Of_File (F) loop
|
||||
Bin_IO.Read(F, Value);
|
||||
MemoryArr(I) := Value;
|
||||
I := I + 1;
|
||||
end loop;
|
||||
Bin_IO.Close(F);
|
||||
|
||||
for i in 0 .. 15 loop
|
||||
Put_Line(Byte'Image(MemoryArr (i)));
|
||||
end loop;
|
||||
|
||||
end;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user