You must understand what a zero-based array means. Suppose you have an array with four elements. If you set the index of the first element to 0 then the array elements can be accessed be the indexes 0, 1, 2, 3 -- note: the last index is 1 less than the count of elements!
So, looking at your variable declarations, I see "QwordBytes : array[0..256] of QWORD ". Index 0 up to 256 means that there are 257 elements -- I guess this is not what you want, you probably want 256 elements, then the index range must go up to 255 only.
But I think this is not the problem in your code.
Further down your code there is, in the while loop, "for i := 0 to BytesRead do". The same issue again: you read n (=BytesRead) bytes, then i can only run from 0 to n-1, not to n.
Even more important, now not related with the zero-based arrays: BytesRead is the number of bytes read from the file. You read them into an array of QWord numbers. In the interior of the for loop you access the individual elements of the array, but the index runs over the array bytes. This is a factor 8 too much! Divide the BytesRead by 8 (or more general: SizeOf(QWord)) to obtain the number of QWords read from the file:
There is a final issue: What if the size of the file is not a multiple of SizeOf(QWordbytes)? Then the last chunk of data read will fill the QwordBytes array only partially. Since there are still the data from the previous read cylcle they may appear in the data of the last cycle. Therefore, erase the QwordBytes before BlockRead.
var
NumQWords: Integer;
....
while not EOF (FileInput) do
begin
FillChar(QwordBytes, 0, SizeOf(QWordBytes)); // <-- erase QwordBytes
BlockRead (FileInput, QwordBytes, SizeOf(QwordBytes), BytesRead) ;
NumQWords := BytesRead div SizeOf(QWord); // <-- calculates the number of QwordBytes elements read
if BytesRead mod SizeOf(QWord) <> 0 then inc(NumQWords); // <-- catch case that BytesRead is not divisible by 8
for i := 0 to NumQWords-1 do
begin
write(QwordBytes[i]) ;
write(' ') ;
end ;
end;