Is there anyone who knows how to locate the file pointer and display its value? I am currently doing an assembly program that searches for a string in a given file and returns its offset from the beginning of the file. For example, the display would be "string found at offset 001eh". I'm not sure though how to calculate something like 001eh but my project requirements is that. Thank you very much in advance.
niernier
0
Newbie Poster
Recommended Answers
Jump to Post???
When you access and search through a file you need a pointer anyway.
MOV AL,[file+EBX]
So write a routine that compares a string and a string (file) with an offset.
;ESI: string1 ;EDI: string2 PUSH EBX MOV ECX,string1length cmp_loop: MOV AL,[ESI+EBX] MOV …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.