OSDN Git Service

updated copyright. i am not dead just busy. i am working more on wolfenstien 3d and...
[proj16/16.git] / src / emsdump.c
old mode 100644 (file)
new mode 100755 (executable)
index 39808b7..d14601d
@@ -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 <http://www.gnu.org/licenses/>, or
- * write to the Free Software Foundation, Inc., 51 Franklin Street,
- * Fifth Floor, Boston, MA 02110-1301 USA.
- *
- */
-
-#include<stdio.h>
-#include <conio.h>
-//#include <limits.h>
-
-#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~\r
+ * Copyright (C) 2012-2020 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover\r
+ *\r
+ * This file is part of Project 16.\r
+ *\r
+ * Project 16 is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation; either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * Project 16 is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>, or\r
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,\r
+ * Fifth Floor, Boston, MA 02110-1301 USA.\r
+ *\r
+ */\r
+\r
+#include<stdio.h>\r
+#include <conio.h>\r
+//#include <limits.h>\r
+\r
+#include "src/lib/exmm/memory.h"\r
+\r
+int main(int argc, char *argv[])\r
+{\r
+       unsigned long i=0;\r
+       char near w;\r
+       char huge *p =(char huge *)(GetEMMSeg0()*0x10000);//0xD0000000;\r
+       //char far *q =(char far *)0x53332225;\r
+       printf("1p=%p   %ul\n", p, GetEMMSeg0());\r
+       //while(!kbhit()){              printf("%p\n", ((GetEMMSeg0()*0x10000)+0x0fffffff));    }\r
+       //while(!kbhit()){              printf("%p\n", ((GetEMMSeg0()*0x10000)+0xffff));        }\r
+       if(argv[1])     {               printf("switch on!\n");         while(!kbhit()){}       }\r
+       while(p<=(char huge *)((GetEMMSeg0()*0x10000)+0xffff)/*i<262144UL*/ && !kbhit())\r
+       {\r
+               if(argv[1]!=NULL) (*p) = i; else\r
+               //else printf("%p=      %x%     %ul\n", p, *p, i);\r
+               if((i%8)==0) printf("%p= %c %c %c %c %c %c %c %c\n", p,\r
+*p, *(p+1), *(p+2), *(p+3), *(p+4), *(p+5), *(p+6), *(p+7));\r
+//             (*p)++;\r
+//             printf("                                %p\n", ((GetEMMSeg0()*0x10000)+0x0fffffff));\r
+               i++;\r
+               p++;\r
+       }\r
+       w=104;\r
+       //printf("*q=%d\n",*q);\r
+       //printf(" q=%p\n", q);\r
+       printf(" p=%p\n", p);\r
+       printf(" w=%d\n", w);\r
+       printf(" w=%p\n", w);\r
+       printf("GetEMMSeg0()=%p\n", GetEMMSeg0()*0x10000);\r
+       return 0;\r
+}\r