]> 4ch.mooo.com Git - 16.git/blob - src/fartest.c
wwww
[16.git] / src / fartest.c
1 #include<stdio.h>
2 #include <conio.h>
3 //#include <limits.h>
4
5 #include "src/lib/exmm/memory.h"
6
7 int main(int argc, char *argv[])
8 {
9         unsigned long i=0;
10         char near w;
11         char huge *p =(char huge *)(GetEMMSeg0()*0x10000);//0xD0000000;
12         //char far *q =(char far *)0x53332225;
13         printf("1p=%p   %ul\n", p, GetEMMSeg0());
14         //while(!kbhit()){              printf("%p\n", ((GetEMMSeg0()*0x10000)+0x0fffffff));    }
15         //while(!kbhit()){              printf("%p\n", ((GetEMMSeg0()*0x10000)+0xffff));        }
16         if(argv[1])     {               printf("switch on!\n");         while(!kbhit()){}       }
17         while(p<=(char huge *)((GetEMMSeg0()*0x10000)+0xffff)/*i<262144UL*/ && !kbhit())
18         {
19                 if(argv[1]!=NULL) (*p) = i; else
20                 //else printf("%p=      %x%     %ul\n", p, *p, i);
21                 if((i%8)==0) printf("%p= %c %c %c %c %c %c %c %c\n", p,
22 *p, *(p+1), *(p+2), *(p+3), *(p+4), *(p+5), *(p+6), *(p+7));
23 //              (*p)++;
24 //              printf("                                %p\n", ((GetEMMSeg0()*0x10000)+0x0fffffff));
25                 i++;
26                 p++;
27         }
28         w=104;
29         //printf("*q=%d\n",*q);
30         //printf(" q=%p\n", q);
31         printf(" p=%p\n", p);
32         printf(" w=%d\n", w);
33         printf(" w=%p\n", w);
34         printf("GetEMMSeg0()=%p\n", GetEMMSeg0()*0x10000);
35         return 0;
36 }