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