Hi
I need to append an integer to the FAT1
Can I just use appendBytetoFile and put there my 16Bit Integer and FAT1 will write all 16 bit (in 2Byte)?
append Byte to file, but I have an integer
-
- Valued Contributor
- Posts: 654
- Joined: Fri Aug 19, 2016 2:09 pm
- Location: switzerland
- Has thanked: 182 times
- Been thanked: 179 times
- Contact:
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: append Byte to file, but I have an integer
Hello,
You will need to store the two bytes of the 16-bit value separately.
AppendByteToFile ( IntVar ) //Store Lower 8-bits
AppendByteToFile ( IntVar >> 8 ) //Store Upper 8-bits
You will need to store the two bytes of the 16-bit value separately.
AppendByteToFile ( IntVar ) //Store Lower 8-bits
AppendByteToFile ( IntVar >> 8 ) //Store Upper 8-bits
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel