File Format - FX-603P
Fileheader
| Byte | Content | |
| FX-502P filenumber | FX-602P filenanme | |
| -7 | Filetype byte 1 – see below. | |
| -6 | Filetype byte 2 – see below. | |
| -5 | Low nibble $A, high nibble last digit of file number. | low nibble is low nibble of 6th character of the filename, high nibble is low nibble of the 5th character of the file name |
| -4 | Low nibble second digit, high nibble first digit of file number. | low nibble is low nibble of 4th character of the filename, high nibble is low nibble of the 3rd character of the file name |
| -3 | $FF | low nibble is low nibble of 2nt character of the filename, high nibble is low nibble of the 1st character of the file name |
| -2 | $FF | low nibble is high nibble of 6th character of the filename, high nibble is high nibble of the 5th character of the file name |
| -1 | $FF | low nibble is high nibble of 4th character of the filename, high nibble is high nibble of the 3rd character of the file name |
| 0 | $FF | low nibble is high nibble of 2nd character of the filename, high nibble is high nibble of the 1st character of the file name |
| 1 | Start of real programm or data. | |
Filenames
The way file name are encoded is rather tricky.
| Step | Operation | Result |
| 1 | Original Filename | "<font style="color:DodgerBlue;">A</font><font style="color:ForestGreen">B</font><font style="color:maroon">a</font><font style="color:teal">b</font><font style="color:HotPink">1</font><font style="color:OliveDrab">2</font>" |
| 2 | The characters are reversed | "<font style="color:OliveDrab">2</font><font style="color:HotPink">1</font><font style="color:teal">b</font><font style="color:maroon">a</font><font style="color:ForestGreen">B</font><font style="color:DodgerBlue;">A</font>" |
| 3 | To continue we need to byte hex codes | $<font style="color:OliveDrab">72</font> $<font style="color:HotPink">71</font> $<font style="color:teal">91</font> $<font style="color:maroon">90</font> $<font style="color:ForestGreen">31</font> $<font style="color:DodgerBlue;">30</font> |
| 4 | The byte hex codes are splitt into there nibbles. | <font style="color:OliveDrab">$7</font> <font style="color:OliveDrab">$2</font> <font style="color:HotPink">$7</font> <font style="color:HotPink">$1</font> <font style="color:teal">$9</font> <font style="color:teal">$1</font> <font style="color:maroon">$9</font> <font style="color:maroon">$0</font> <font style="color:ForestGreen">$3</font> <font style="color:ForestGreen">$1</font> <font style="color:DodgerBlue;">$3</font> <font style="color:DodgerBlue;">$0</font> |
| 5 | Nibbles reorder – see colour code. | <font style="color:HotPink">$1</font> <font style="color:OliveDrab">$2</font> <font style="color:maroon">$0</font> <font style="color:teal">$1</font> <font style="color:DodgerBlue;">$0</font> <font style="color:ForestGreen">$1</font> <font style="color:HotPink">$7</font> <font style="color:OliveDrab">$7</font> <font style="color:maroon">$9</font> <font style="color:teal">$9</font> <font style="color:DodgerBlue;">$3</font> <font style="color:ForestGreen">$3</font> |
| 6 | The nibbles are merged back to bytes | $<font style="color:HotPink">1</font><font style="color:OliveDrab">2</font> $<font style="color:maroon">0</font><font style="color:teal">1</font> $<font style="color:DodgerBlue;">0</font><font style="color:ForestGreen">1</font> $<font style="color:HotPink">7</font><font style="color:OliveDrab">7</font> $<font style="color:maroon">9</font><font style="color:teal">9</font> $<font style="color:DodgerBlue;">3</font> <font style="color:ForestGreen">3</font> |
| 7 | File Header | $04 $E0 $<font style="color:HotPink">1</font><font style="color:OliveDrab">2</font> $<font style="color:maroon">0</font><font style="color:teal">1</font> $<font style="color:DodgerBlue;">0</font><font style="color:ForestGreen">1</font> $<font style="color:HotPink">7</font><font style="color:OliveDrab">7</font> $<font style="color:maroon">9</font><font style="color:teal">9</font> $<font style="color:DodgerBlue;">3</font> <font style="color:ForestGreen">3</font> $00 |
If you want to know the the file name you need to calculate as follows:
Char(1) = (Header(-3) AND $0F ) OR (( Header(0) AND $0F) LSHIFT 4) Char(2) = ((Header(-3) AND $F0) RSHIFT 4) OR ( Header(0) AND $F0) Char(3) = (Header(-4) AND $0F ) OR (( Header(1) AND $0F) LSHIFT 4) Char(4) = ((Header(-4) AND $F0) RSHIFT 4) OR ( Header(1) AND $F0) Char(3) = (Header(-5) AND $0F ) OR (( Header(2) AND $0F) LSHIFT 4) Char(4) = ((Header(-5) AND $F0) RSHIFT 4) OR ( Header(2) AND $F0)
Filetypes
The following file types are currently known.
| Byte 1 | Byte 2 | Content | Created with | Displayed Type |
| $40 | $40 | M-Register data file | Mode 1 SAVE "" EXE | DF |
| Display data file (numeric) | Mode 1 SAVE "" invEXE | DF | ||
| Display data file (alpha) | Mode 1 SAVE "" invEXE | DF | ||
| $04 | $0E | Program file | Mode 3 SAVE "" EXE | PF |
| $40 | $0E | Password protected program file | Mode 3 SAVE "" EXE | PF |
| All file (program and data) | Mode 3 SAVE "" invEXE | AF | ||
| Password protected all file | Mode 3 SAVE "" infEXE | AF |
Passwords
Passwörter - auch mumerische werden im Klartext mit Zeichen aus der gespeichert. Allerdings das letzte zeichen zu erst. Abgeschlossen werden sie mit dem Password ende markter $EC.
Datafiles
Each Memory Register is stored in 8 bytes beginning with byte 1. The Memory Register are stored M00-M09, M0F, M10-M19, M1F, etc. Each number is BCD encoded and normalized to ±X.XXXXX×10<sup>±yy</sup>.
The mantissa if M register is only 10 digits (unlinke the mantissa of L register wich is 12 digits) and is stored in packed BCD, least significat digit first.
The exponent is three BCD digits in size and biased by 100 (See: Excess-N). That means an exponent of 101 stand for ×10<sup>1</sup>, 100 for ×10<sup>0</sup>, 99 for ×10<sup>-1</sup> and so forth.
| Byte | High Nibble | Low Nibble |
| 1 | exponent digit 2 | exponent digit 3 |
| 2 | ??? | exponent digit 1 |
| 3 | mantissa digit 10 | ??? |
| 4 | mantissa digit 8 | mantissa digit 9 |
| 5 | mantissa digit 6 | mantissa digit 7 |
| 6 | mantissa digit 4 | mantissa digit 5 |
| 7 | mantissa digit 2 | mantissa digit 3 |
| 8 | ??? | mantissa digit 1 |

