Any suggestions what to improve in a pascal program?

I've made a message encoder/decoder that can encrypt text messages (almost all ASCII chars) into a code using a given cypher and the encoded message can be decrypted only by using the same cypher.v1.0 was quite unstable, also with every new line in the input file, it used to lose 1 or 2 of last characters of the message.v1.1 was improved so you could set the input, output and cypher file names in the program (before, you had to use the default ones)v1.2 I fixed the character-loss problem, but a bug occurred - after decoding, in the end of file there were 1 additional line with a space in it.v1.3 - fixed all the bugs mentioned above, cleaned up the code a little. Stable version.