Trying to follow your code and your projections is a little straining on this old man!
Anyways, I assume you have a ASCII /Text list of a HEX string dump of some memory or file so this is what I would do...
First simply search for the desired value in a binary path...
Set a Pointer to the start of where you want to be.. , in this case $2000, you can use INDEXes from an array too if you wish..., what ever the method you would like.
It looks like you are looking for a 32 bit field so use a PDWORD type and set it to the start of your memory search and use it to find your value
While MyPDWord < Max_Range do
Begin
If MYPDWORD^ = $00000A Then
begin
//We found it.
Break;
End else Inc(UintPtr(MyPDWORd));
End;
check here to the Max_Range and ensure it didn't abort to the end of the buffer..
Now you have the exact place in memory but now you would like to know how to determine the first HEX line it would be shown..
MyFirstHexLineAddress := UintPtr(MyPWord) and (N0t $0A);
and of course the next line would be $0A added to it..
Of course you can do all of this using integers as an index too...