2 * test source file for assembling to Microsoft 16-bit .OBJ
3 * build with (16-bit Microsoft C):
4 * nasm -f obj objtest.asm
5 * cl /AL objtest.obj objlink.c
6 * other compilers should work too, provided they handle large
7 * model in the same way as MS C
13 int8_t text
[] = "hello, world\n";
15 extern void function(int8_t *);
16 extern int bsssym
, commvar
;
18 extern void *selfptr2
;
22 printf("these should be identical: %p, %p\n",
23 (int32_t)selfptr
, (int32_t)&selfptr
);
24 printf("these should be equivalent but different: %p, %p\n",
25 (int32_t)selfptr2
, (int32_t)&selfptr2
);
26 printf("you should see \"hello, world\" twice:\n");
30 printf("this should be 0xF00E: 0x%X\n", bsssym
);
31 printf("this should be 0xD00E: 0x%X\n", commvar
);