Page 1 of 1

append Byte to file, but I have an integer

Posted: Tue Jan 17, 2017 5:35 pm
by stefan.erni
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)?

Re: append Byte to file, but I have an integer

Posted: Tue Jan 17, 2017 6:04 pm
by Benj
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