: : : Hello
: : : I have a bin file (contains hex values) that i can open it with some other programs. I want to open the file with pascal, read specific address and show the data of specific address to screen. If someone can help?
: : :
: : Open the file as an untyped file, then Seek() to that address. You can then use BlockRead() to get a data block. Finally close the file.
: : Procedures to use:
: : - Assign()
: : - Reset() { make sure to set the record size to what you need }
: : - BlockRead()
: : - Close()
: : Types to use
: : - File
: :
: Thanks for the help. Here is my code :
:
: Procedure SERIALNUMBER;
: var
: NumFile : File;
: ASSIGN(NumFile,'1772.bin');
: RESET(NumFile);
: BlockREad(0,10); (the address must be in decimal or hexadecimal or what)
: CLOSE(NumFile);
:
:
All integers may be specified as you wish. In other words you can use both:
BlockRead(0, 10);
and
BlockRead($0, $A);