3
« on: April 23, 2019, 11:42:59 pm »
I want to create a binary file that is byte based. Capable of accessing individual bytes, reading them in, logically modifying the bits within, and then writing the new byte back to the file. I did this many many years ago in QB4.5 no problem. This is for making state machine patterns I burn into flash memory and then clock out with a simple 19 bit counter. Think: "Player piano roll".
The QB keywords I can't recall were the ones that control the file pointer, read and write binary.
I can create the file. My counters is going from 0 to 524,287 (half a mega byte) But the resulting file is zero bytes long.
Would someone be kind enough to create a very simple code example of:
1. opening the file in binary mode,
2. writing a few hex FFs to it,
3. then reading one byte back in ,
4. modifying it and writing it back into the file at the same location?
Thanks in advance!
~Videolabguy~