/[public]/psiconv/trunk/formats/psion/Basic_Elements.psi
ViewVC logotype

Contents of /psiconv/trunk/formats/psion/Basic_Elements.psi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations)
Sun Oct 3 21:10:47 1999 UTC (24 years, 6 months ago) by frodo
File MIME type: application/octet-stream
File size: 4331 byte(s)
Imported sources

1 7mþŸUºþ”
2 dÈ"Times New RomanN123O*Koptekst 1L ð
3 < *Koptekst 2Lð ð
4 < *Koptekst 3L *OpsomtekenO³•Swissÿÿÿÿh3r h3r ÐР \cefd\cDefLdý‚.ÆA$[Basic Elements][Basic Storage Elements]Basic ElementsBasic Storage ElementsAll other elements can be descibed in terms of these three basic storage elements:Abbr. Full Desciption B Byte 1 byte long (8 bits) W Word 2 bytes long L Long 4 bytes longAll numbers are written in hexcode. So 48 equals 72 decimal. A sequence of bytes is written like 4e 00 00 10. As the Psion uses little endian, this corresponds to the number 1000004e. Negative numbers are expressed using two's complement notation: F7 corresponds to -9.Sometimes, we need to talk about individual bits. A byte has 8 bits; bit 0 is the LSB (value: 1), bit 7 the MSB (value: 80).[Lists]ListsOften lists are used. A list consists of an indication of its length, followed by length elements. A BListB uses a byte as length indicator and its length is counted in bytes. A LListB uses a long to encode the length, counted in bytes, etc. So the first letter tells how the length indicator is encoded: in a byte (B), word (W), long (L), special (S) or extra (X). The last letter tells what unit the length count is in: bytes (B), words (W), Longs (L) or elements as described (E).We can make the following matrix: Element SizeIndicator B W L E B BlistB [BListB] BListW [BListW] BListL [BListL] BlistE [BListE] W WlistB [WListB] WListW [WListW] WListL [WListL] WlistE [WListE] L LlistB [LListB] LListW [LListW] LListL [LListL] LlistE [LListE] S SlistB [SListB] SListW [SListW] SListL [SListL] SlistE [SListE] X XlistB [XListB] XListW [XListW] XListL [XListL] XlistE [XListE]The special and extra encodings need some more explanation.They are both used in cases where it is unclear how big a number needs to be represented. Both use an expandable scheme to encode numbers.Special encoding:Length described Length of indicator Value of indicator How to recognize00000000 - 0000003F B 4 * length + 2 First byte & 03 == 0400000080 - 00001FFF W 8 * length + 3 First byte & 07 == 03Extra encoding:Length described Length of indicator Value of indicator How to recognize00000000 - 0000007F B 2 * length First byte & 01 == 0000000080 - 00003FFF W 4 * length + 1 First byte & 03 == 0100004000 - 1FFFFFFF L 8 * length + 3 First byte & 07 == 03 ð"Times New Roman  " Courier New ð"Times New Roman " Courier New  " Courier New$)S}å"#GGGGGÆLCCL@CC @"Arial ð"Times New Roman ð"Times New Roman ð"Times New Roman  " Courier New  " Courier New  " Courier New ð"Times New Roman"  " Courier New  " Courier New  " Courier NewC  " Courier New  " Courier NewC  " Courier New  " Courier NewC  " Courier New  " Courier NewB  " Courier New ð"Times New Roman  " Courier NewB  " Courier New ð"Times New RomanK  " Courier New  " Courier NewK  " Courier New  " Courier New"Word.app C"yC ‰­

Properties

Name Value
svn:mime-type application/octet-stream

frodo@frodo.looijaard.name
ViewVC Help
Powered by ViewVC 1.1.26