There are several problems with this script:
1. You're querying the file size while writing to the file. This is asking for trouble because I/O routines are normally buffered due to efficiency reasons, i.e. data won't be written to the file until it has reached a certain size because it would be very very inefficient to turn on the drive motor for writing just a single byte

Bottom line: Querying file size while writing to it is highly unreliable and won't get you the current size. There's a function named
FilePos() which returns the current cursor position which you can use instead.
2. Why do you call
Seek() here at all? It is not necessary because
WriteChr() will automatically advance the file cursor by 1. So you don't have to seek manually to the end.
3. The function will never write "A" (= ASCII 65) because my_frame is increased by one right at the function entry point, thus you will always start at ASCII 66 which is equivalent to the letter "B" but because querying the file size while writing is unreliable it can also happen that it starts somewhere else... depends on how long 0 is returned as the file size...