X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Femsdump.c;h=d14601ddf4a97c174b2ab3dec7e653b673e2b842;hb=579be865a2f1d2a84d5295506f3e8ea9815d11af;hp=39808b70ad908b3b69eae4e88fc62acd3e564ac7;hpb=e0335fc72d6856ec3df7a081281ebd8f36e3981d;p=16.git diff --git a/src/emsdump.c b/src/emsdump.c old mode 100644 new mode 100755 index 39808b70..d14601dd --- a/src/emsdump.c +++ b/src/emsdump.c @@ -1,58 +1,58 @@ -/* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 - * - * This file is part of Project 16. - * - * Project 16 is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Project 16 is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see , or - * write to the Free Software Foundation, Inc., 51 Franklin Street, - * Fifth Floor, Boston, MA 02110-1301 USA. - * - */ - -#include -#include -//#include - -#include "src/lib/exmm/memory.h" - -int main(int argc, char *argv[]) -{ - unsigned long i=0; - char near w; - char huge *p =(char huge *)(GetEMMSeg0()*0x10000);//0xD0000000; - //char far *q =(char far *)0x53332225; - printf("1p=%p %ul\n", p, GetEMMSeg0()); - //while(!kbhit()){ printf("%p\n", ((GetEMMSeg0()*0x10000)+0x0fffffff)); } - //while(!kbhit()){ printf("%p\n", ((GetEMMSeg0()*0x10000)+0xffff)); } - if(argv[1]) { printf("switch on!\n"); while(!kbhit()){} } - while(p<=(char huge *)((GetEMMSeg0()*0x10000)+0xffff)/*i<262144UL*/ && !kbhit()) - { - if(argv[1]!=NULL) (*p) = i; else - //else printf("%p= %x% %ul\n", p, *p, i); - if((i%8)==0) printf("%p= %c %c %c %c %c %c %c %c\n", p, -*p, *(p+1), *(p+2), *(p+3), *(p+4), *(p+5), *(p+6), *(p+7)); -// (*p)++; -// printf(" %p\n", ((GetEMMSeg0()*0x10000)+0x0fffffff)); - i++; - p++; - } - w=104; - //printf("*q=%d\n",*q); - //printf(" q=%p\n", q); - printf(" p=%p\n", p); - printf(" w=%d\n", w); - printf(" w=%p\n", w); - printf("GetEMMSeg0()=%p\n", GetEMMSeg0()*0x10000); - return 0; -} +/* Project 16 Source Code~ + * Copyright (C) 2012-2020 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * + * This file is part of Project 16. + * + * Project 16 is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * Project 16 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see , or + * write to the Free Software Foundation, Inc., 51 Franklin Street, + * Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include +#include +//#include + +#include "src/lib/exmm/memory.h" + +int main(int argc, char *argv[]) +{ + unsigned long i=0; + char near w; + char huge *p =(char huge *)(GetEMMSeg0()*0x10000);//0xD0000000; + //char far *q =(char far *)0x53332225; + printf("1p=%p %ul\n", p, GetEMMSeg0()); + //while(!kbhit()){ printf("%p\n", ((GetEMMSeg0()*0x10000)+0x0fffffff)); } + //while(!kbhit()){ printf("%p\n", ((GetEMMSeg0()*0x10000)+0xffff)); } + if(argv[1]) { printf("switch on!\n"); while(!kbhit()){} } + while(p<=(char huge *)((GetEMMSeg0()*0x10000)+0xffff)/*i<262144UL*/ && !kbhit()) + { + if(argv[1]!=NULL) (*p) = i; else + //else printf("%p= %x% %ul\n", p, *p, i); + if((i%8)==0) printf("%p= %c %c %c %c %c %c %c %c\n", p, +*p, *(p+1), *(p+2), *(p+3), *(p+4), *(p+5), *(p+6), *(p+7)); +// (*p)++; +// printf(" %p\n", ((GetEMMSeg0()*0x10000)+0x0fffffff)); + i++; + p++; + } + w=104; + //printf("*q=%d\n",*q); + //printf(" q=%p\n", q); + printf(" p=%p\n", p); + printf(" w=%d\n", w); + printf(" w=%p\n", w); + printf("GetEMMSeg0()=%p\n", GetEMMSeg0()*0x10000); + return 0; +}