Implemented reading file into memory

This commit is contained in:
Bartłomiej Szostak 2024-04-20 19:35:56 +02:00
parent 9eb3ef1488
commit b7b8ce8054
No known key found for this signature in database
GPG Key ID: 562DACF230A18086

View File

@ -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;