Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Videolabguy

Pages: [1]
1
QB64 Discussion / Re: Binary file mode questions
« on: April 24, 2019, 09:18:44 pm »
Thank you kindly.

2
QB64 Discussion / Re: Binary file mode questions
« on: April 24, 2019, 12:17:03 am »
Thanks!

3
QB64 Discussion / Binary file mode questions
« 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~

Pages: [1]