Data Format in Storage

Data format is least significant byte at lowest address!

This arrangement is not intuitive for many people, because when you read bytes, the data placement seems reversed. The tools will let you display storage as bytes, words, and doublewords; the data will be re-arranged to suit the format requested. This can be good or bad.

For example:

DB 1F:1608 L 20
001f:00001608 42 4f 4f 4b 53 48 45 4c-46 3d 43 3a 5c 4f 53 32 BOOKSHELF=C:\OS2
001f:00001618 5c 42 4f 4f 4b 3b 00 43-4f 4d 53 50 45 43 3d 43 \BOOK;.COMSPEC=C

DA 1F:1608
001f:00001608 BOOKSHELF=C:\OS2\BOOK;

DB 17:0 L40
0017:00000000 02 00 03 00 05 00 07 00-0b 00 0d 00 11 00 13 00 ................
0017:00000010 17 00 1d 00 1f 00 25 00-29 00 2b 00 2f 00 35 00 ......%.).+./.5.
0017:00000020 3b 00 3d 00 43 00 47 00-49 00 4f 00 53 00 59 00 ;.=.C.G.I.O.S.Y.
0017:00000030 61 00 65 00 67 00 6b 00-6d 00 71 00 7f 00 83 00 a.e.g.k.m.q.....

DW 17:0 L20
0017:00000000  0002 0003 0005 0007 000b 000d 0011 0013
0017:00000010  0017 001d 001f 0025 0029 002b 002f 0035
0017:00000020  003b 003d 0043 0047 0049 004f 0053 0059
0017:00000030  0061 0065 0067 006b 006d 0071 007f 0083

DW 17:1 L 20
0017:00000001  0300 0500 0700 0b00 0d00 1100 1300 1700
0017:00000011  1d00 1f00 2500 2900 2b00 2f00 3500 3b00
0017:00000021  3d00 4300 4700 4900 4f00 5300 5900 6100
0017:00000031  6500 6700 6b00 6d00 7100 7f00 8300 8900

DD 17:0 L 10
0017:00000000  00030002 00070005 000d000b 00130011
0017:00000010  001d0017 0025001f 002b0029 0035002f
0017:00000020  003d003b 00470043 004f0049 00590053
0017:00000030  00650061 006b0067 0071006d 0083007f

DD 17:1 L 10
0017:00000001  05000300 0b000700 11000d00 17001300
0017:00000011  1f001d00 29002500 2f002b00 3b003500
0017:00000021  43003d00 49004700 53004f00 61005900
0017:00000031  67006500 6d006b00 7f007100 89008300

DD 17:2 L10
0017:00000002  00050003 000b0007 0011000d 00170013
0017:00000012  001f001d 00290025 002f002b 003b0035
0017:00000022  0043003d 00490047 0053004f 00610059
0017:00000032  00670065 006d006b 007f0071 00890083

You need to know what you are looking at!


[Back: Page Table Contents]
[Next: Exercise 2: Paging, Addresses, Data]