Discuss all aspects of programming here. From 8-bit through to modern architectures.
5 posts • Page 1 of 1
Assuming this is what you mean, the info is in the User Guide entry for the PRINT# keyword on page 328:
Integer variables are written as &40 followed by the two’s complement representation of the integer in four bytes, most significant byte first.
Real variables are written as &FF followed by four bytes of mantissa and one byte exponent. The mantissa is sent lowest significant bit (lsb) first. 31 bits represent the magnitude of the mantissa and 1 bit the sign. The exponent byte is in two’s complement excess 128 form.
String variables are written as &00 followed by a 1 byte “byte count” followed by the characters in the string in reverse order.
Any files created by any method have no format, they are pure binary. Any internal format of the binary data is entirely and completely down to the programmer chosing what to so with it.
Last edited by jgharston on Wed Jul 11, 2018 9:43 pm, edited 1 time in total.
Code: Select all
$ bbcbasic PDP11 BBC BASIC IV Version 0.25 (C) Copyright J.G.Harston 1989,2005-2015 >_