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