Important Notice: Due to repeated WikiSPAM attacks it was nessesary to change the access policy! Only registered users can now edit.

Office/FX-602P/File

From UIQ3 open-source software

Jump to: navigation, search
Main Page > Office > FX-602P > Office/FX-602P/File

Contents


Fileheader

Standart Plane
Byte Content
Standart Plane
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.


File name generation
Step Operation Result
1 Original Filename "ABab12"
2 The characters are reversed "21baBA"
3 To continue we need to byte hex codes $72 $71 $91 $90 $31 $30
4 The byte hex codes are splitt into there nibbles. $7 $2 $7 $1 $9 $1 $9 $0 $3 $1 $3 $0
5 Nibbles reorder – see colour code. $1 $2 $0 $1 $0 $1 $7 $7 $9 $9 $3 $3
6 The nibbles are merged back to bytes $12 $01 $01 $77 $99 $3 3
7 File Header $04 $E0 $12 $01 $01 $77 $99 $3 3 $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.

standard Plane
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 Alpha_Plane 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±yy.

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 ×101, 100 for ×100, 99 for ×10-1 and so forth.

BCD Number
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
Personal tools