]> 4ch.mooo.com Git - 16.git/commitdiff
looking at tesuto now~
authorsparky4 <sparky4@cock.li>
Fri, 13 May 2016 15:43:39 +0000 (10:43 -0500)
committersparky4 <sparky4@cock.li>
Fri, 13 May 2016 15:43:39 +0000 (10:43 -0500)
src/test0.c

index f5eb99b93d0d31f9e5b889c24baf6a510348d581..802f328e7cc93a76444264fae9d9c81ff81a7e04 100755 (executable)
@@ -1,14 +1,37 @@
 #include <stdio.h>\r
 #include <malloc.h>\r
 \r
-void main()\r
+void baka(unsigned far *z)\r
 {\r
        unsigned w;\r
-       unsigned far *z;\r
 //     w = _nmalloc(sizeof(unsigned));\r
        z=(&w);\r
        for(w=0; w<16;w++)\r
        {\r
                printf("z=(%Fp)%u       w=(%Fp)%u\n", z, *z, &w, w);\r
        }\r
+       printf("\n");\r
+}\r
+\r
+void pee(unsigned far *z)\r
+{\r
+       unsigned near *w;\r
+       w = _nmalloc(sizeof(unsigned));\r
+       z=(w);\r
+       for((*w)=0;(*w)<16;(*w)++)\r
+       {\r
+               printf("z=(%Fp)%u       w=(%Fp)%u\n", z, *z, w, *w);\r
+       }\r
+       printf("\n");\r
+}\r
+\r
+void main()\r
+{\r
+       unsigned near w;\r
+       unsigned far *z;\r
+       baka(z);\r
+       pee(z);\r
+       printf("&w=%Fp\n", &w);\r
+       printf("z=%Fp\n", z);\r
+       printf("*z=%Fp\n", *z);\r
 }\r