1 |
|
---|
2 | #include "bs3kit.h"
|
---|
3 | #include <iprt/assert.h>
|
---|
4 |
|
---|
5 | AssertCompileSize(uint16_t, 2);
|
---|
6 | AssertCompileSize(uint32_t, 4);
|
---|
7 | AssertCompileSize(uint64_t, 8);
|
---|
8 |
|
---|
9 |
|
---|
10 | /* Just a sample. */
|
---|
11 | BS3_DECL(void) Main_pe16(void)
|
---|
12 | {
|
---|
13 | void BS3_FAR *pvTmp1;
|
---|
14 | void BS3_FAR *pvTmp2;
|
---|
15 | void BS3_FAR *pvTmp3;
|
---|
16 | void BS3_FAR *pvTmp4;
|
---|
17 |
|
---|
18 | Bs3TestInit("bs3-shutdown");
|
---|
19 |
|
---|
20 | Bs3PrintStr("Bs3PrintX32:");
|
---|
21 | Bs3PrintX32(UINT32_C(0xfdb97531));
|
---|
22 | Bs3PrintStr("\n");
|
---|
23 |
|
---|
24 | Bs3Printf("Bs3Printf: RX32=%#'RX32 string='%s' d=%d p=%p\n", UINT32_C(0xfdb97531), "my string", 42, Main_pe16);
|
---|
25 |
|
---|
26 | pvTmp2 = Bs3MemAlloc(BS3MEMKIND_REAL, _4K);
|
---|
27 | Bs3PrintStr("pvTmp2=");
|
---|
28 | Bs3PrintX32((uintptr_t)pvTmp2);
|
---|
29 | Bs3PrintStr("\n");
|
---|
30 |
|
---|
31 | pvTmp3 = Bs3MemAlloc(BS3MEMKIND_REAL, _4K);
|
---|
32 | Bs3PrintStr("pvTmp3=");
|
---|
33 | Bs3PrintX32((uintptr_t)pvTmp3);
|
---|
34 | Bs3PrintStr("\n");
|
---|
35 | Bs3MemFree(pvTmp2, _4K);
|
---|
36 |
|
---|
37 | pvTmp4 = Bs3MemAlloc(BS3MEMKIND_REAL, _4K);
|
---|
38 | Bs3PrintStr("pvTmp4=");
|
---|
39 | Bs3PrintX32((uintptr_t)pvTmp4);
|
---|
40 | Bs3PrintStr("\n");
|
---|
41 | Bs3PrintStr("\n");
|
---|
42 |
|
---|
43 | pvTmp1 = Bs3MemAlloc(BS3MEMKIND_REAL, 31);
|
---|
44 | Bs3PrintStr("pvTmp1=");
|
---|
45 | Bs3PrintX32((uintptr_t)pvTmp1);
|
---|
46 | Bs3PrintStr("\n");
|
---|
47 |
|
---|
48 | pvTmp2 = Bs3MemAlloc(BS3MEMKIND_REAL, 17);
|
---|
49 | Bs3PrintStr("pvTmp2=");
|
---|
50 | Bs3PrintX32((uintptr_t)pvTmp2);
|
---|
51 | Bs3PrintStr("\n");
|
---|
52 |
|
---|
53 | Bs3MemFree(pvTmp1, 31);
|
---|
54 | pvTmp3 = Bs3MemAlloc(BS3MEMKIND_REAL, 17);
|
---|
55 | Bs3PrintStr("pvTmp3=");
|
---|
56 | Bs3PrintX32((uintptr_t)pvTmp3);
|
---|
57 | Bs3PrintStr("\n");
|
---|
58 |
|
---|
59 |
|
---|
60 | Bs3Panic();
|
---|
61 | Bs3Shutdown();
|
---|
62 | return;
|
---|
63 | }
|
---|
64 |
|
---|