-
Notifications
You must be signed in to change notification settings - Fork 0
/
bytelocation.pas
85 lines (60 loc) · 1.7 KB
/
bytelocation.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
program bytelocation;
var l:longint;
k:word;
bl:array[0..3] of byte absolute l;
begin
writeln( sizeof(pointer),' ',sizeof(longint),' ',sizeof(word));
l := $01020304;
write(' $01020304=',l,' internally it''s ');
for k:= 0 to 3 do write(bl[k],' ');
writeln;
l := $04;
write(' $04=',l,' internally it''s ');
for k:= 0 to 3 do write(bl[k],' ');
writeln;
l := $0400;
write(' $0400=',l,' internally it''s ');
for k:= 0 to 3 do write(bl[k],' ');
writeln;
l := $040000;
write(' $040000=',l,' internally it''s ');
for k:= 0 to 3 do write(bl[k],' ');
writeln;
l := $04000000;
write(' $04000000=',l,' internally it''s ');
for k:= 0 to 3 do write(bl[k],' ');
writeln;
l := $0d0c0b0a ;
write('$0d0c0b0a=',l,' internally it''s ');
for k:= 0 to 3 do write(bl[k],' ');
writeln;
l := 255;
write('l=',l,' internally it''s ');
for k:= 0 to 3 do write(bl[k],' ');
writeln;
l := 0;
write('l=',l,' internally it''s ');
for k:= 0 to 3 do write(bl[k],' ');
writeln;
l := 2;
write('l=',l,' internally it''s ');
for k:= 0 to 3 do write(bl[k],' ');
writeln;
l := 256;
write('l=',l,' internally it''s ');
for k:= 0 to 3 do write(bl[k],' ');
writeln;
l := $010000;
write('l=',l,' internally it''s ');
for k:= 0 to 3 do write(bl[k],' ');
writeln;
l := $01000000;
write('l=',l,' internally it''s ');
for k:= 0 to 3 do write(bl[k],' ');
writeln;
l :=ORD(' ')*256*65536;
write('Byte1Space=' ,l,' ');
for k:= 0 to 3 do write(bl[k],' ');
writeln;
readln;
end.