Hex dump issue

Ok I've written a simple command line program to do a hex dump of a file. It reads in unformatted data converts it to hex and prints out the hex until it hits an eof byte. For txt files I'm getting an identical dump to most hex editors. The issue comes in when dumping an exe file. When dumping an exe file most commercial hex editors tend to have around 10 times more data then my program dumps. Im trying to figure out why this is. If anyone has worked on something similar and has any info I'd be very greatfull for any help. Also if it will help I can post the code and sample dumps after I'm done with class for the day.
Don't quit at EOF(0x04 or 0x1A?). That's just a byte like any other. Read all the way to the end of the file.
Ok I'll have to try that. I know on the text file it isn't exiting on 0x04 or 0x1A but I'll have to check if that's what's making it end early on the exe. Thanks for the advice
Topic archived. No new replies allowed.