blob: ac86059d5c38464d1892534ab60fd6c188f83ec2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# test of 16-bit binary prints
# need to use big_endian2() to get consistent results across
# different-endian architectures.
probe begin
{
set_endian(2)
printf("%2b", 0x12)
printf("%2b", 0x34)
printf("%2b%2b", 0xabcd, 0x5678)
a = 0x12345678
b = 0xabcd
c = 0x8888
d = 0xcdef
printf("%2b%2b%2b%2b", a, b, c, d)
printf("a=%2b b=%2b c=%2b d=%2b",a,b,c,d)
exit()
}
|