1 /* Project 16 Source Code~
\r
2 * Copyright (C) 2012-2018 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover
\r
4 * This file is part of Project 16.
\r
6 * Project 16 is free software; you can redistribute it and/or modify
\r
7 * it under the terms of the GNU General Public License as published by
\r
8 * the Free Software Foundation; either version 3 of the License, or
\r
9 * (at your option) any later version.
\r
11 * Project 16 is distributed in the hope that it will be useful,
\r
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
14 * GNU General Public License for more details.
\r
16 * You should have received a copy of the GNU General Public License
\r
17 * along with this program. If not, see <http://www.gnu.org/licenses/>, or
\r
18 * write to the Free Software Foundation, Inc., 51 Franklin Street,
\r
19 * Fifth Floor, Boston, MA 02110-1301 USA.
\r
25 //#include <limits.h>
\r
27 #include "src/lib/exmm/memory.h"
\r
29 int main(int argc, char *argv[])
\r
33 char huge *p =(char huge *)(GetEMMSeg0()*0x10000);//0xD0000000;
\r
34 //char far *q =(char far *)0x53332225;
\r
35 printf("1p=%p %ul\n", p, GetEMMSeg0());
\r
36 //while(!kbhit()){ printf("%p\n", ((GetEMMSeg0()*0x10000)+0x0fffffff)); }
\r
37 //while(!kbhit()){ printf("%p\n", ((GetEMMSeg0()*0x10000)+0xffff)); }
\r
38 if(argv[1]) { printf("switch on!\n"); while(!kbhit()){} }
\r
39 while(p<=(char huge *)((GetEMMSeg0()*0x10000)+0xffff)/*i<262144UL*/ && !kbhit())
\r
41 if(argv[1]!=NULL) (*p) = i; else
\r
42 //else printf("%p= %x% %ul\n", p, *p, i);
\r
43 if((i%8)==0) printf("%p= %c %c %c %c %c %c %c %c\n", p,
\r
44 *p, *(p+1), *(p+2), *(p+3), *(p+4), *(p+5), *(p+6), *(p+7));
\r
46 // printf(" %p\n", ((GetEMMSeg0()*0x10000)+0x0fffffff));
\r
51 //printf("*q=%d\n",*q);
\r
52 //printf(" q=%p\n", q);
\r
53 printf(" p=%p\n", p);
\r
54 printf(" w=%d\n", w);
\r
55 printf(" w=%p\n", w);
\r
56 printf("GetEMMSeg0()=%p\n", GetEMMSeg0()*0x10000);
\r