From: sparky4 Date: Wed, 5 Aug 2015 03:40:52 +0000 (-0500) Subject: I am understanding why the memory management system is not working now!! X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=b95a3ae5a2c979c08f3b16eebe79dd2fd0f17615;p=16.git I am understanding why the memory management system is not working now!! modified: 16.exe modified: 16/exmmtest/EXMMTEST.DSK modified: 16/exmmtest/EXMMTEST.EXE modified: 16/exmmtest/EXMMTEST.MAP modified: 16/exmmtest/EXMMTEST.PRJ new file: 16/exmmtest/HEAP.16 new file: 16/exmmtest/TC0000.SWP modified: 16/exmmtest/src/exmmtest.c modified: 16/exmmtest/src/lib/16_ca.c modified: 16/exmmtest/src/lib/16_hc.c modified: 16/exmmtest/src/lib/16_head.c modified: 16/exmmtest/src/lib/16_head.h modified: 16/exmmtest/src/lib/16_mm.c new file: 16/exmmtest/src/lib/nyan/kitten.c new file: 16/exmmtest/src/lib/nyan/kitten.h modified: exmmtest.exe modified: inputest.exe modified: makefile modified: scroll.exe modified: sountest.exe modified: src/exmmtest.c modified: src/lib/16_ca.c modified: src/lib/16_hc.c modified: src/lib/16_head.c modified: src/lib/16_head.h modified: src/lib/16_mm.c modified: src/lib/nyan/kitten.c modified: src/lib/nyan/kitten.h --- diff --git a/16.exe b/16.exe index dae2e20e..d0458619 100644 Binary files a/16.exe and b/16.exe differ diff --git a/16/exmmtest/EXMMTEST.DSK b/16/exmmtest/EXMMTEST.DSK index af8fa187..b6525f91 100644 Binary files a/16/exmmtest/EXMMTEST.DSK and b/16/exmmtest/EXMMTEST.DSK differ diff --git a/16/exmmtest/EXMMTEST.EXE b/16/exmmtest/EXMMTEST.EXE index dea7d963..70a92eec 100644 Binary files a/16/exmmtest/EXMMTEST.EXE and b/16/exmmtest/EXMMTEST.EXE differ diff --git a/16/exmmtest/EXMMTEST.MAP b/16/exmmtest/EXMMTEST.MAP index d564f574..70abacfe 100644 --- a/16/exmmtest/EXMMTEST.MAP +++ b/16/exmmtest/EXMMTEST.MAP @@ -1,472 +1,516 @@ Start Stop Length Name Class - 00000H 04FBBH 04FBCH _TEXT CODE - 04FC0H 04FC0H 00000H _FARDATA FAR_DATA - 04FC0H 04FC0H 00000H _FARBSS FAR_BSS - 04FC0H 04FC0H 00000H _OVERLAY_ OVRINFO - 04FC0H 04FC0H 00000H _1STUB_ STUBSEG - 04FC0H 06163H 011A4H _DATA DATA - 06164H 06165H 00002H _CVTSEG DATA - 06166H 0616BH 00006H _SCNSEG DATA - 0616CH 0616CH 00000H _CONST CONST - 0616CH 0617DH 00012H _INIT_ INITDATA - 0617EH 0617EH 00000H _INITEND_ INITDATA - 0617EH 0617EH 00000H _EXIT_ EXITDATA - 0617EH 0617EH 00000H _EXITEND_ EXITDATA - 0617EH 061DFH 00062H _BSS BSS - 061E0H 061E0H 00000H _BSSEND BSSEND - 061E0H 0625FH 00080H _STACK STACK + 00000H 05880H 05881H _TEXT CODE + 05890H 05890H 00000H _FARDATA FAR_DATA + 05890H 05890H 00000H _FARBSS FAR_BSS + 05890H 05890H 00000H _OVERLAY_ OVRINFO + 05890H 05890H 00000H _1STUB_ STUBSEG + 05890H 06941H 010B2H _DATA DATA + 06942H 06943H 00002H _CVTSEG DATA + 06944H 06949H 00006H _SCNSEG DATA + 0694AH 0694AH 00000H _CONST CONST + 0694AH 06961H 00018H _INIT_ INITDATA + 06962H 06962H 00000H _INITEND_ INITDATA + 06962H 06962H 00000H _EXIT_ EXITDATA + 06962H 06962H 00000H _EXITEND_ EXITDATA + 06962H 069C9H 00068H _BSS BSS + 069CAH 069CAH 00000H _BSSEND BSSEND + 069D0H 06A4FH 00080H _STACK STACK Detailed map of segments 0000:0000 028F C=CODE S=_TEXT G=(none) M=c0.ASM ACBP=28 - 0000:028F 0283 C=CODE S=_TEXT G=(none) M=EXMMTEST.C ACBP=28 - 0000:0512 1947 C=CODE S=_TEXT G=(none) M=16_MM.C ACBP=28 - 0000:1E59 0442 C=CODE S=_TEXT G=(none) M=16_HEAD.C ACBP=28 - 0000:229B 0232 C=CODE S=_TEXT G=(none) M=16_CA.C ACBP=28 - 0000:24CD 0024 C=CODE S=_TEXT G=(none) M=ATEXIT ACBP=28 - 0000:24F1 0049 C=CODE S=_TEXT G=(none) M=CLOCK ACBP=28 - 0000:253A 0000 C=CODE S=_TEXT G=(none) M=CTYPE ACBP=28 - 0000:253A 003D C=CODE S=_TEXT G=(none) M=DOSFATTR ACBP=28 - 0000:2577 0089 C=CODE S=_TEXT G=(none) M=EXIT ACBP=28 - 0000:2600 0000 C=CODE S=_TEXT G=(none) M=FILES ACBP=28 - 0000:2600 0000 C=CODE S=_TEXT G=(none) M=FILES2 ACBP=28 - 0000:2600 0000 C=CODE S=_TEXT G=(none) M=FMODE ACBP=28 - 0000:2600 00AE C=CODE S=_TEXT G=(none) M=H_LDIV ACBP=28 - 0000:26AE 0021 C=CODE S=_TEXT G=(none) M=H_LLSH ACBP=28 - 0000:26CF 0021 C=CODE S=_TEXT G=(none) M=H_LURSH ACBP=28 - 0000:26F0 0060 C=CODE S=_TEXT G=(none) M=H_PADD ACBP=28 - 0000:2750 0028 C=CODE S=_TEXT G=(none) M=H_PSBP ACBP=28 - 0000:2778 004B C=CODE S=_TEXT G=(none) M=IOERROR ACBP=28 - 0000:27C3 0011 C=CODE S=_TEXT G=(none) M=ISATTY ACBP=28 - 0000:27D4 00A2 C=CODE S=_TEXT G=(none) M=LONGTOA ACBP=28 - 0000:2876 0029 C=CODE S=_TEXT G=(none) M=LSEEK ACBP=28 - 0000:289F 00B0 C=CODE S=_TEXT G=(none) M=MKNAME ACBP=28 - 0000:294F 0021 C=CODE S=_TEXT G=(none) M=N_PCMP ACBP=28 - 0000:2970 00B2 C=CODE S=_TEXT G=(none) M=SETUPIO ACBP=28 - 0000:2A22 0000 C=CODE S=_TEXT G=(none) M=STKLEN ACBP=28 - 0000:2A22 002C C=CODE S=_TEXT G=(none) M=TOLOWER ACBP=28 - 0000:2A4E 0018 C=CODE S=_TEXT G=(none) M=UNLINK ACBP=28 - 0000:2A66 04DB C=CODE S=_TEXT G=(none) M=VPRINTER ACBP=28 - 0000:2F41 009F C=CODE S=_TEXT G=(none) M=VRAM ACBP=28 - 0000:2FE0 0000 C=CODE S=_TEXT G=(none) M=WSCROLL ACBP=28 - 0000:2FE0 0030 C=CODE S=_TEXT G=(none) M=_STPCPY ACBP=28 - 0000:3010 0004 C=CODE S=_TEXT G=(none) M=CORELEFT ACBP=28 - 0000:3014 014E C=CODE S=_TEXT G=(none) M=CPRINTF ACBP=28 - 0000:3162 01A5 C=CODE S=_TEXT G=(none) M=CRTINIT ACBP=28 - 0000:3307 001F C=CODE S=_TEXT G=(none) M=CVTFAK ACBP=28 - 0000:3326 042D C=CODE S=_TEXT G=(none) M=FARHEAP ACBP=28 - 0000:3753 013E C=CODE S=_TEXT G=(none) M=FBRK ACBP=28 - 0000:3891 0050 C=CODE S=_TEXT G=(none) M=FCORELFT ACBP=28 - 0000:38E1 0054 C=CODE S=_TEXT G=(none) M=GETCH ACBP=28 - 0000:3935 00AC C=CODE S=_TEXT G=(none) M=GPTEXT ACBP=28 - 0000:39E1 0029 C=CODE S=_TEXT G=(none) M=IOCTL ACBP=28 - 0000:3A0A 0012 C=CODE S=_TEXT G=(none) M=KBHIT ACBP=28 - 0000:3A1C 009D C=CODE S=_TEXT G=(none) M=MOVETEXT ACBP=28 - 0000:3AB9 0017 C=CODE S=_TEXT G=(none) M=PUTCH ACBP=28 - 0000:3AD0 0004 C=CODE S=_TEXT G=(none) M=REALCVT ACBP=28 - 0000:3AD4 01C7 C=CODE S=_TEXT G=(none) M=SCREEN ACBP=28 - 0000:3C9B 0184 C=CODE S=_TEXT G=(none) M=SCROLL ACBP=28 - 0000:3E1F 0129 C=CODE S=_TEXT G=(none) M=SETARGV ACBP=28 - 0000:3F48 001C C=CODE S=_TEXT G=(none) M=SETBLOCK ACBP=28 - 0000:3F64 002C C=CODE S=_TEXT G=(none) M=WHEREXY ACBP=28 - 0000:3F90 001D C=CODE S=_TEXT G=(none) M=CHMODA ACBP=28 - 0000:3FAD 0026 C=CODE S=_TEXT G=(none) M=CLOSE ACBP=28 - 0000:3FD3 001E C=CODE S=_TEXT G=(none) M=CLOSEA ACBP=28 - 0000:3FF1 00B0 C=CODE S=_TEXT G=(none) M=FCLOSE ACBP=28 - 0000:40A1 00C6 C=CODE S=_TEXT G=(none) M=FFLUSH ACBP=28 - 0000:4167 0041 C=CODE S=_TEXT G=(none) M=FLENGTH ACBP=28 - 0000:41A8 0040 C=CODE S=_TEXT G=(none) M=FLUSHALL ACBP=28 - 0000:41E8 01FE C=CODE S=_TEXT G=(none) M=FOPEN ACBP=28 - 0000:43E6 001C C=CODE S=_TEXT G=(none) M=FPRINTF ACBP=28 - 0000:4402 01D8 C=CODE S=_TEXT G=(none) M=FSEEK ACBP=28 - 0000:45DA 0070 C=CODE S=_TEXT G=(none) M=LTOA1 ACBP=28 - 0000:464A 0024 C=CODE S=_TEXT G=(none) M=MEMCPY ACBP=28 - 0000:466E 0022 C=CODE S=_TEXT G=(none) M=MOVEDATA ACBP=28 - 0000:4690 018D C=CODE S=_TEXT G=(none) M=OPEN ACBP=28 - 0000:481D 004F C=CODE S=_TEXT G=(none) M=OPENA ACBP=28 - 0000:486C 001B C=CODE S=_TEXT G=(none) M=PRINTF ACBP=28 - 0000:4887 03A4 C=CODE S=_TEXT G=(none) M=PUTC ACBP=28 - 0000:4C2B 0111 C=CODE S=_TEXT G=(none) M=SETVBUF ACBP=28 - 0000:4D3C 003F C=CODE S=_TEXT G=(none) M=STRCAT ACBP=28 - 0000:4D7B 0029 C=CODE S=_TEXT G=(none) M=STRCPY ACBP=28 - 0000:4DA4 001F C=CODE S=_TEXT G=(none) M=STRLEN ACBP=28 - 0000:4DC3 0149 C=CODE S=_TEXT G=(none) M=WRITE ACBP=28 - 0000:4F0C 003C C=CODE S=_TEXT G=(none) M=WRITEA ACBP=28 - 0000:4F48 0003 C=CODE S=_TEXT G=(none) M=WRITEU ACBP=28 - 0000:4F4B 003B C=CODE S=_TEXT G=(none) M=XFCLOSE ACBP=28 - 0000:4F86 0036 C=CODE S=_TEXT G=(none) M=XFFLUSH ACBP=28 - 04FC:0000 0000 C=FAR_DATA S=_FARDATA G=(none) M=c0.ASM ACBP=68 - 04FC:0000 0000 C=FAR_BSS S=_FARBSS G=(none) M=c0.ASM ACBP=68 - 04FC:0000 0000 C=OVRINFO S=_OVERLAY_ G=(none) M=c0.ASM ACBP=68 - 04FC:0000 0000 C=STUBSEG S=_1STUB_ G=(none) M=c0.ASM ACBP=68 - 04FC:0000 0093 C=DATA S=_DATA G=DGROUP M=c0.ASM ACBP=68 - 04FC:0094 01E2 C=DATA S=_DATA G=DGROUP M=EXMMTEST.C ACBP=48 - 04FC:0276 0AFF C=DATA S=_DATA G=DGROUP M=16_MM.C ACBP=48 - 04FC:0D76 0004 C=DATA S=_DATA G=DGROUP M=16_HEAD.C ACBP=48 - 04FC:0D7A 002C C=DATA S=_DATA G=DGROUP M=16_CA.C ACBP=48 - 04FC:0DA6 0002 C=DATA S=_DATA G=DGROUP M=ATEXIT ACBP=48 - 04FC:0DA8 0000 C=DATA S=_DATA G=DGROUP M=CLOCK ACBP=48 - 04FC:0DA8 0101 C=DATA S=_DATA G=DGROUP M=CTYPE ACBP=48 - 04FC:0EAA 0000 C=DATA S=_DATA G=DGROUP M=DOSFATTR ACBP=48 - 04FC:0EAA 0006 C=DATA S=_DATA G=DGROUP M=EXIT ACBP=48 - 04FC:0EB0 0190 C=DATA S=_DATA G=DGROUP M=FILES ACBP=48 - 04FC:1040 002A C=DATA S=_DATA G=DGROUP M=FILES2 ACBP=48 - 04FC:106A 0004 C=DATA S=_DATA G=DGROUP M=FMODE ACBP=48 - 04FC:106E 0000 C=DATA S=_DATA G=DGROUP M=H_LDIV ACBP=48 - 04FC:106E 0000 C=DATA S=_DATA G=DGROUP M=H_LLSH ACBP=48 - 04FC:106E 0000 C=DATA S=_DATA G=DGROUP M=H_LURSH ACBP=48 - 04FC:106E 0000 C=DATA S=_DATA G=DGROUP M=H_PADD ACBP=48 - 04FC:106E 0000 C=DATA S=_DATA G=DGROUP M=H_PSBP ACBP=48 - 04FC:106E 005B C=DATA S=_DATA G=DGROUP M=IOERROR ACBP=48 - 04FC:10CA 0000 C=DATA S=_DATA G=DGROUP M=ISATTY ACBP=48 - 04FC:10CA 0000 C=DATA S=_DATA G=DGROUP M=LONGTOA ACBP=48 - 04FC:10CA 0000 C=DATA S=_DATA G=DGROUP M=LSEEK ACBP=48 - 04FC:10CA 0009 C=DATA S=_DATA G=DGROUP M=MKNAME ACBP=48 - 04FC:10D4 0000 C=DATA S=_DATA G=DGROUP M=N_PCMP ACBP=48 - 04FC:10D4 0000 C=DATA S=_DATA G=DGROUP M=SETUPIO ACBP=48 - 04FC:10D4 0002 C=DATA S=_DATA G=DGROUP M=STKLEN ACBP=48 - 04FC:10D6 0000 C=DATA S=_DATA G=DGROUP M=TOLOWER ACBP=48 - 04FC:10D6 0000 C=DATA S=_DATA G=DGROUP M=UNLINK ACBP=48 - 04FC:10D6 0067 C=DATA S=_DATA G=DGROUP M=VPRINTER ACBP=48 - 04FC:113E 0000 C=DATA S=_DATA G=DGROUP M=VRAM ACBP=48 - 04FC:113E 0002 C=DATA S=_DATA G=DGROUP M=WSCROLL ACBP=48 - 04FC:1140 0000 C=DATA S=_DATA G=DGROUP M=_STPCPY ACBP=48 - 04FC:1140 0000 C=DATA S=_DATA G=DGROUP M=CORELEFT ACBP=48 - 04FC:1140 0000 C=DATA S=_DATA G=DGROUP M=CPRINTF ACBP=48 - 04FC:1140 0018 C=DATA S=_DATA G=DGROUP M=CRTINIT ACBP=48 - 04FC:1158 0031 C=DATA S=_DATA G=DGROUP M=CVTFAK ACBP=48 - 04FC:118A 0000 C=DATA S=_DATA G=DGROUP M=FARHEAP ACBP=48 - 04FC:118A 0002 C=DATA S=_DATA G=DGROUP M=FBRK ACBP=48 - 04FC:118C 0000 C=DATA S=_DATA G=DGROUP M=FCORELFT ACBP=48 - 04FC:118C 0000 C=DATA S=_DATA G=DGROUP M=GETCH ACBP=48 - 04FC:118C 0000 C=DATA S=_DATA G=DGROUP M=GPTEXT ACBP=48 - 04FC:118C 0000 C=DATA S=_DATA G=DGROUP M=IOCTL ACBP=48 - 04FC:118C 0002 C=DATA S=_DATA G=DGROUP M=KBHIT ACBP=48 - 04FC:118E 0000 C=DATA S=_DATA G=DGROUP M=MOVETEXT ACBP=48 - 04FC:118E 0000 C=DATA S=_DATA G=DGROUP M=PUTCH ACBP=48 - 04FC:118E 0000 C=DATA S=_DATA G=DGROUP M=REALCVT ACBP=48 - 04FC:118E 0000 C=DATA S=_DATA G=DGROUP M=SCREEN ACBP=48 - 04FC:118E 0000 C=DATA S=_DATA G=DGROUP M=SCROLL ACBP=48 - 04FC:118E 0010 C=DATA S=_DATA G=DGROUP M=SETARGV ACBP=48 - 04FC:119E 0000 C=DATA S=_DATA G=DGROUP M=SETBLOCK ACBP=48 - 04FC:119E 0000 C=DATA S=_DATA G=DGROUP M=WHEREXY ACBP=48 - 04FC:119E 0000 C=DATA S=_DATA G=DGROUP M=CHMODA ACBP=48 - 04FC:119E 0000 C=DATA S=_DATA G=DGROUP M=CLOSE ACBP=48 - 04FC:119E 0000 C=DATA S=_DATA G=DGROUP M=CLOSEA ACBP=48 - 04FC:119E 0000 C=DATA S=_DATA G=DGROUP M=FCLOSE ACBP=48 - 04FC:119E 0000 C=DATA S=_DATA G=DGROUP M=FFLUSH ACBP=48 - 04FC:119E 0000 C=DATA S=_DATA G=DGROUP M=FLENGTH ACBP=48 - 04FC:119E 0000 C=DATA S=_DATA G=DGROUP M=FLUSHALL ACBP=48 - 04FC:119E 0000 C=DATA S=_DATA G=DGROUP M=FOPEN ACBP=48 - 04FC:119E 0000 C=DATA S=_DATA G=DGROUP M=FPRINTF ACBP=48 - 04FC:119E 0000 C=DATA S=_DATA G=DGROUP M=FSEEK ACBP=48 - 04FC:119E 0000 C=DATA S=_DATA G=DGROUP M=LTOA1 ACBP=48 - 04FC:119E 0000 C=DATA S=_DATA G=DGROUP M=MEMCPY ACBP=48 - 04FC:119E 0000 C=DATA S=_DATA G=DGROUP M=MOVEDATA ACBP=48 - 04FC:119E 0000 C=DATA S=_DATA G=DGROUP M=OPEN ACBP=48 - 04FC:119E 0000 C=DATA S=_DATA G=DGROUP M=OPENA ACBP=48 - 04FC:119E 0000 C=DATA S=_DATA G=DGROUP M=PRINTF ACBP=48 - 04FC:119E 0001 C=DATA S=_DATA G=DGROUP M=PUTC ACBP=48 - 04FC:11A0 0004 C=DATA S=_DATA G=DGROUP M=SETVBUF ACBP=48 - 04FC:11A4 0000 C=DATA S=_DATA G=DGROUP M=STRCAT ACBP=48 - 04FC:11A4 0000 C=DATA S=_DATA G=DGROUP M=STRCPY ACBP=48 - 04FC:11A4 0000 C=DATA S=_DATA G=DGROUP M=STRLEN ACBP=48 - 04FC:11A4 0000 C=DATA S=_DATA G=DGROUP M=WRITE ACBP=48 - 04FC:11A4 0000 C=DATA S=_DATA G=DGROUP M=WRITEA ACBP=48 - 04FC:11A4 0000 C=DATA S=_DATA G=DGROUP M=WRITEU ACBP=48 - 04FC:11A4 0000 C=DATA S=_DATA G=DGROUP M=XFCLOSE ACBP=48 - 04FC:11A4 0000 C=DATA S=_DATA G=DGROUP M=XFFLUSH ACBP=48 - 04FC:11A4 0000 C=DATA S=_CVTSEG G=DGROUP M=c0.ASM ACBP=48 - 04FC:11A4 0002 C=DATA S=_CVTSEG G=DGROUP M=CVTFAK ACBP=48 - 04FC:11A6 0000 C=DATA S=_CVTSEG G=DGROUP M=REALCVT ACBP=48 - 04FC:11A6 0000 C=DATA S=_SCNSEG G=DGROUP M=c0.ASM ACBP=48 - 04FC:11A6 0006 C=DATA S=_SCNSEG G=DGROUP M=CVTFAK ACBP=48 - 04FC:11AC 0000 C=CONST S=_CONST G=DGROUP M=c0.ASM ACBP=48 - 04FC:11AC 0000 C=INITDATA S=_INIT_ G=DGROUP M=c0.ASM ACBP=48 - 04FC:11AC 0006 C=INITDATA S=_INIT_ G=DGROUP M=SETUPIO ACBP=48 - 04FC:11B2 0006 C=INITDATA S=_INIT_ G=DGROUP M=CRTINIT ACBP=48 - 04FC:11B8 0006 C=INITDATA S=_INIT_ G=DGROUP M=SETARGV ACBP=48 - 04FC:11BE 0000 C=INITDATA S=_INITEND_ G=DGROUP M=c0.ASM ACBP=28 - 04FC:11BE 0000 C=EXITDATA S=_EXIT_ G=DGROUP M=c0.ASM ACBP=48 - 04FC:11BE 0000 C=EXITDATA S=_EXITEND_ G=DGROUP M=c0.ASM ACBP=28 - 04FC:11BE 0000 C=BSS S=_BSS G=DGROUP M=c0.ASM ACBP=48 - 04FC:11BE 0000 C=BSS S=_BSS G=DGROUP M=EXMMTEST.C ACBP=48 - 04FC:11BE 0006 C=BSS S=_BSS G=DGROUP M=16_MM.C ACBP=48 - 04FC:11C4 0000 C=BSS S=_BSS G=DGROUP M=16_HEAD.C ACBP=48 - 04FC:11C4 000A C=BSS S=_BSS G=DGROUP M=16_CA.C ACBP=48 - 04FC:11CE 0040 C=BSS S=_BSS G=DGROUP M=ATEXIT ACBP=48 - 04FC:120E 0001 C=BSS S=_BSS G=DGROUP M=CLOCK ACBP=48 - 04FC:1210 0000 C=BSS S=_BSS G=DGROUP M=DOSFATTR ACBP=48 - 04FC:1210 0000 C=BSS S=_BSS G=DGROUP M=IOERROR ACBP=48 - 04FC:1210 0000 C=BSS S=_BSS G=DGROUP M=ISATTY ACBP=48 - 04FC:1210 0000 C=BSS S=_BSS G=DGROUP M=LONGTOA ACBP=48 - 04FC:1210 0000 C=BSS S=_BSS G=DGROUP M=LSEEK ACBP=48 - 04FC:1210 000D C=BSS S=_BSS G=DGROUP M=MKNAME ACBP=48 - 04FC:121E 0000 C=BSS S=_BSS G=DGROUP M=SETUPIO ACBP=48 - 04FC:121E 0000 C=BSS S=_BSS G=DGROUP M=UNLINK ACBP=48 - 04FC:121E 0000 C=BSS S=_BSS G=DGROUP M=VPRINTER ACBP=48 - 04FC:121E 0000 C=BSS S=_BSS G=DGROUP M=VRAM ACBP=48 - 04FC:121E 0000 C=BSS S=_BSS G=DGROUP M=CORELEFT ACBP=48 - 04FC:121E 0000 C=BSS S=_BSS G=DGROUP M=CRTINIT ACBP=48 - 04FC:121E 0000 C=BSS S=_BSS G=DGROUP M=GETCH ACBP=48 - 04FC:121E 0000 C=BSS S=_BSS G=DGROUP M=IOCTL ACBP=48 - 04FC:121E 0000 C=BSS S=_BSS G=DGROUP M=KBHIT ACBP=48 - 04FC:121E 0000 C=BSS S=_BSS G=DGROUP M=SETBLOCK ACBP=48 - 04FC:121E 0000 C=BSS S=_BSS G=DGROUP M=CHMODA ACBP=48 - 04FC:121E 0000 C=BSS S=_BSS G=DGROUP M=CLOSEA ACBP=48 - 04FC:121E 0000 C=BSS S=_BSS G=DGROUP M=FLENGTH ACBP=48 - 04FC:121E 0000 C=BSS S=_BSS G=DGROUP M=MEMCPY ACBP=48 - 04FC:121E 0000 C=BSS S=_BSS G=DGROUP M=MOVEDATA ACBP=48 - 04FC:121E 0000 C=BSS S=_BSS G=DGROUP M=OPEN ACBP=48 - 04FC:121E 0000 C=BSS S=_BSS G=DGROUP M=OPENA ACBP=48 - 04FC:121E 0001 C=BSS S=_BSS G=DGROUP M=PUTC ACBP=48 - 04FC:1220 0000 C=BSS S=_BSS G=DGROUP M=STRCAT ACBP=48 - 04FC:1220 0000 C=BSS S=_BSS G=DGROUP M=STRCPY ACBP=48 - 04FC:1220 0000 C=BSS S=_BSS G=DGROUP M=STRLEN ACBP=48 - 04FC:1220 0000 C=BSS S=_BSS G=DGROUP M=WRITEA ACBP=48 - 04FC:1220 0000 C=BSSEND S=_BSSEND G=DGROUP M=c0.ASM ACBP=28 - 061E:0000 0080 C=STACK S=_STACK G=(none) M=c0.ASM ACBP=74 + 0000:028F 05F7 C=CODE S=_TEXT G=(none) M=SRC\LIB\NYAN\KITTEN.C ACBP=28 + 0000:0886 0290 C=CODE S=_TEXT G=(none) M=SRC\LIB\16_HC.C ACBP=28 + 0000:0B16 0235 C=CODE S=_TEXT G=(none) M=SRC\EXMMTEST.C ACBP=28 + 0000:0D4B 0232 C=CODE S=_TEXT G=(none) M=SRC\LIB\16_CA.C ACBP=28 + 0000:0F7D 0242 C=CODE S=_TEXT G=(none) M=SRC\LIB\16_HEAD.C ACBP=28 + 0000:11BF 1992 C=CODE S=_TEXT G=(none) M=SRC\LIB\16_MM.C ACBP=28 + 0000:2B51 0024 C=CODE S=_TEXT G=(none) M=ATEXIT ACBP=28 + 0000:2B75 0049 C=CODE S=_TEXT G=(none) M=CLOCK ACBP=28 + 0000:2BBE 0000 C=CODE S=_TEXT G=(none) M=CTYPE ACBP=28 + 0000:2BBE 003D C=CODE S=_TEXT G=(none) M=DOSFATTR ACBP=28 + 0000:2BFB 0089 C=CODE S=_TEXT G=(none) M=EXIT ACBP=28 + 0000:2C84 0000 C=CODE S=_TEXT G=(none) M=FILES ACBP=28 + 0000:2C84 0000 C=CODE S=_TEXT G=(none) M=FILES2 ACBP=28 + 0000:2C84 0000 C=CODE S=_TEXT G=(none) M=FMODE ACBP=28 + 0000:2C84 0021 C=CODE S=_TEXT G=(none) M=H_LLSH ACBP=28 + 0000:2CA5 0021 C=CODE S=_TEXT G=(none) M=H_LURSH ACBP=28 + 0000:2CC6 0060 C=CODE S=_TEXT G=(none) M=H_PADD ACBP=28 + 0000:2D26 0028 C=CODE S=_TEXT G=(none) M=H_PSBP ACBP=28 + 0000:2D4E 004B C=CODE S=_TEXT G=(none) M=IOERROR ACBP=28 + 0000:2D99 0011 C=CODE S=_TEXT G=(none) M=ISATTY ACBP=28 + 0000:2DAA 00A2 C=CODE S=_TEXT G=(none) M=LONGTOA ACBP=28 + 0000:2E4C 0029 C=CODE S=_TEXT G=(none) M=LSEEK ACBP=28 + 0000:2E75 00B0 C=CODE S=_TEXT G=(none) M=MKNAME ACBP=28 + 0000:2F25 0021 C=CODE S=_TEXT G=(none) M=N_PCMP ACBP=28 + 0000:2F46 002F C=CODE S=_TEXT G=(none) M=READA ACBP=28 + 0000:2F75 00B2 C=CODE S=_TEXT G=(none) M=SETUPIO ACBP=28 + 0000:3027 0000 C=CODE S=_TEXT G=(none) M=STKLEN ACBP=28 + 0000:3027 002C C=CODE S=_TEXT G=(none) M=TOLOWER ACBP=28 + 0000:3053 0018 C=CODE S=_TEXT G=(none) M=UNLINK ACBP=28 + 0000:306B 04DB C=CODE S=_TEXT G=(none) M=VPRINTER ACBP=28 + 0000:3546 009F C=CODE S=_TEXT G=(none) M=VRAM ACBP=28 + 0000:35E5 0000 C=CODE S=_TEXT G=(none) M=WSCROLL ACBP=28 + 0000:35E5 0030 C=CODE S=_TEXT G=(none) M=_STPCPY ACBP=28 + 0000:3615 0004 C=CODE S=_TEXT G=(none) M=CORELEFT ACBP=28 + 0000:3619 014E C=CODE S=_TEXT G=(none) M=CPRINTF ACBP=28 + 0000:3767 01A5 C=CODE S=_TEXT G=(none) M=CRTINIT ACBP=28 + 0000:390C 001F C=CODE S=_TEXT G=(none) M=CVTFAK ACBP=28 + 0000:392B 042D C=CODE S=_TEXT G=(none) M=FARHEAP ACBP=28 + 0000:3D58 013E C=CODE S=_TEXT G=(none) M=FBRK ACBP=28 + 0000:3E96 0050 C=CODE S=_TEXT G=(none) M=FCORELFT ACBP=28 + 0000:3EE6 0054 C=CODE S=_TEXT G=(none) M=GETCH ACBP=28 + 0000:3F3A 00AC C=CODE S=_TEXT G=(none) M=GPTEXT ACBP=28 + 0000:3FE6 0029 C=CODE S=_TEXT G=(none) M=IOCTL ACBP=28 + 0000:400F 0012 C=CODE S=_TEXT G=(none) M=KBHIT ACBP=28 + 0000:4021 009D C=CODE S=_TEXT G=(none) M=MOVETEXT ACBP=28 + 0000:40BE 0017 C=CODE S=_TEXT G=(none) M=PUTCH ACBP=28 + 0000:40D5 0004 C=CODE S=_TEXT G=(none) M=REALCVT ACBP=28 + 0000:40D9 01C7 C=CODE S=_TEXT G=(none) M=SCREEN ACBP=28 + 0000:42A0 0184 C=CODE S=_TEXT G=(none) M=SCROLL ACBP=28 + 0000:4424 0129 C=CODE S=_TEXT G=(none) M=SETARGV ACBP=28 + 0000:454D 001C C=CODE S=_TEXT G=(none) M=SETBLOCK ACBP=28 + 0000:4569 0054 C=CODE S=_TEXT G=(none) M=SETENVP ACBP=28 + 0000:45BD 002C C=CODE S=_TEXT G=(none) M=WHEREXY ACBP=28 + 0000:45E9 001D C=CODE S=_TEXT G=(none) M=CHMODA ACBP=28 + 0000:4606 0026 C=CODE S=_TEXT G=(none) M=CLOSE ACBP=28 + 0000:462C 001E C=CODE S=_TEXT G=(none) M=CLOSEA ACBP=28 + 0000:464A 00B0 C=CODE S=_TEXT G=(none) M=FCLOSE ACBP=28 + 0000:46FA 00C6 C=CODE S=_TEXT G=(none) M=FFLUSH ACBP=28 + 0000:47C0 0041 C=CODE S=_TEXT G=(none) M=FLENGTH ACBP=28 + 0000:4801 0040 C=CODE S=_TEXT G=(none) M=FLUSHALL ACBP=28 + 0000:4841 01FE C=CODE S=_TEXT G=(none) M=FOPEN ACBP=28 + 0000:4A3F 001C C=CODE S=_TEXT G=(none) M=FPRINTF ACBP=28 + 0000:4A5B 01D8 C=CODE S=_TEXT G=(none) M=FSEEK ACBP=28 + 0000:4C33 0070 C=CODE S=_TEXT G=(none) M=GETENV ACBP=28 + 0000:4CA3 0070 C=CODE S=_TEXT G=(none) M=LTOA1 ACBP=28 + 0000:4D13 0024 C=CODE S=_TEXT G=(none) M=MEMCPY ACBP=28 + 0000:4D37 0022 C=CODE S=_TEXT G=(none) M=MOVEDATA ACBP=28 + 0000:4D59 018D C=CODE S=_TEXT G=(none) M=OPEN ACBP=28 + 0000:4EE6 004F C=CODE S=_TEXT G=(none) M=OPENA ACBP=28 + 0000:4F35 001B C=CODE S=_TEXT G=(none) M=PRINTF ACBP=28 + 0000:4F50 03A4 C=CODE S=_TEXT G=(none) M=PUTC ACBP=28 + 0000:52F4 00CB C=CODE S=_TEXT G=(none) M=READ ACBP=28 + 0000:53BF 0003 C=CODE S=_TEXT G=(none) M=READU ACBP=28 + 0000:53C2 0111 C=CODE S=_TEXT G=(none) M=SETVBUF ACBP=28 + 0000:54D3 0081 C=CODE S=_TEXT G=(none) M=SPRINTF ACBP=28 + 0000:5554 003F C=CODE S=_TEXT G=(none) M=STRCAT ACBP=28 + 0000:5593 003D C=CODE S=_TEXT G=(none) M=STRCHR ACBP=28 + 0000:55D0 0030 C=CODE S=_TEXT G=(none) M=STRCMP ACBP=28 + 0000:5600 0029 C=CODE S=_TEXT G=(none) M=STRCPY ACBP=28 + 0000:5629 0040 C=CODE S=_TEXT G=(none) M=STRDUP ACBP=28 + 0000:5669 001F C=CODE S=_TEXT G=(none) M=STRLEN ACBP=28 + 0000:5688 0149 C=CODE S=_TEXT G=(none) M=WRITE ACBP=28 + 0000:57D1 003C C=CODE S=_TEXT G=(none) M=WRITEA ACBP=28 + 0000:580D 0003 C=CODE S=_TEXT G=(none) M=WRITEU ACBP=28 + 0000:5810 003B C=CODE S=_TEXT G=(none) M=XFCLOSE ACBP=28 + 0000:584B 0036 C=CODE S=_TEXT G=(none) M=XFFLUSH ACBP=28 + 0589:0000 0000 C=FAR_DATA S=_FARDATA G=(none) M=c0.ASM ACBP=68 + 0589:0000 0000 C=FAR_BSS S=_FARBSS G=(none) M=c0.ASM ACBP=68 + 0589:0000 0000 C=OVRINFO S=_OVERLAY_ G=(none) M=c0.ASM ACBP=68 + 0589:0000 0000 C=STUBSEG S=_1STUB_ G=(none) M=c0.ASM ACBP=68 + 0589:0000 0093 C=DATA S=_DATA G=DGROUP M=c0.ASM ACBP=68 + 0589:0094 0045 C=DATA S=_DATA G=DGROUP M=SRC\LIB\NYAN\KITTEN.C ACBP=48 + 0589:00DA 0014 C=DATA S=_DATA G=DGROUP M=SRC\LIB\16_HC.C ACBP=48 + 0589:00EE 0187 C=DATA S=_DATA G=DGROUP M=SRC\EXMMTEST.C ACBP=48 + 0589:0276 002C C=DATA S=_DATA G=DGROUP M=SRC\LIB\16_CA.C ACBP=48 + 0589:02A2 0010 C=DATA S=_DATA G=DGROUP M=SRC\LIB\16_HEAD.C ACBP=48 + 0589:02B2 09FD C=DATA S=_DATA G=DGROUP M=SRC\LIB\16_MM.C ACBP=48 + 0589:0CB0 0002 C=DATA S=_DATA G=DGROUP M=ATEXIT ACBP=48 + 0589:0CB2 0000 C=DATA S=_DATA G=DGROUP M=CLOCK ACBP=48 + 0589:0CB2 0101 C=DATA S=_DATA G=DGROUP M=CTYPE ACBP=48 + 0589:0DB4 0000 C=DATA S=_DATA G=DGROUP M=DOSFATTR ACBP=48 + 0589:0DB4 0006 C=DATA S=_DATA G=DGROUP M=EXIT ACBP=48 + 0589:0DBA 0190 C=DATA S=_DATA G=DGROUP M=FILES ACBP=48 + 0589:0F4A 002A C=DATA S=_DATA G=DGROUP M=FILES2 ACBP=48 + 0589:0F74 0004 C=DATA S=_DATA G=DGROUP M=FMODE ACBP=48 + 0589:0F78 0000 C=DATA S=_DATA G=DGROUP M=H_LLSH ACBP=48 + 0589:0F78 0000 C=DATA S=_DATA G=DGROUP M=H_LURSH ACBP=48 + 0589:0F78 0000 C=DATA S=_DATA G=DGROUP M=H_PADD ACBP=48 + 0589:0F78 0000 C=DATA S=_DATA G=DGROUP M=H_PSBP ACBP=48 + 0589:0F78 005B C=DATA S=_DATA G=DGROUP M=IOERROR ACBP=48 + 0589:0FD4 0000 C=DATA S=_DATA G=DGROUP M=ISATTY ACBP=48 + 0589:0FD4 0000 C=DATA S=_DATA G=DGROUP M=LONGTOA ACBP=48 + 0589:0FD4 0000 C=DATA S=_DATA G=DGROUP M=LSEEK ACBP=48 + 0589:0FD4 0009 C=DATA S=_DATA G=DGROUP M=MKNAME ACBP=48 + 0589:0FDE 0000 C=DATA S=_DATA G=DGROUP M=N_PCMP ACBP=48 + 0589:0FDE 0000 C=DATA S=_DATA G=DGROUP M=READA ACBP=48 + 0589:0FDE 0000 C=DATA S=_DATA G=DGROUP M=SETUPIO ACBP=48 + 0589:0FDE 0002 C=DATA S=_DATA G=DGROUP M=STKLEN ACBP=48 + 0589:0FE0 0000 C=DATA S=_DATA G=DGROUP M=TOLOWER ACBP=48 + 0589:0FE0 0000 C=DATA S=_DATA G=DGROUP M=UNLINK ACBP=48 + 0589:0FE0 0067 C=DATA S=_DATA G=DGROUP M=VPRINTER ACBP=48 + 0589:1048 0000 C=DATA S=_DATA G=DGROUP M=VRAM ACBP=48 + 0589:1048 0002 C=DATA S=_DATA G=DGROUP M=WSCROLL ACBP=48 + 0589:104A 0000 C=DATA S=_DATA G=DGROUP M=_STPCPY ACBP=48 + 0589:104A 0000 C=DATA S=_DATA G=DGROUP M=CORELEFT ACBP=48 + 0589:104A 0000 C=DATA S=_DATA G=DGROUP M=CPRINTF ACBP=48 + 0589:104A 0018 C=DATA S=_DATA G=DGROUP M=CRTINIT ACBP=48 + 0589:1062 0031 C=DATA S=_DATA G=DGROUP M=CVTFAK ACBP=48 + 0589:1094 0000 C=DATA S=_DATA G=DGROUP M=FARHEAP ACBP=48 + 0589:1094 0002 C=DATA S=_DATA G=DGROUP M=FBRK ACBP=48 + 0589:1096 0000 C=DATA S=_DATA G=DGROUP M=FCORELFT ACBP=48 + 0589:1096 0000 C=DATA S=_DATA G=DGROUP M=GETCH ACBP=48 + 0589:1096 0000 C=DATA S=_DATA G=DGROUP M=GPTEXT ACBP=48 + 0589:1096 0000 C=DATA S=_DATA G=DGROUP M=IOCTL ACBP=48 + 0589:1096 0002 C=DATA S=_DATA G=DGROUP M=KBHIT ACBP=48 + 0589:1098 0000 C=DATA S=_DATA G=DGROUP M=MOVETEXT ACBP=48 + 0589:1098 0000 C=DATA S=_DATA G=DGROUP M=PUTCH ACBP=48 + 0589:1098 0000 C=DATA S=_DATA G=DGROUP M=REALCVT ACBP=48 + 0589:1098 0000 C=DATA S=_DATA G=DGROUP M=SCREEN ACBP=48 + 0589:1098 0000 C=DATA S=_DATA G=DGROUP M=SCROLL ACBP=48 + 0589:1098 0010 C=DATA S=_DATA G=DGROUP M=SETARGV ACBP=48 + 0589:10A8 0000 C=DATA S=_DATA G=DGROUP M=SETBLOCK ACBP=48 + 0589:10A8 0004 C=DATA S=_DATA G=DGROUP M=SETENVP ACBP=48 + 0589:10AC 0000 C=DATA S=_DATA G=DGROUP M=WHEREXY ACBP=48 + 0589:10AC 0000 C=DATA S=_DATA G=DGROUP M=CHMODA ACBP=48 + 0589:10AC 0000 C=DATA S=_DATA G=DGROUP M=CLOSE ACBP=48 + 0589:10AC 0000 C=DATA S=_DATA G=DGROUP M=CLOSEA ACBP=48 + 0589:10AC 0000 C=DATA S=_DATA G=DGROUP M=FCLOSE ACBP=48 + 0589:10AC 0000 C=DATA S=_DATA G=DGROUP M=FFLUSH ACBP=48 + 0589:10AC 0000 C=DATA S=_DATA G=DGROUP M=FLENGTH ACBP=48 + 0589:10AC 0000 C=DATA S=_DATA G=DGROUP M=FLUSHALL ACBP=48 + 0589:10AC 0000 C=DATA S=_DATA G=DGROUP M=FOPEN ACBP=48 + 0589:10AC 0000 C=DATA S=_DATA G=DGROUP M=FPRINTF ACBP=48 + 0589:10AC 0000 C=DATA S=_DATA G=DGROUP M=FSEEK ACBP=48 + 0589:10AC 0000 C=DATA S=_DATA G=DGROUP M=GETENV ACBP=48 + 0589:10AC 0000 C=DATA S=_DATA G=DGROUP M=LTOA1 ACBP=48 + 0589:10AC 0000 C=DATA S=_DATA G=DGROUP M=MEMCPY ACBP=48 + 0589:10AC 0000 C=DATA S=_DATA G=DGROUP M=MOVEDATA ACBP=48 + 0589:10AC 0000 C=DATA S=_DATA G=DGROUP M=OPEN ACBP=48 + 0589:10AC 0000 C=DATA S=_DATA G=DGROUP M=OPENA ACBP=48 + 0589:10AC 0000 C=DATA S=_DATA G=DGROUP M=PRINTF ACBP=48 + 0589:10AC 0001 C=DATA S=_DATA G=DGROUP M=PUTC ACBP=48 + 0589:10AE 0000 C=DATA S=_DATA G=DGROUP M=READ ACBP=48 + 0589:10AE 0000 C=DATA S=_DATA G=DGROUP M=READU ACBP=48 + 0589:10AE 0004 C=DATA S=_DATA G=DGROUP M=SETVBUF ACBP=48 + 0589:10B2 0000 C=DATA S=_DATA G=DGROUP M=SPRINTF ACBP=48 + 0589:10B2 0000 C=DATA S=_DATA G=DGROUP M=STRCAT ACBP=48 + 0589:10B2 0000 C=DATA S=_DATA G=DGROUP M=STRCHR ACBP=48 + 0589:10B2 0000 C=DATA S=_DATA G=DGROUP M=STRCMP ACBP=48 + 0589:10B2 0000 C=DATA S=_DATA G=DGROUP M=STRCPY ACBP=48 + 0589:10B2 0000 C=DATA S=_DATA G=DGROUP M=STRDUP ACBP=48 + 0589:10B2 0000 C=DATA S=_DATA G=DGROUP M=STRLEN ACBP=48 + 0589:10B2 0000 C=DATA S=_DATA G=DGROUP M=WRITE ACBP=48 + 0589:10B2 0000 C=DATA S=_DATA G=DGROUP M=WRITEA ACBP=48 + 0589:10B2 0000 C=DATA S=_DATA G=DGROUP M=WRITEU ACBP=48 + 0589:10B2 0000 C=DATA S=_DATA G=DGROUP M=XFCLOSE ACBP=48 + 0589:10B2 0000 C=DATA S=_DATA G=DGROUP M=XFFLUSH ACBP=48 + 0589:10B2 0000 C=DATA S=_CVTSEG G=DGROUP M=c0.ASM ACBP=48 + 0589:10B2 0002 C=DATA S=_CVTSEG G=DGROUP M=CVTFAK ACBP=48 + 0589:10B4 0000 C=DATA S=_CVTSEG G=DGROUP M=REALCVT ACBP=48 + 0589:10B4 0000 C=DATA S=_SCNSEG G=DGROUP M=c0.ASM ACBP=48 + 0589:10B4 0006 C=DATA S=_SCNSEG G=DGROUP M=CVTFAK ACBP=48 + 0589:10BA 0000 C=CONST S=_CONST G=DGROUP M=c0.ASM ACBP=48 + 0589:10BA 0000 C=INITDATA S=_INIT_ G=DGROUP M=c0.ASM ACBP=48 + 0589:10BA 0006 C=INITDATA S=_INIT_ G=DGROUP M=SETUPIO ACBP=48 + 0589:10C0 0006 C=INITDATA S=_INIT_ G=DGROUP M=CRTINIT ACBP=48 + 0589:10C6 0006 C=INITDATA S=_INIT_ G=DGROUP M=SETARGV ACBP=48 + 0589:10CC 0006 C=INITDATA S=_INIT_ G=DGROUP M=SETENVP ACBP=48 + 0589:10D2 0000 C=INITDATA S=_INITEND_ G=DGROUP M=c0.ASM ACBP=28 + 0589:10D2 0000 C=EXITDATA S=_EXIT_ G=DGROUP M=c0.ASM ACBP=48 + 0589:10D2 0000 C=EXITDATA S=_EXITEND_ G=DGROUP M=c0.ASM ACBP=28 + 0589:10D2 0000 C=BSS S=_BSS G=DGROUP M=c0.ASM ACBP=48 + 0589:10D2 0004 C=BSS S=_BSS G=DGROUP M=SRC\LIB\NYAN\KITTEN.C ACBP=48 + 0589:10D6 0002 C=BSS S=_BSS G=DGROUP M=SRC\LIB\16_HC.C ACBP=48 + 0589:10D8 0000 C=BSS S=_BSS G=DGROUP M=SRC\EXMMTEST.C ACBP=48 + 0589:10D8 000A C=BSS S=_BSS G=DGROUP M=SRC\LIB\16_CA.C ACBP=48 + 0589:10E2 0000 C=BSS S=_BSS G=DGROUP M=SRC\LIB\16_HEAD.C ACBP=48 + 0589:10E2 0006 C=BSS S=_BSS G=DGROUP M=SRC\LIB\16_MM.C ACBP=48 + 0589:10E8 0040 C=BSS S=_BSS G=DGROUP M=ATEXIT ACBP=48 + 0589:1128 0001 C=BSS S=_BSS G=DGROUP M=CLOCK ACBP=48 + 0589:112A 0000 C=BSS S=_BSS G=DGROUP M=DOSFATTR ACBP=48 + 0589:112A 0000 C=BSS S=_BSS G=DGROUP M=IOERROR ACBP=48 + 0589:112A 0000 C=BSS S=_BSS G=DGROUP M=ISATTY ACBP=48 + 0589:112A 0000 C=BSS S=_BSS G=DGROUP M=LONGTOA ACBP=48 + 0589:112A 0000 C=BSS S=_BSS G=DGROUP M=LSEEK ACBP=48 + 0589:112A 000D C=BSS S=_BSS G=DGROUP M=MKNAME ACBP=48 + 0589:1138 0000 C=BSS S=_BSS G=DGROUP M=READA ACBP=48 + 0589:1138 0000 C=BSS S=_BSS G=DGROUP M=SETUPIO ACBP=48 + 0589:1138 0000 C=BSS S=_BSS G=DGROUP M=UNLINK ACBP=48 + 0589:1138 0000 C=BSS S=_BSS G=DGROUP M=VPRINTER ACBP=48 + 0589:1138 0000 C=BSS S=_BSS G=DGROUP M=VRAM ACBP=48 + 0589:1138 0000 C=BSS S=_BSS G=DGROUP M=CORELEFT ACBP=48 + 0589:1138 0000 C=BSS S=_BSS G=DGROUP M=CRTINIT ACBP=48 + 0589:1138 0000 C=BSS S=_BSS G=DGROUP M=GETCH ACBP=48 + 0589:1138 0000 C=BSS S=_BSS G=DGROUP M=IOCTL ACBP=48 + 0589:1138 0000 C=BSS S=_BSS G=DGROUP M=KBHIT ACBP=48 + 0589:1138 0000 C=BSS S=_BSS G=DGROUP M=SETBLOCK ACBP=48 + 0589:1138 0000 C=BSS S=_BSS G=DGROUP M=CHMODA ACBP=48 + 0589:1138 0000 C=BSS S=_BSS G=DGROUP M=CLOSEA ACBP=48 + 0589:1138 0000 C=BSS S=_BSS G=DGROUP M=FLENGTH ACBP=48 + 0589:1138 0000 C=BSS S=_BSS G=DGROUP M=GETENV ACBP=48 + 0589:1138 0000 C=BSS S=_BSS G=DGROUP M=MEMCPY ACBP=48 + 0589:1138 0000 C=BSS S=_BSS G=DGROUP M=MOVEDATA ACBP=48 + 0589:1138 0000 C=BSS S=_BSS G=DGROUP M=OPEN ACBP=48 + 0589:1138 0000 C=BSS S=_BSS G=DGROUP M=OPENA ACBP=48 + 0589:1138 0001 C=BSS S=_BSS G=DGROUP M=PUTC ACBP=48 + 0589:113A 0000 C=BSS S=_BSS G=DGROUP M=READ ACBP=48 + 0589:113A 0000 C=BSS S=_BSS G=DGROUP M=STRCAT ACBP=48 + 0589:113A 0000 C=BSS S=_BSS G=DGROUP M=STRCHR ACBP=48 + 0589:113A 0000 C=BSS S=_BSS G=DGROUP M=STRCMP ACBP=48 + 0589:113A 0000 C=BSS S=_BSS G=DGROUP M=STRCPY ACBP=48 + 0589:113A 0000 C=BSS S=_BSS G=DGROUP M=STRLEN ACBP=48 + 0589:113A 0000 C=BSS S=_BSS G=DGROUP M=WRITEA ACBP=48 + 0589:113A 0000 C=BSSEND S=_BSSEND G=DGROUP M=c0.ASM ACBP=28 + 069D:0000 0080 C=STACK S=_STACK G=(none) M=c0.ASM ACBP=74 Address Publics by Name - 04FC:0000 idle DATASEG@ + 0589:0000 idle DATASEG@ 0000:028B idle DGROUP@ - 0000:2603 idle F_LDIV@ - 0000:2612 idle F_LMOD@ - 0000:260A idle F_LUDIV@ - 0000:261A idle F_LUMOD@ - 0000:26B1 idle F_LXLSH@ - 0000:26D2 idle F_LXURSH@ - 0000:26F3 idle F_PADD@ - 0000:2753 idle F_PSBP@ - 0000:2722 idle F_PSUB@ - 0000:2603 idle LDIV@ - 0000:2612 idle LMOD@ - 0000:260A idle LUDIV@ - 0000:261A idle LUMOD@ - 0000:26B1 idle LXLSH@ - 0000:26D2 idle LXURSH@ - 0000:2600 idle N_LDIV@ - 0000:260F idle N_LMOD@ - 0000:2607 N_LUDIV@ - 0000:2617 idle N_LUMOD@ - 0000:26AE N_LXLSH@ - 0000:26CF N_LXURSH@ - 0000:26F0 N_PADD@ - 0000:294F N_PCMP@ - 0000:2750 N_PSBP@ - 0000:271F idle N_PSUB@ - 0000:26F3 idle PADD@ - 0000:2753 idle PSBP@ - 0000:2722 idle PSUB@ + 0000:2C87 idle F_LXLSH@ + 0000:2CA8 idle F_LXURSH@ + 0000:2CC9 idle F_PADD@ + 0000:2D29 idle F_PSBP@ + 0000:2CF8 idle F_PSUB@ + 0000:028F idle KITTENGETS + 0000:2C87 idle LXLSH@ + 0000:2CA8 idle LXURSH@ + 0000:2C84 N_LXLSH@ + 0000:2CA5 N_LXURSH@ + 0000:2CC6 N_PADD@ + 0000:2F25 N_PCMP@ + 0000:2D26 N_PSBP@ + 0000:2CF5 idle N_PSUB@ + 0000:2CC9 idle PADD@ + 0000:2D29 idle PSBP@ + 0000:2CF8 idle PSUB@ 0000:0276 _abort - 04FC:11C0 idle _aftersort - 0000:1FFB idle _AllocateLargestFarFreeBlock - 0000:1E98 idle _AllocateLargestFreeBlock - 0000:24CD idle _atexit - 04FC:11C2 idle _beforesort - 0000:2431 idle _CAL_OptimizeNodes - 0000:22BC _CA_CloseDebug - 0000:22C9 idle _CA_FarRead - 0000:2307 idle _CA_FarWrite - 0000:23AC _CA_LoadFile - 0000:229B _CA_OpenDebug - 0000:2345 idle _CA_ReadFile - 0000:24C0 _CA_Shutdown - 0000:249F _CA_Startup - 0000:24F1 _clock - 0000:3FAD _close - 0000:3010 _coreleft - 0000:3146 idle _cprintf - 04FC:11CA _debughandle - 04FC:114F _directvideo - 04FC:11C8 idle _drawcachebox - 04FC:007F _errno - 0000:25C5 _exit - 0000:3891 _farcoreleft - 0000:3466 _farfree - 0000:357A _farmalloc - 0000:36DB idle _farrealloc - 0000:3FF1 _fclose - 0000:40A1 _fflush - 0000:4167 _filelength - 0000:216A idle _filesize - 04FC:11C4 idle _finishcachebox - 0000:41A8 _flushall - 0000:43B1 _fopen - 0000:43E6 _fprintf - 0000:48A1 idle _fputc - 0000:4A2A idle _fputchar - 0000:3466 _free - 0000:4484 _fseek - 0000:4500 _ftell - 0000:38E1 _getch - 0000:38FA idle _getche - 0000:209D _GetFarFreeSize - 0000:1F2E _GetFreeSize - 0000:3935 _gettext - 0000:39E1 _ioctl - 0000:27C3 _isatty - 0000:45DA idle _itoa - 0000:3A0A _kbhit - 0000:2876 _lseek - 0000:4622 idle _ltoa - 0000:028F _main - 0000:3570 _malloc - 0000:464A _memcpy - 0000:0512 idle _MML_CheckForEMS - 0000:07E0 idle _MML_CheckForXMS - 0000:0AA0 idle _MML_ClearBlock - 0000:0557 idle _MML_SetupEMS - 0000:0817 idle _MML_SetupXMS - 0000:065D idle _MML_ShutdownEMS - 0000:08BD idle _MML_ShutdownXMS - 0000:08F0 idle _MML_UseSpace - 0000:1DB5 idle _MM_BombOnError - 0000:1862 _MM_DumpData - 0000:1E1A idle _MM_FreeBlock - 0000:1281 _MM_FreePtr - 0000:1DC4 idle _MM_GetNewBlock - 0000:0FCD _MM_GetPtr - 0000:069E idle _MM_MapEMS - 0000:0737 idle _MM_MapXEMS - 0000:1AA9 _MM_Report - 0000:141F idle _MM_SetLock - 0000:135B idle _MM_SetPurge - 0000:165F _MM_ShowMemory - 0000:0F48 _MM_Shutdown - 0000:14E8 idle _MM_SortMem - 0000:0B06 _MM_Startup - 0000:1A10 idle _MM_TotalFree - 0000:199E idle _MM_UnusedMemory - 0000:466E _movedata - 0000:3A1C _movetext - 0000:46BD _open - 0000:486C _printf - 04FC:11CC idle _profilehandle - 0000:3AB9 _putch - 0000:398B _puttext - 0000:36D4 idle _realloc - 0000:3F48 _setblock - 0000:4C2B _setvbuf - 0000:4D3C _strcat - 0000:4D7B _strcpy - 0000:4DA4 _strlen - 0000:2A22 _tolower - 0000:4605 _ultoa - 0000:3917 idle _ungetch - 0000:2A4E _unlink - 04FC:11C6 idle _updatecachebox - 0000:21C9 _US_CheckParm - 0000:1E59 idle _wait - 0000:3F6E idle _wherex - 0000:3F7D idle _wherey - 0000:4F48 _write - 04FC:11BE idle _XMSaddr + 0589:10E4 idle _aftersort + 0000:2B51 idle _atexit + 0589:10E6 idle _beforesort + 0000:0EE1 idle _CAL_OptimizeNodes + 0000:04AF idle _catread + 0000:0D6C _CA_CloseDebug + 0000:0D79 idle _CA_FarRead + 0000:0DB7 idle _CA_FarWrite + 0000:0E5C _CA_LoadFile + 0000:0D4B _CA_OpenDebug + 0000:0DF5 idle _CA_ReadFile + 0000:0F70 _CA_Shutdown + 0000:0F4F _CA_Startup + 0000:2B75 _clock + 0000:4606 _close + 0000:3615 _coreleft + 0000:374B idle _cprintf + 0000:078D idle _db_fetch + 0000:07DD idle _db_insert + 0589:10DE _debughandle + 0589:1059 _directvideo + 0589:10DC idle _drawcachebox + 0589:10A8 _environ + 0589:007F _errno + 0000:2C49 _exit + 0000:3E96 _farcoreleft + 0000:3A6B _farfree + 0000:3B7F _farmalloc + 0000:3CE0 idle _farrealloc + 0000:464A _fclose + 0000:46FA _fflush + 0000:47C0 _filelength + 0000:0FBC idle _filesize + 0589:10D8 idle _finishcachebox + 0000:4801 _flushall + 0000:4A0A _fopen + 0000:4A3F _fprintf + 0000:4F6A idle _fputc + 0000:50F3 idle _fputchar + 0000:3A6B _free + 0000:4ADD _fseek + 0000:4B59 _ftell + 0000:3EE6 _getch + 0000:3EFF idle _getche + 0000:4C33 _getenv + 0000:3F3A _gettext + 0000:0738 idle _get_line + 0000:0B09 idle _HC_CloseDebug + 0000:0AE8 idle _HC_OpenDebug + 0589:10D6 idle _heaphandle + 0000:3FE6 _ioctl + 0000:2D99 _isatty + 0000:4CA3 idle _itoa + 0000:400F _kbhit + 0000:0546 idle _kittenclose + 0000:02DE idle _kittenopen + 0000:0979 idle _LargestFarFreeBlock + 0000:0886 idle _LargestFreeBlock + 0000:2E4C _lseek + 0000:4CEB idle _ltoa + 0000:0B16 _main + 0000:3B75 _malloc + 0000:4D13 _memcpy + 0000:11BF idle _MML_CheckForEMS + 0000:148D idle _MML_CheckForXMS + 0000:1747 idle _MML_ClearBlock + 0000:1204 idle _MML_SetupEMS + 0000:14C4 idle _MML_SetupXMS + 0000:130A idle _MML_ShutdownEMS + 0000:156A idle _MML_ShutdownXMS + 0000:159D idle _MML_UseSpace + 0000:2A47 idle _MM_BombOnError + 0000:24F4 _MM_DumpData + 0000:2AFA idle _MM_FreeBlock + 0000:1F64 _MM_FreePtr + 0000:2A56 idle _MM_GetNewBlock + 0000:1BEB _MM_GetPtr + 0000:134B idle _MM_MapEMS + 0000:13E4 idle _MM_MapXEMS + 0000:273B _MM_Report + 0000:2B4B idle _MM_segude + 0000:2B40 idle _MM_seguin + 0000:2105 idle _MM_SetLock + 0000:203E idle _MM_SetPurge + 0000:2348 _MM_ShowMemory + 0000:1B69 _MM_Shutdown + 0000:21D1 idle _MM_SortMem + 0000:17AD _MM_Startup + 0000:26A2 idle _MM_TotalFree + 0000:2630 idle _MM_UnusedMemory + 0000:4D37 _movedata + 0000:4021 _movetext + 0000:0551 idle _mystrtoul + 0000:4D86 _open + 0000:4F35 _printf + 0000:101B idle _printmeminfoline + 0000:05DE idle _processEscChars + 0589:10E0 idle _profilehandle + 0000:40BE _putch + 0000:3F90 _puttext + 0000:53BF _read + 0000:3CD9 idle _realloc + 0000:454D _setblock + 0000:53C2 _setvbuf + 0000:5511 _sprintf + 0000:5554 _strcat + 0000:5593 _strchr + 0000:55D0 _strcmp + 0000:5600 _strcpy + 0000:5629 _strdup + 0000:5669 _strlen + 0000:3027 _tolower + 0000:4CCE _ultoa + 0000:3F1C idle _ungetch + 0000:3053 _unlink + 0589:10DA idle _updatecachebox + 0000:10ED _US_CheckParm + 0000:5533 idle _vsprintf + 0000:0F7D idle _wait + 0000:45C7 idle _wherex + 0000:45D6 idle _wherey + 0000:580D _write + 0589:10E2 idle _XMSaddr 0000:1000 idle __AHINCR 0000:000C idle __AHSHIFT - 04FC:118E __argc - 04FC:1190 __argv - 04FC:0DA6 __atexitcnt - 04FC:11CE __atexittbl - 0000:37C7 __brk - 04FC:008B __brklvl - 04FC:006B __C0argc - 04FC:006D __C0argv - 0000:3228 idle __c0crtinit - 04FC:0071 idle __C0environ - 04FC:118D __cChar - 0000:25E6 idle __cexit - 04FC:118C __cFlag + 0589:1098 __argc + 0589:109A __argv + 0589:0CB0 __atexitcnt + 0589:10E8 __atexittbl + 0000:3DCC __brk + 0589:008B __brklvl + 0589:006B __C0argc + 0589:006D __C0argv + 0000:382D idle __c0crtinit + 0589:0071 __C0environ + 0589:1097 __cChar + 0000:2C6A idle __cexit + 0589:1096 __cFlag 0000:0166 __checknull - 0000:3F90 __chmod + 0000:45E9 __chmod 0000:0153 __cleanup - 0000:3FD3 __close - 0000:3014 __CPUTN - 0000:3245 idle __crtinit - 04FC:0DA8 __ctype + 0000:462C __close + 0000:0906 idle __coreleft + 0000:3619 __CPUTN + 0000:384A idle __crtinit + 0589:0CB2 __ctype 0000:0000 Abs __cvtfak - 0000:25F4 idle __c_exit - 04FC:106E __doserrno - 0000:27B1 __DOSERROR - 04FC:1070 idle __dosErrorToSV - 0000:253A __dos_getfileattr - 0000:255A idle __dos_setfileattr - 04FC:0075 __envLng - 04FC:0077 __envseg - 04FC:0079 idle __envSize - 0000:25D4 __exit - 04FC:0EAA __exitbuf - 04FC:0EAC __exitfopen - 04FC:0EAE idle __exitopen - 04FC:106A __fmode - 0000:4887 idle __fputc - 0000:4A3D __FPUTN - 0000:4367 idle __GETFP - 04FC:0087 __heapbase - 04FC:008F __heaptop - 04FC:005B idle __Int0Vector - 04FC:005F idle __Int4Vector - 04FC:0063 idle __Int5Vector - 04FC:0067 idle __Int6Vector - 0000:2778 __IOERROR - 0000:27D4 __LONGTOA - 0000:289F __MKNAME + 0000:2C78 idle __c_exit + 0589:0F78 __doserrno + 0000:2D87 __DOSERROR + 0589:0F7A idle __dosErrorToSV + 0000:2BBE __dos_getfileattr + 0000:2BDE idle __dos_setfileattr + 0589:0075 __envLng + 0589:0077 __envseg + 0589:0079 __envSize + 0000:2C58 __exit + 0589:0DB4 __exitbuf + 0589:0DB6 __exitfopen + 0589:0DB8 idle __exitopen + 0000:0A1B idle __farcoreleft + 0589:0F74 __fmode + 0000:4F50 idle __fputc + 0000:5106 __FPUTN + 0000:49C0 idle __GETFP + 0589:0087 __heapbase + 0589:008F __heaptop + 0589:005B idle __Int0Vector + 0589:005F idle __Int4Vector + 0589:0063 idle __Int5Vector + 0589:0067 idle __Int6Vector + 0000:2D4E __IOERROR + 0589:0094 idle __kitten_catalog + 0000:2DAA __LONGTOA + 0000:2E75 __MKNAME 0000:028D idle __MMODEL - 04FC:1040 __nfile - 0000:38FA idle __Ngetche - 04FC:106C __notUmask - 0000:3917 idle __Nungetch - 0000:481D __open - 04FC:1042 __openfd - 0000:429E idle __OPENFP - 04FC:007D __osmajor - 04FC:007E idle __osminor - 04FC:007D idle __osversion - 04FC:007B __psp - 0000:3AD0 __REALCVT - 04FC:11A4 __RealCvtVector + 0589:0F4A __nfile + 0000:3EFF idle __Ngetche + 0589:0F76 __notUmask + 0000:3F1C idle __Nungetch + 0000:4EE6 __open + 0589:0F4C __openfd + 0000:48F7 idle __OPENFP + 0589:007D __osmajor + 0589:007E idle __osminor + 0589:007D idle __osversion + 0589:007B __psp + 0000:2F46 __read + 0000:40D5 __REALCVT + 0589:10B2 __RealCvtVector 0000:01BC __restorezero - 0000:3806 __sbrk - 04FC:11A6 idle __ScanTodVector - 0000:3C0A __SCREENIO - 0000:3CBD __SCROLL + 0000:3E0B __sbrk + 0589:10B4 idle __ScanTodVector + 0000:420F __SCREENIO + 0000:42C2 __SCROLL 0000:0000 Abs __setargv__ - 0000:2970 __setupio - 04FC:0081 __StartTime - 04FC:10D4 __stklen - 0000:2FE0 __stpcpy - 04FC:0EB0 __streams + 0000:0000 idle __setenvp__ + 0000:2F75 __setupio + 0589:0081 __StartTime + 0589:0FDE __stklen + 0000:35E5 __stpcpy + 0589:0DBA __streams 0000:0167 __terminate - 0000:28F8 idle __TMPNAM + 0000:2ECE idle __TMPNAM 0000:0000 idle __turboCrt - 0000:2856 __UTOA - 0000:3C46 __VALIDATEXY - 04FC:007D idle __version - 04FC:1140 __video - 0000:319D __VideoInt - 0000:2A7E __VPRINTER - 0000:2F41 __VPTR - 0000:2F66 __VRAM - 0000:3F64 __wherexy - 0000:4F0C __write - 04FC:113E __wscroll - 0000:4F4B __xfclose - 0000:4F86 __xfflush - 04FC:0085 idle ___brklvl - 0000:3326 idle ___first - 0000:3328 idle ___last - 0000:332A idle ___rover - 0000:4DC3 ___write + 0000:2E2C __UTOA + 0000:424B __VALIDATEXY + 0589:007D idle __version + 0589:104A __video + 0000:37A2 __VideoInt + 0000:3083 __VPRINTER + 0000:3546 __VPTR + 0000:356B __VRAM + 0000:45BD __wherexy + 0000:57D1 __write + 0589:1048 __wscroll + 0000:5810 __xfclose + 0000:584B __xfflush + 0589:0085 idle ___brklvl + 0000:392B idle ___first + 0000:392D idle ___last + 0000:52F4 ___read + 0000:392F idle ___rover + 0000:5688 ___write Address Publics by Value 0000:0000 Abs __setargv__ 0000:0000 idle __turboCrt 0000:0000 Abs __cvtfak + 0000:0000 idle __setenvp__ 0000:000C idle __AHSHIFT 0000:0153 __cleanup 0000:0166 __checknull @@ -475,224 +519,238 @@ Detailed map of segments 0000:0276 _abort 0000:028B idle DGROUP@ 0000:028D idle __MMODEL - 0000:028F _main - 0000:0512 idle _MML_CheckForEMS - 0000:0557 idle _MML_SetupEMS - 0000:065D idle _MML_ShutdownEMS - 0000:069E idle _MM_MapEMS - 0000:0737 idle _MM_MapXEMS - 0000:07E0 idle _MML_CheckForXMS - 0000:0817 idle _MML_SetupXMS - 0000:08BD idle _MML_ShutdownXMS - 0000:08F0 idle _MML_UseSpace - 0000:0AA0 idle _MML_ClearBlock - 0000:0B06 _MM_Startup - 0000:0F48 _MM_Shutdown - 0000:0FCD _MM_GetPtr + 0000:028F idle KITTENGETS + 0000:02DE idle _kittenopen + 0000:04AF idle _catread + 0000:0546 idle _kittenclose + 0000:0551 idle _mystrtoul + 0000:05DE idle _processEscChars + 0000:0738 idle _get_line + 0000:078D idle _db_fetch + 0000:07DD idle _db_insert + 0000:0886 idle _LargestFreeBlock + 0000:0906 idle __coreleft + 0000:0979 idle _LargestFarFreeBlock + 0000:0A1B idle __farcoreleft + 0000:0AE8 idle _HC_OpenDebug + 0000:0B09 idle _HC_CloseDebug + 0000:0B16 _main + 0000:0D4B _CA_OpenDebug + 0000:0D6C _CA_CloseDebug + 0000:0D79 idle _CA_FarRead + 0000:0DB7 idle _CA_FarWrite + 0000:0DF5 idle _CA_ReadFile + 0000:0E5C _CA_LoadFile + 0000:0EE1 idle _CAL_OptimizeNodes + 0000:0F4F _CA_Startup + 0000:0F70 _CA_Shutdown + 0000:0F7D idle _wait + 0000:0FBC idle _filesize 0000:1000 idle __AHINCR - 0000:1281 _MM_FreePtr - 0000:135B idle _MM_SetPurge - 0000:141F idle _MM_SetLock - 0000:14E8 idle _MM_SortMem - 0000:165F _MM_ShowMemory - 0000:1862 _MM_DumpData - 0000:199E idle _MM_UnusedMemory - 0000:1A10 idle _MM_TotalFree - 0000:1AA9 _MM_Report - 0000:1DB5 idle _MM_BombOnError - 0000:1DC4 idle _MM_GetNewBlock - 0000:1E1A idle _MM_FreeBlock - 0000:1E59 idle _wait - 0000:1E98 idle _AllocateLargestFreeBlock - 0000:1F2E _GetFreeSize - 0000:1FFB idle _AllocateLargestFarFreeBlock - 0000:209D _GetFarFreeSize - 0000:216A idle _filesize - 0000:21C9 _US_CheckParm - 0000:229B _CA_OpenDebug - 0000:22BC _CA_CloseDebug - 0000:22C9 idle _CA_FarRead - 0000:2307 idle _CA_FarWrite - 0000:2345 idle _CA_ReadFile - 0000:23AC _CA_LoadFile - 0000:2431 idle _CAL_OptimizeNodes - 0000:249F _CA_Startup - 0000:24C0 _CA_Shutdown - 0000:24CD idle _atexit - 0000:24F1 _clock - 0000:253A __dos_getfileattr - 0000:255A idle __dos_setfileattr - 0000:25C5 _exit - 0000:25D4 __exit - 0000:25E6 idle __cexit - 0000:25F4 idle __c_exit - 0000:2600 idle N_LDIV@ - 0000:2603 idle LDIV@ - 0000:2603 idle F_LDIV@ - 0000:2607 N_LUDIV@ - 0000:260A idle F_LUDIV@ - 0000:260A idle LUDIV@ - 0000:260F idle N_LMOD@ - 0000:2612 idle F_LMOD@ - 0000:2612 idle LMOD@ - 0000:2617 idle N_LUMOD@ - 0000:261A idle LUMOD@ - 0000:261A idle F_LUMOD@ - 0000:26AE N_LXLSH@ - 0000:26B1 idle LXLSH@ - 0000:26B1 idle F_LXLSH@ - 0000:26CF N_LXURSH@ - 0000:26D2 idle LXURSH@ - 0000:26D2 idle F_LXURSH@ - 0000:26F0 N_PADD@ - 0000:26F3 idle F_PADD@ - 0000:26F3 idle PADD@ - 0000:271F idle N_PSUB@ - 0000:2722 idle F_PSUB@ - 0000:2722 idle PSUB@ - 0000:2750 N_PSBP@ - 0000:2753 idle PSBP@ - 0000:2753 idle F_PSBP@ - 0000:2778 __IOERROR - 0000:27B1 __DOSERROR - 0000:27C3 _isatty - 0000:27D4 __LONGTOA - 0000:2856 __UTOA - 0000:2876 _lseek - 0000:289F __MKNAME - 0000:28F8 idle __TMPNAM - 0000:294F N_PCMP@ - 0000:2970 __setupio - 0000:2A22 _tolower - 0000:2A4E _unlink - 0000:2A7E __VPRINTER - 0000:2F41 __VPTR - 0000:2F66 __VRAM - 0000:2FE0 __stpcpy - 0000:3010 _coreleft - 0000:3014 __CPUTN - 0000:3146 idle _cprintf - 0000:319D __VideoInt - 0000:3228 idle __c0crtinit - 0000:3245 idle __crtinit - 0000:3326 idle ___first - 0000:3328 idle ___last - 0000:332A idle ___rover - 0000:3466 _free - 0000:3466 _farfree - 0000:3570 _malloc - 0000:357A _farmalloc - 0000:36D4 idle _realloc - 0000:36DB idle _farrealloc - 0000:37C7 __brk - 0000:3806 __sbrk - 0000:3891 _farcoreleft - 0000:38E1 _getch - 0000:38FA idle __Ngetche - 0000:38FA idle _getche - 0000:3917 idle __Nungetch - 0000:3917 idle _ungetch - 0000:3935 _gettext - 0000:398B _puttext - 0000:39E1 _ioctl - 0000:3A0A _kbhit - 0000:3A1C _movetext - 0000:3AB9 _putch - 0000:3AD0 __REALCVT - 0000:3C0A __SCREENIO - 0000:3C46 __VALIDATEXY - 0000:3CBD __SCROLL - 0000:3F48 _setblock - 0000:3F64 __wherexy - 0000:3F6E idle _wherex - 0000:3F7D idle _wherey - 0000:3F90 __chmod - 0000:3FAD _close - 0000:3FD3 __close - 0000:3FF1 _fclose - 0000:40A1 _fflush - 0000:4167 _filelength - 0000:41A8 _flushall - 0000:429E idle __OPENFP - 0000:4367 idle __GETFP - 0000:43B1 _fopen - 0000:43E6 _fprintf - 0000:4484 _fseek - 0000:4500 _ftell - 0000:45DA idle _itoa - 0000:4605 _ultoa - 0000:4622 idle _ltoa - 0000:464A _memcpy - 0000:466E _movedata - 0000:46BD _open - 0000:481D __open - 0000:486C _printf - 0000:4887 idle __fputc - 0000:48A1 idle _fputc - 0000:4A2A idle _fputchar - 0000:4A3D __FPUTN - 0000:4C2B _setvbuf - 0000:4D3C _strcat - 0000:4D7B _strcpy - 0000:4DA4 _strlen - 0000:4DC3 ___write - 0000:4F0C __write - 0000:4F48 _write - 0000:4F4B __xfclose - 0000:4F86 __xfflush - 04FC:0000 idle DATASEG@ - 04FC:005B idle __Int0Vector - 04FC:005F idle __Int4Vector - 04FC:0063 idle __Int5Vector - 04FC:0067 idle __Int6Vector - 04FC:006B __C0argc - 04FC:006D __C0argv - 04FC:0071 idle __C0environ - 04FC:0075 __envLng - 04FC:0077 __envseg - 04FC:0079 idle __envSize - 04FC:007B __psp - 04FC:007D idle __osversion - 04FC:007D __osmajor - 04FC:007D idle __version - 04FC:007E idle __osminor - 04FC:007F _errno - 04FC:0081 __StartTime - 04FC:0085 idle ___brklvl - 04FC:0087 __heapbase - 04FC:008B __brklvl - 04FC:008F __heaptop - 04FC:0DA6 __atexitcnt - 04FC:0DA8 __ctype - 04FC:0EAA __exitbuf - 04FC:0EAC __exitfopen - 04FC:0EAE idle __exitopen - 04FC:0EB0 __streams - 04FC:1040 __nfile - 04FC:1042 __openfd - 04FC:106A __fmode - 04FC:106C __notUmask - 04FC:106E __doserrno - 04FC:1070 idle __dosErrorToSV - 04FC:10D4 __stklen - 04FC:113E __wscroll - 04FC:1140 __video - 04FC:114F _directvideo - 04FC:118C __cFlag - 04FC:118D __cChar - 04FC:118E __argc - 04FC:1190 __argv - 04FC:11A4 __RealCvtVector - 04FC:11A6 idle __ScanTodVector - 04FC:11BE idle _XMSaddr - 04FC:11C0 idle _aftersort - 04FC:11C2 idle _beforesort - 04FC:11C4 idle _finishcachebox - 04FC:11C6 idle _updatecachebox - 04FC:11C8 idle _drawcachebox - 04FC:11CA _debughandle - 04FC:11CC idle _profilehandle - 04FC:11CE __atexittbl + 0000:101B idle _printmeminfoline + 0000:10ED _US_CheckParm + 0000:11BF idle _MML_CheckForEMS + 0000:1204 idle _MML_SetupEMS + 0000:130A idle _MML_ShutdownEMS + 0000:134B idle _MM_MapEMS + 0000:13E4 idle _MM_MapXEMS + 0000:148D idle _MML_CheckForXMS + 0000:14C4 idle _MML_SetupXMS + 0000:156A idle _MML_ShutdownXMS + 0000:159D idle _MML_UseSpace + 0000:1747 idle _MML_ClearBlock + 0000:17AD _MM_Startup + 0000:1B69 _MM_Shutdown + 0000:1BEB _MM_GetPtr + 0000:1F64 _MM_FreePtr + 0000:203E idle _MM_SetPurge + 0000:2105 idle _MM_SetLock + 0000:21D1 idle _MM_SortMem + 0000:2348 _MM_ShowMemory + 0000:24F4 _MM_DumpData + 0000:2630 idle _MM_UnusedMemory + 0000:26A2 idle _MM_TotalFree + 0000:273B _MM_Report + 0000:2A47 idle _MM_BombOnError + 0000:2A56 idle _MM_GetNewBlock + 0000:2AFA idle _MM_FreeBlock + 0000:2B40 idle _MM_seguin + 0000:2B4B idle _MM_segude + 0000:2B51 idle _atexit + 0000:2B75 _clock + 0000:2BBE __dos_getfileattr + 0000:2BDE idle __dos_setfileattr + 0000:2C49 _exit + 0000:2C58 __exit + 0000:2C6A idle __cexit + 0000:2C78 idle __c_exit + 0000:2C84 N_LXLSH@ + 0000:2C87 idle LXLSH@ + 0000:2C87 idle F_LXLSH@ + 0000:2CA5 N_LXURSH@ + 0000:2CA8 idle LXURSH@ + 0000:2CA8 idle F_LXURSH@ + 0000:2CC6 N_PADD@ + 0000:2CC9 idle F_PADD@ + 0000:2CC9 idle PADD@ + 0000:2CF5 idle N_PSUB@ + 0000:2CF8 idle F_PSUB@ + 0000:2CF8 idle PSUB@ + 0000:2D26 N_PSBP@ + 0000:2D29 idle PSBP@ + 0000:2D29 idle F_PSBP@ + 0000:2D4E __IOERROR + 0000:2D87 __DOSERROR + 0000:2D99 _isatty + 0000:2DAA __LONGTOA + 0000:2E2C __UTOA + 0000:2E4C _lseek + 0000:2E75 __MKNAME + 0000:2ECE idle __TMPNAM + 0000:2F25 N_PCMP@ + 0000:2F46 __read + 0000:2F75 __setupio + 0000:3027 _tolower + 0000:3053 _unlink + 0000:3083 __VPRINTER + 0000:3546 __VPTR + 0000:356B __VRAM + 0000:35E5 __stpcpy + 0000:3615 _coreleft + 0000:3619 __CPUTN + 0000:374B idle _cprintf + 0000:37A2 __VideoInt + 0000:382D idle __c0crtinit + 0000:384A idle __crtinit + 0000:392B idle ___first + 0000:392D idle ___last + 0000:392F idle ___rover + 0000:3A6B _free + 0000:3A6B _farfree + 0000:3B75 _malloc + 0000:3B7F _farmalloc + 0000:3CD9 idle _realloc + 0000:3CE0 idle _farrealloc + 0000:3DCC __brk + 0000:3E0B __sbrk + 0000:3E96 _farcoreleft + 0000:3EE6 _getch + 0000:3EFF idle __Ngetche + 0000:3EFF idle _getche + 0000:3F1C idle __Nungetch + 0000:3F1C idle _ungetch + 0000:3F3A _gettext + 0000:3F90 _puttext + 0000:3FE6 _ioctl + 0000:400F _kbhit + 0000:4021 _movetext + 0000:40BE _putch + 0000:40D5 __REALCVT + 0000:420F __SCREENIO + 0000:424B __VALIDATEXY + 0000:42C2 __SCROLL + 0000:454D _setblock + 0000:45BD __wherexy + 0000:45C7 idle _wherex + 0000:45D6 idle _wherey + 0000:45E9 __chmod + 0000:4606 _close + 0000:462C __close + 0000:464A _fclose + 0000:46FA _fflush + 0000:47C0 _filelength + 0000:4801 _flushall + 0000:48F7 idle __OPENFP + 0000:49C0 idle __GETFP + 0000:4A0A _fopen + 0000:4A3F _fprintf + 0000:4ADD _fseek + 0000:4B59 _ftell + 0000:4C33 _getenv + 0000:4CA3 idle _itoa + 0000:4CCE _ultoa + 0000:4CEB idle _ltoa + 0000:4D13 _memcpy + 0000:4D37 _movedata + 0000:4D86 _open + 0000:4EE6 __open + 0000:4F35 _printf + 0000:4F50 idle __fputc + 0000:4F6A idle _fputc + 0000:50F3 idle _fputchar + 0000:5106 __FPUTN + 0000:52F4 ___read + 0000:53BF _read + 0000:53C2 _setvbuf + 0000:5511 _sprintf + 0000:5533 idle _vsprintf + 0000:5554 _strcat + 0000:5593 _strchr + 0000:55D0 _strcmp + 0000:5600 _strcpy + 0000:5629 _strdup + 0000:5669 _strlen + 0000:5688 ___write + 0000:57D1 __write + 0000:580D _write + 0000:5810 __xfclose + 0000:584B __xfflush + 0589:0000 idle DATASEG@ + 0589:005B idle __Int0Vector + 0589:005F idle __Int4Vector + 0589:0063 idle __Int5Vector + 0589:0067 idle __Int6Vector + 0589:006B __C0argc + 0589:006D __C0argv + 0589:0071 __C0environ + 0589:0075 __envLng + 0589:0077 __envseg + 0589:0079 __envSize + 0589:007B __psp + 0589:007D idle __osversion + 0589:007D __osmajor + 0589:007D idle __version + 0589:007E idle __osminor + 0589:007F _errno + 0589:0081 __StartTime + 0589:0085 idle ___brklvl + 0589:0087 __heapbase + 0589:008B __brklvl + 0589:008F __heaptop + 0589:0094 idle __kitten_catalog + 0589:0CB0 __atexitcnt + 0589:0CB2 __ctype + 0589:0DB4 __exitbuf + 0589:0DB6 __exitfopen + 0589:0DB8 idle __exitopen + 0589:0DBA __streams + 0589:0F4A __nfile + 0589:0F4C __openfd + 0589:0F74 __fmode + 0589:0F76 __notUmask + 0589:0F78 __doserrno + 0589:0F7A idle __dosErrorToSV + 0589:0FDE __stklen + 0589:1048 __wscroll + 0589:104A __video + 0589:1059 _directvideo + 0589:1096 __cFlag + 0589:1097 __cChar + 0589:1098 __argc + 0589:109A __argv + 0589:10A8 _environ + 0589:10B2 __RealCvtVector + 0589:10B4 idle __ScanTodVector + 0589:10D6 idle _heaphandle + 0589:10D8 idle _finishcachebox + 0589:10DA idle _updatecachebox + 0589:10DC idle _drawcachebox + 0589:10DE _debughandle + 0589:10E0 idle _profilehandle + 0589:10E2 idle _XMSaddr + 0589:10E4 idle _aftersort + 0589:10E6 idle _beforesort + 0589:10E8 __atexittbl Program entry point at 0000:0000 diff --git a/16/exmmtest/EXMMTEST.PRJ b/16/exmmtest/EXMMTEST.PRJ index 13a00527..752cc1cf 100644 Binary files a/16/exmmtest/EXMMTEST.PRJ and b/16/exmmtest/EXMMTEST.PRJ differ diff --git a/16/exmmtest/HEAP.16 b/16/exmmtest/HEAP.16 new file mode 100644 index 00000000..b346451c --- /dev/null +++ b/16/exmmtest/HEAP.16 @@ -0,0 +1,45 @@ + + == default == + + USED block at 1d1d0016 of size 136 + USED block at 1d1d009e of size 66 + FREE block at 1d1d00e0 of size 7966 + USED block at 1d1d1ffe of size 20 + FREE block at 1d1d2012 of size 8170 +OK - end of heap + + == near == + + USED block at 0 of size 0 + USED block at 0 of size 0 + USED block at 0 of size 0 + USED block at 0 of size 0 + USED block at 0 of size 0 + USED block at 0 of size 0 + USED block at 0 of size 0 + USED block at 0 of size 0 + USED block at 0 of size 0 +OK - end of heap + + == far == + + USED block at 0 of size 0 + USED block at 0 of size 0 + USED block at 0 of size 0 + USED block at 0 of size 0 + USED block at 0 of size 0 +OK - end of heap + +Memory Type Total Used Free +---------------- -------- -------- -------- +Default 16358 222 16136 +Near 31318 880 30438 +Far 16358 222 16136 +---------------- -------- -------- -------- +coreleft = 30434 +farcoreleft = 38182 +GetFreeSize = 7768 +GetNearFreeSize = 30438 +GetFarFreeSize = 7768 +memavl = 30434 +stackavail = 17107 diff --git a/16/exmmtest/TC0000.SWP b/16/exmmtest/TC0000.SWP new file mode 100644 index 00000000..200380e7 Binary files /dev/null and b/16/exmmtest/TC0000.SWP differ diff --git a/16/exmmtest/src/exmmtest.c b/16/exmmtest/src/exmmtest.c index e4f56528..c93e902a 100644 --- a/16/exmmtest/src/exmmtest.c +++ b/16/exmmtest/src/exmmtest.c @@ -48,7 +48,7 @@ main(int argc, char *argv[]) void __based(sega)* bigbuffer; #endif #ifdef __BORLANDC__ - void memptr* bigbuffer; + memptr bigbuffer; #endif #ifdef FILERL char *bakapee; @@ -72,7 +72,7 @@ main(int argc, char *argv[]) else bakapee = "data/koishi~.pcx"; #endif - textInit(); +// textInit(); /* setup camera and screen~ */ //bug!!! @@ -108,7 +108,9 @@ main(int argc, char *argv[]) baka=0; // close(bakapeehandle); //hmm functions in cache system use the buffered stuff +#ifdef __WATCOMC__ printf("size of big buffer~=%u\n", _bmsize(sega, bigbuffer)); +#endif #endif printf("dark purple = purgable\n"); printf("medium blue = non purgable\n"); @@ -144,7 +146,9 @@ main(int argc, char *argv[]) printf("Total far free: %lu\n", (dword)(GetFarFreeSize())); getch();*/ printf("\n"); +#ifdef __WATCOMC__ heapdump(); +#endif //printf("core left: %lu\n", (dword)_coreleft()); //printf("far core left: %lu\n", (dword)_farcoreleft()); //printf("based core left: %lu\n", (dword)_basedcoreleft()); diff --git a/16/exmmtest/src/lib/16_ca.c b/16/exmmtest/src/lib/16_ca.c index f74a5710..5eb2d16b 100644 --- a/16/exmmtest/src/lib/16_ca.c +++ b/16/exmmtest/src/lib/16_ca.c @@ -218,22 +218,21 @@ void CAL_GetGrChunkLength (int chunk) boolean CA_FarRead(int handle, byte huge *dest, dword length, mminfo_t *mm) { boolean flag; - /*dword fat=0; - word segm=0; + /*dword fat=0; + word segm=0; //if(mm->EMSVer<0x40) - if(length>0xfffflu) - { - printf("File is a fat bakapee\n"); - segm=(length%0xfffflu)-1; - fat=segm*0xfffflu; + if(length>0xfffflu) + { + printf("File is a fat bakapee\n"); + segm=(length%0xfffflu)-1; + fat=segm*0xfffflu; length-=fat; // printf("CA_FarRead doesn't support 64K reads yet!\n"); - } - - if(!fat&&!segm) + } + + if(!fat&&!segm) {*/ - __asm - { + __asm { push ds mov bx,[handle] mov cx,[WORD PTR length] @@ -246,17 +245,34 @@ boolean CA_FarRead(int handle, byte huge *dest, dword length, mminfo_t *mm) mov errno,ax mov flag,0 jmp End +#ifdef __BORLANDC__ + } +#endif good: +#ifdef __BORLANDC__ + __asm { +#endif cmp ax,[WORD PTR length] je done // errno = EINVFMT; // user manager knows this is bad read mov flag,0 jmp End +#ifdef __BORLANDC__ + } +#endif done: +#ifdef __BORLANDC__ + __asm { +#endif mov flag,1 +#ifdef __BORLANDC__ + } +#endif End: +#ifdef __WATCOMC__ } - return flag; +#endif + return flag; //}else return 0;//todo: EXPAND!!! } @@ -274,22 +290,21 @@ End: boolean CA_FarWrite(int handle, byte huge *source, dword length, mminfo_t *mm) { boolean flag; - /*dword fat=0; - word segm=0; + /*dword fat=0; + word segm=0; //if(mm->EMSVer<0x40) - if(length>0xfffflu) - { - printf("File is a fat bakapee\n"); - segm=(length%0xfffflu)-1; - fat=segm*0xfffflu; + if(length>0xfffflu) + { + printf("File is a fat bakapee\n"); + segm=(length%0xfffflu)-1; + fat=segm*0xfffflu; length-=fat; // printf("CA_FarRead doesn't support 64K reads yet!\n"); } - - if(!fat&&!segm) + + if(!fat&&!segm) {*/ - __asm - { + __asm { push ds mov bx,[handle] mov cx,[WORD PTR length] @@ -302,17 +317,34 @@ boolean CA_FarWrite(int handle, byte huge *source, dword length, mminfo_t *mm) mov errno,ax mov flag,0 jmp End +#ifdef __BORLANDC__ + } +#endif good: +#ifdef __BORLANDC__ + __asm { +#endif cmp ax,[WORD PTR length] je done //errno = ENOMEM; // user manager knows this is bad write mov flag,0 jmp End +#ifdef __BORLANDC__ + } +#endif done: +#ifdef __BORLANDC__ + __asm { +#endif mov flag,1 +#ifdef __BORLANDC__ + } +#endif End: +#ifdef __WATCOMC__ } - return flag; +#endif + return flag; //}else return 0; } @@ -330,7 +362,7 @@ End: boolean CA_ReadFile(char *filename, memptr *ptr, mminfo_t *mm) { int handle; - dword size; + dword size; //long size; if((handle = open(filename,O_RDONLY | O_BINARY, S_IREAD)) == -1) @@ -361,7 +393,7 @@ boolean CA_ReadFile(char *filename, memptr *ptr, mminfo_t *mm) boolean CA_LoadFile(char *filename, memptr *ptr, mminfo_t *mm, mminfotype *mmi) { int handle; - dword size; + dword size; //long size; if((handle = open(filename,O_RDONLY | O_BINARY, S_IREAD)) == -1) diff --git a/16/exmmtest/src/lib/16_hc.c b/16/exmmtest/src/lib/16_hc.c index f9f4948c..df9602d8 100644 --- a/16/exmmtest/src/lib/16_hc.c +++ b/16/exmmtest/src/lib/16_hc.c @@ -33,23 +33,48 @@ void __near* LargestFreeBlock(size_t* Size) void __near* p; s0 = ~(size_t)0 ^ (~(size_t)0 >> 1); +#ifdef __BORLANDC__ + while (s0 && (p = malloc(s0)) == NULL) +#endif +#ifdef __WATCOMC__ while (s0 && (p = _nmalloc(s0)) == NULL) +#endif s0 >>= 1; if (p) +#ifdef __BORLANDC__ + free(p); +#endif +#ifdef __WATCOMC__ _nfree(p); +#endif s1 = s0 >> 1; while (s1) { +#ifdef __BORLANDC__ + if ((p = malloc(s0 + s1)) != NULL) +#endif +#ifdef __WATCOMC__ if ((p = _nmalloc(s0 + s1)) != NULL) +#endif { s0 += s1; +#ifdef __BORLANDC__ + free(p); +#endif +#ifdef __WATCOMC__ _nfree(p); +#endif } s1 >>= 1; } +#ifdef __BORLANDC__ + while (s0 && (p = malloc(s0)) == NULL) +#endif +#ifdef __WATCOMC__ while (s0 && (p = _nmalloc(s0)) == NULL) +#endif s0 ^= s0 & -s0; *Size = s0; @@ -68,7 +93,12 @@ size_t _coreleft(void) if (largest < sizeof(void __near*)) { if (p != NULL) +#ifdef __BORLANDC__ + free(p); +#endif +#ifdef __WATCOMC__ _nfree(p); +#endif break; } *(void __near* __near*)p = NULL; @@ -84,7 +114,12 @@ size_t _coreleft(void) while (pFirst != NULL) { void __near* p = *(void __near* __near*)pFirst; +#ifdef __BORLANDC__ + free(pFirst); +#endif +#ifdef __WATCOMC__ _nfree(pFirst); +#endif pFirst = p; } return total; @@ -153,6 +188,7 @@ size_t _farcoreleft(void) return total; } +#ifdef __WATCOMC__ void huge* LargestHugeFreeBlock(size_t* Size) { size_t s0, s1; @@ -367,7 +403,7 @@ void heapdump(void) write(heaphandle,scratch,strlen(scratch)); } heapstat(heap_status, &scratch); - + //near strcpy(scratch,"\n == near ==\n\n"); write(heaphandle,scratch,strlen(scratch)); @@ -432,7 +468,7 @@ void heapstat(int heap_status, byte *str) break; case _HEAPEMPTY: strcpy((str),"OK - heap is empty\n"); - + break; case _HEAPBADBEGIN: strcpy((str),"ERROR - heap is damaged\n"); @@ -454,7 +490,7 @@ void heapstat0(int heap_status) break; case _HEAPEMPTY: //printf("OK - heap is empty\n"); - + break; case _HEAPBADBEGIN: printf("ERROR - heap is damaged\n"); @@ -466,7 +502,7 @@ void heapstat0(int heap_status) printf("ERROR - bad node in heap\n"); } } - +#endif /* ============================ = diff --git a/16/exmmtest/src/lib/16_head.c b/16/exmmtest/src/lib/16_head.c index df0b31c7..7dd53866 100644 --- a/16/exmmtest/src/lib/16_head.c +++ b/16/exmmtest/src/lib/16_head.c @@ -1,27 +1,27 @@ -/* 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 "src/lib/16_head.h" - +/* 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 "src/lib/16_head.h" + /* Function: Wait ********************************************************** * * Parameters: wait - time in microseconds @@ -36,9 +36,9 @@ void wait(clock_t wait){ goal = wait + clock(); while((goal > clock()) && !kbhit()) ; -} /* End of wait */ - -long int +} /* End of wait */ + +long int filesize(FILE *fp) { long int save_pos, size_of_file; @@ -48,63 +48,15 @@ filesize(FILE *fp) size_of_file = ftell(fp); fseek(fp, save_pos, SEEK_SET); return(size_of_file); -} - -void printmeminfoline(byte *strc, const byte *pee, size_t h_total, size_t h_used, size_t h_free) -{ - byte str[64]; - strcat(strc,pee); strcat(strc," "); ultoa((dword)h_total,str,10); strcat(strc,str); strcat(strc," "); ultoa((dword)h_used,str,10); strcat(strc,str); strcat(strc," "); ultoa((dword)h_free,str,10); strcat(strc,str); - strcat(strc,"\n"); -} - -void print_normal_entry(char *text, dword total, dword used, dword free, byte *str) -{ - printf("%-17s", text); - convert("%8sB ", total); - convert("%9sB ", used); - convert("%9sB\n", free); -} - -/* - * As for printf(), but format may only contain a single format specifier, - * which must be "%s" and is replaced with the string form of num with commas - * separating groups of three digits. - * - * e.g. convert("%s bytes", 1234567) -> "1,234,567 bytes" - */ -void convert(const char *format, dword num) -{ - int c, i, j, n; - char des[4*sizeof(dword)+3]; - union REGS regs; - struct SREGS sregs; - char mycountry[48]; /* probably 34 bytes are enough... */ - char ksep = ','; /* or . */ - - regs.x.ax = 0x3800; - sregs.ds = FP_SEG(&mycountry); - regs.x.dx = FP_OFF(&mycountry); - intdosx(®s,®s,&sregs); - if (regs.x.cflag == 0) { - ksep = mycountry[7]; /* 1000's separator */ - /* dsep = mycountry[9]; ** decimal separator */ - } - - n = sprintf(des, "%lu", num); - /* insert commas in the string */ - c = 3; - for (i = n - 3; i > 0; i--) { - if (c%3==0) { - for (j = n; j >= i; j--) - des[j+1] = des[j]; - des[i]=ksep; /* ',' */ - n++; - } - c++; - } - printf(format, des); -} - +} + +void printmeminfoline(byte *strc, const byte *pee, size_t h_total, size_t h_used, size_t h_free) +{ + byte str[64]; + strcat(strc,pee); strcat(strc," "); ultoa((dword)h_total,str,10); strcat(strc,str); strcat(strc," "); ultoa((dword)h_used,str,10); strcat(strc,str); strcat(strc," "); ultoa((dword)h_free,str,10); strcat(strc,str); + strcat(strc,"\n"); +} + /////////////////////////////////////////////////////////////////////////// // // US_CheckParm() - checks to see if a string matches one of a set of @@ -138,8 +90,8 @@ US_CheckParm(char *parm,char **strings) } } return(-1); -} - +} + /* ========================== = @@ -201,4 +153,4 @@ US_CheckParm(char *parm,char **strings) #endif exit(exit_code); -}*/ +}*/ diff --git a/16/exmmtest/src/lib/16_head.h b/16/exmmtest/src/lib/16_head.h index f74e8823..e6e590b4 100644 --- a/16/exmmtest/src/lib/16_head.h +++ b/16/exmmtest/src/lib/16_head.h @@ -32,27 +32,29 @@ #define _LIBHEAD_H_ #include #include +#include #include // just for wait #include // just for wait -#include #include #include #include +#include #include #include +#include #ifdef __WATCOMC__ #include #include #include -#include "src/lib/nyan/kitten.h" #endif +#include "src/lib/nyan/kitten.h" #include "src/lib/types.h" //0000 test type def wwww -struct list { +/*struct list { struct list __based(__self) *next; int value; -}; +};*/ /* Control codes for all keys on the keyboard */ //here temperarly @@ -186,8 +188,6 @@ void wait(clock_t wait); long int filesize(FILE *fp); void printmeminfoline(byte *strc, const byte *pee, size_t h_total, size_t h_used, size_t h_free); -void print_normal_entry(char *text, dword total, dword used, dword free, byte *str); -void convert(const char *format, dword num); int US_CheckParm(char *parm,char **strings); extern void CA_OpenDebug (void); diff --git a/16/exmmtest/src/lib/16_mm.c b/16/exmmtest/src/lib/16_mm.c index ba0b8bfe..90439b1d 100644 --- a/16/exmmtest/src/lib/16_mm.c +++ b/16/exmmtest/src/lib/16_mm.c @@ -120,13 +120,24 @@ boolean MML_CheckForEMS(void) // mov emmcfems,1 jmp End +#ifdef __BORLANDC__ + } +#endif error: +#ifdef __BORLANDC__ + __asm { +#endif // // EMS is bad // mov emmcfems,0 +#ifdef __BORLANDC__ + } +#endif End: +#ifdef __WATCOMC__ } +#endif return(emmcfems); } @@ -150,8 +161,7 @@ byte MML_SetupEMS(mminfo_t *mm) unsigned totalEMSpages,freeEMSpages,EMSpageframe,EMSpagesmapped,EMShandle; totalEMSpages = freeEMSpages = EMSpageframe = EMSpagesmapped = 0; - __asm - { + __asm { mov ah,EMS_STATUS int EMS_INT // make sure EMS hardware is present or ah,ah @@ -187,13 +197,23 @@ byte MML_SetupEMS(mminfo_t *mm) jle getpages mov bx,[freeEMSpages] jmp getpages - -low: +#ifdef __BORLANDC__ + } +#endif + low: +#ifdef __BORLANDC__ + __asm { +#endif cmp bx,4 jle getpages // there is only 1,2,3,or 4 pages mov bx,4 // we can't use more than 4 pages - -getpages: +#ifdef __BORLANDC__ + } +#endif + getpages: +#ifdef __BORLANDC__ + __asm { +#endif mov [EMSpagesmapped],bx mov ah,EMS_ALLOCPAGES // allocate up to 64k of EMS int EMS_INT @@ -201,19 +221,30 @@ getpages: jnz error mov [EMShandle],dx jmp End -error: +#ifdef __BORLANDC__ + } +#endif + error: +#ifdef __BORLANDC__ + __asm { +#endif mov err,ah mov errorflag,1 jmp End +#ifdef __BORLANDC__ + } +#endif noEMS: End: +#ifdef __WATCOMC__ } +#endif if(errorflag==true) { //err = CPURegs.h.ah; strcpy(str,"MM_SetupEMS: EMS error "); //itoa(err,str2,16); - MM_EMSerr(&str, err); + MM_EMSerr(str, err); printf("%s\n",str); return err; } @@ -242,16 +273,20 @@ void MML_ShutdownEMS(mminfo_t *mm) if(!EMShandle) return; - __asm - { + __asm { mov ah,EMS_FREEPAGES mov dx,[EMShandle] int EMS_INT or ah,ah jz ok mov errorflag,1 +#ifdef __BORLANDC__ + } +#endif ok: +#ifdef __WATCOMC__ } +#endif if(errorflag==true) printf("MML_ShutdownEMS: Error freeing EMS!\n"); //++++ add something } @@ -278,8 +313,7 @@ byte MM_MapEMS(mminfo_t *mm, mminfotype *mmi) for (i=0;i<4/*MAPPAGES*/;i++) { - __asm - { + __asm { mov ah,EMS_MAPPAGE mov bx,[i] // logical page mov al,bl // physical page @@ -288,11 +322,22 @@ byte MM_MapEMS(mminfo_t *mm, mminfotype *mmi) or ah,ah jnz error jmp End +#ifdef __BORLANDC__ + } +#endif error: +#ifdef __BORLANDC__ + __asm { +#endif mov err,ah mov errorflag,1 +#ifdef __BORLANDC__ + } +#endif End: +#ifdef __WATCOMC__ } +#endif if(errorflag==true) { //err = CPURegs.h.ah; @@ -344,8 +389,7 @@ byte MM_MapXEMS(mminfo_t *mm, mminfotype *mmi) for (i=0;inumUMBs = 0; - __asm - { + __asm { mov ax,0x4300 int 0x2f // query status of installed diver cmp al,0x80 je good mov errorflag,1 +#ifdef __BORLANDC__ + } +#endif good: +#ifdef __WATCOMC__ } +#endif if(errorflag==true) return false; else return true; } @@ -422,8 +481,7 @@ void MML_SetupXMS(mminfo_t *mm, mminfotype *mmi) unsigned base,size; getmemory: - __asm - { + __asm { mov ax,0x4310 int 0x2f mov [WORD PTR XMSaddr],bx @@ -443,12 +501,22 @@ getmemory: call [DWORD PTR XMSaddr] // DX holds largest available UMB or ax,ax jz done // another error... - -gotone: +#ifdef __BORLANDC__ + } +#endif + gotone: +#ifdef __BORLANDC__ + __asm { +#endif mov [base],bx mov [size],dx -done: +#ifdef __BORLANDC__ } +#endif + done: +#ifdef __WATCOMC__ + } +#endif printf("base=%u ", base); printf("size=%u\n", size); MML_UseSpace(base,size, mm); mmi->XMSmem += size*16; @@ -475,8 +543,7 @@ void MML_ShutdownXMS(mminfo_t *mm) for (i=0;inumUMBs;i++) { base = mm->UMBbase[i]; - __asm - { + __asm { mov ah,XMS_FREEUMB mov dx,[base] call [DWORD PTR XMSaddr] @@ -672,27 +739,36 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi) // // get all available near conventional memory segments // -//---- length=coreleft(); - printf(" nearheap making!\n"); +// printf(" nearheap making!\n"); +#ifdef __WATCOMC__ _nheapgrow(); length=(dword)_memmax();//(dword)GetFreeSize(); start = (void huge *)(mm->nearheap = _nmalloc(length)); +#endif +#ifdef __BORLANDC__ + length=coreleft(); + start = (void huge *)(mm->nearheap = malloc(length)); +#endif length -= 16-(FP_OFF(start)&15); length -= SAVENEARHEAP; seglength = length / 16; // now in paragraphs segstart = FP_SEG(start)+(FP_OFF(start)+15)/16; MML_UseSpace(segstart,seglength, mm); mmi->nearheap = length; - printf("start=%FP segstart=%X seglen=%lu len=%lu\n", start, segstart, seglength, length); + printf("start=%Fp segstart=%x seglen=%l len=%l\n", start, segstart, seglength, length); //heapdump(); // // get all available far conventional memory segments // -//---- length=farcoreleft(); - printf(" farheap making!\n"); +// printf(" farheap making!\n"); +#ifdef __WATCOMC__ _fheapgrow(); length=(dword)GetFarFreeSize();//0xffffUL*4UL; +#endif +#ifdef __BORLANDC__ + length=farcoreleft(); +#endif //start = mm->farheap = halloc(length, 1); start = mm->farheap = _fmalloc(length); length -= 16-(FP_OFF(start)&15); @@ -701,7 +777,7 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi) segstart = FP_SEG(start)+(FP_OFF(start)+15)/16; MML_UseSpace(segstart,seglength, mm); mmi->farheap = length; - printf("start=%FP segstart=%X seglen=%lu len=%lu\n", start, segstart, seglength, length); + printf("start=%Fp segstart=%x seglen=%l len=%l\n", start, segstart, seglength, length); //heapdump(); mmi->mainmem = mmi->nearheap + mmi->farheap; @@ -716,9 +792,23 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi) //printf(" EMS1\n"); //printf("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"); //bug! mmi->EMSmem = 0; - for(i = 1;i < __argc;i++) + for(i = 1;i < +#ifdef __WATCOMC__ + __argc +#endif +#ifdef __BORLANDC__ + _argc +#endif + ;i++) { - if(US_CheckParm(__argv[i],ParmStringsexmm) == 0) + if(US_CheckParm( +#ifdef __WATCOMC__ + __argv[i] +#endif +#ifdef __BORLANDC__ + _argv[i] +#endif + ,ParmStringsexmm) == 0) goto emsskip; // param NOEMS } //printf("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"); //bug! @@ -747,9 +837,23 @@ goto xmsskip; // emsskip: mmi->XMSmem = 0; - for(i = 1;i < __argc;i++) + for(i = 1;i < +#ifdef __WATCOMC__ + __argc +#endif +#ifdef __BORLANDC__ + _argc +#endif + ;i++) { - if(US_CheckParm(__argv[i],ParmStringsexmm) == 0) + if(US_CheckParm( +#ifdef __WATCOMC__ + __argv[i] +#endif +#ifdef __BORLANDC__ + _argv[i] +#endif + ,ParmStringsexmm) == 0) goto xmsskip; // param NOXMS } //printf("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"); //bug! @@ -787,7 +891,12 @@ void MM_Shutdown(mminfo_t *mm) return; _ffree(mm->farheap); printf(" far freed\n"); +#ifdef __WATCOMC__ _nfree(mm->nearheap); printf(" near freed\n"); +#endif +#ifdef __BORLANDC__ + free(mm->nearheap); printf(" near freed\n"); +#endif if(MML_CheckForEMS()){ MML_ShutdownEMS(mm); printf(" EMS freed\n"); } if(MML_CheckForXMS(mm)){ MML_ShutdownXMS(mm); printf(" XMS freed\n"); } } @@ -898,7 +1007,9 @@ printf("\n"); if (mm->bombonerror) { +#ifdef __WATCOMC__ heapdump(); +#endif printf(OUT_OF_MEM_MSG,(size-mmi->nearheap)); printf("for stability reasons the program will shut down! wwww\n"); printf(" endid=%u\n",(mm->endid)); @@ -1151,9 +1262,10 @@ void MM_SortMem(mminfo_t *mm) void MM_ShowMemory(/*page_t *page, */mminfo_t *mm) { mmblocktype huge *scan; - word color,temp; +//++++ word color; + word temp; long end,owner; - word chx,chy; +//++++ word chx,chy; byte scratch[160],str[16]; //**** VW_SetDefaultColors(); @@ -1168,17 +1280,17 @@ void MM_ShowMemory(/*page_t *page, */mminfo_t *mm) CA_OpenDebug (); - chx=0; - chy=0; +//++++ chx=0; +//++++ chy=0; while(scan) { - if(scan->attributes & PURGEBITS) +/*++++ if(scan->attributes & PURGEBITS) color = 5; // dark purple = purgable else color = 9; // medium blue = non purgable if(scan->attributes & LOCKBIT) - color = 12; // red = locked + color = 12; // red = locked*/ if(scan->start<=end) { //printf("); @@ -1187,8 +1299,8 @@ CA_OpenDebug (); return; } end = scan->start+scan->length-1; - chy = scan->start/320; - chx = scan->start%320; +//++++ chy = scan->start/320; +//++++ chx = scan->start%320; //modexhlin(page, scan->start, (unsigned)end, chy, color); //for(chx=scan->start;chx+4>=(word)end;chx+=4) //{ diff --git a/16/exmmtest/src/lib/nyan/kitten.c b/16/exmmtest/src/lib/nyan/kitten.c new file mode 100644 index 00000000..4e501dec --- /dev/null +++ b/16/exmmtest/src/lib/nyan/kitten.c @@ -0,0 +1,615 @@ + +/* Functions that emulate UNIX catgets */ + +/* Copyright (C) 1999,2000,2001 Jim Hall */ + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include /* sprintf */ +#include /* getenv */ +#include /* strchr */ +#include +#include +#include + +#include "src/lib/nyan/kitten.h" + + +/* DB stuff */ + +struct db_list{ + struct db_list *next; + char *key; + char *value; +}; + +typedef struct db_list db_t; + +db_t *db_insert (char *key, char *value); +db_t *db_fetch (char *key); + + +/* External functions */ + +int get_line (int file, char *buffer, int size); + + +/* Local prototypes */ + +int catread (char *catfile); /* Reads a catfile into the hash */ +char *processEscChars(char *line); /* Converts c escape sequences to chars */ + +/* Globals */ + +nl_catd _kitten_catalog = 0; /* _kitten_catalog descriptor, either 0 or 1 */ + + + +#if defined(__SMALL__) /* it's not very portable ;) */ + +#include +/* assert we are running in small model */ +/* else pointer below has to be done correctly */ +char verify_small_pointers[sizeof(void*) == 2 ? 1 : -1]; + + +int dos_open(char *filename, int mode); +#define open(filename,mode) dos_open(filename,mode) + +int dos_read(int file, void *ptr, unsigned count); +#define read(file, ptr, count) dos_read(file,ptr,count) + +void dos_close(int file); +#define close(file) dos_close(file) + +#ifdef __WATCOMC__ + +#pragma aux dos_open = \ +"mov ax, 0x3d00" \ +"int 0x21" \ +"jnc noerror" \ +"mov ax, 0xffff" \ +"noerror:" \ +parm [dx] [ax] value [ax]; + +#pragma aux dos_read = \ +"mov ah, 0x3f" \ +"int 0x21" \ +"jnc noerror" \ +"xor ax, ax" \ +"noerror:" \ +parm [bx] [dx] [cx] value [ax]; + +#pragma aux dos_close = \ +"mov ah, 0x3e" \ +"int 0x21" \ +parm [bx]; + +#else + +int dos_open(char *filename, int mode) +{ + union REGS r; + + if (mode); /* mode ignored - readonly supported */ + + r.h.ah = 0x3d; + r.h.al = 0; /* read mode only supoported now !! */ + r.x.dx = (unsigned)filename; + intdos(&r,&r); + + if (r.x.cflag) + return -1; + return r.x.ax; +} + +int dos_read(int file, void *ptr, unsigned count) +{ + union REGS r; + + r.h.ah = 0x3f; + r.x.bx = file; + r.x.cx = count; + r.x.dx = (unsigned)ptr; + intdos(&r,&r); + + if (r.x.cflag) + return 0; + return r.x.ax; +} + +void dos_close(int file) +{ + union REGS r; + + r.h.ah = 0x3e; + r.x.bx = file; + intdos(&r,&r); +} + +#endif +#endif + +#ifndef NOCATS + +/* Functions */ + +char * +pascal kittengets(int set_number, int message_number, char *message) +{ + /* get message from a message _kitten_catalog */ + + /* 'message' should really be const, but not when it is returned */ + + /* On success, catgets() returns a pointer to an internal buffer + area containing the null-terminated message string. On failure, + catgets() returns the value 'message'. */ + + char key[10]; + db_t *ptr; + + + /* fetch the message that goes with the set/message number */ + + sprintf (key, "%d.%d", set_number, message_number); + ptr = db_fetch (key); + + /* printf("\ncatgets %s\n",message); */ + + if (ptr) + { + /* printf("------> %s\n",ptr->value); */ + + return (ptr->value); + } + + /* else */ + + return (message); +} + +nl_catd +kittenopen(char *name) +{ + /* catopen() returns a message _kitten_catalog descriptor of type nl_catd on + success. On failure, it returns -1. */ + + /* 'flag' is completely ignored here. */ + + char catfile[256]; /* full path to the msg _kitten_catalog */ + char *nlsptr; /* ptr to NLSPATH */ + char *lang; /* ptr to LANG */ + + + + /* Open the _kitten_catalog file */ + + /* The value of `_kitten_catalog' will be set based on catread */ + + if (_kitten_catalog) + { + /* Already one open */ + + printf("cat already open\n"); + return (-1); + } + + /* If the message _kitten_catalog file name contains a directory separator, + assume that this is a real path to the _kitten_catalog file. Note that + catread will return a true or false value based on its ability + to read the catfile. */ + + if (strchr (name, '\\')) + { + /* first approximation: 'name' is a filename */ + + printf("found \\\n"); + + _kitten_catalog = catread (name); + return (_kitten_catalog); + } + + /* If the message _kitten_catalog file name does not contain a directory + separator, then we need to try to locate the message _kitten_catalog on + our own. We will use several methods to find it. */ + + /* We will need the value of LANG, and may need a 2-letter abbrev of + LANG later on, so get it now. */ + + lang = getenv ("LANG"); + + if (lang == NULL) + { + /* printf("no lang= found\n"); */ + + /* Return failure - we won't be able to locate the cat file */ + return (-1); + } + + + /* step through NLSPATH */ + + nlsptr = getenv ("NLSPATH"); + + + if (nlsptr == NULL) + { + /* printf("no NLSPATH= found\n"); */ + + /* Return failure - we won't be able to locate the cat file */ + return (-1); + } + + /* printf("nlsptr:%s\n",nlsptr); */ + + while (*nlsptr) + { + char *tok = strchr(nlsptr, ';'); + int toklen; + + + if (tok == NULL) tok = nlsptr + strlen(nlsptr); + toklen=tok-nlsptr; + /* Try to find the _kitten_catalog file in each path from NLSPATH */ + + /* Rule #1: %NLSPATH%\%LANG%\cat */ + + memcpy(catfile,nlsptr,toklen); + sprintf(catfile+toklen,"\\%s\\%s",lang,name); + + _kitten_catalog = catread (catfile); + if (_kitten_catalog) + { + return (_kitten_catalog); + } + + /* Rule #2: %NLSPATH%\cat.%LANG% */ + + sprintf(catfile+toklen,"\\%s.%s",name, lang); + + _kitten_catalog = catread (catfile); + + if (_kitten_catalog) + { + return (_kitten_catalog); + } + + /* Rule #3: if LANG looks to be in format "en-UK" then + %NLSPATH%\cat.EN */ + + if (lang[2] == '-') + { + lang[2] = 0; + sprintf(catfile+toklen,"\\%s.%s",name,lang); + lang[2] = '-'; + + _kitten_catalog = catread (catfile); + if (_kitten_catalog) + { + return (_kitten_catalog); + } + } + + /* Grab next tok for the next while iteration */ + nlsptr = tok; + if (*nlsptr) nlsptr++; + + } /* while tok */ + + /* We could not find it. Return failure. */ + + return (0); +} + +int +catread (char *catfile) +{ + int file; /* pointer to the catfile */ + char *key; /* part of key-value for hash */ + char *value; /* part of key-value for hash */ + char inBuffer[256]; /* the string read from the file */ + + /* Open the catfile for reading */ + + /*printf("catread %s\n",catfile); */ + + file = open (catfile, O_RDONLY | O_TEXT); + if (file < 0) + { + /* Cannot open the file. Return failure */ + /* printf("catread: cant read %s\n",catfile); */ + return (0); + } + + /*printf("catread %s success\n",catfile);*/ + + /* Read the file into memory */ + + while (get_line (file, inBuffer, sizeof(inBuffer))) + { + /* Break into parts. Entries should be of the form: + "1.2:This is a message" */ + + /* A line that starts with '#' is considered a comment, and will + be thrown away without reading it. */ + + if (inBuffer[0] == '#') /* comment */ + continue; + + if ((key = strchr (inBuffer, ':')) != NULL) + { + *key = 0; + + value = processEscChars(key+1); + + db_insert (inBuffer, value); + } + + } /* while */ + + close (file); + + /* Return success */ + + return (1); +} + +void +kittenclose (void) +{ + /* close a message _kitten_catalog */ + + _kitten_catalog = 0; +} + + + +/** + * Process strings, converting \n, \t, \v, \b, \r, \f, \\, \ddd, \xdd and \x0dd + * to actual chars. (Note: \x is an extension to support hexadecimal) + * This method is used to allow the message _kitten_catalog to use c escape sequences. + * Modifies the line in-place (always same size or shorter). + * Returns a pointer to input string. + */ + +int mystrtoul(char *src, int base, int size, int *error) +{ + int ret = 0; + + *error = 1; + + for (; size > 0; size--) + { + int digit; + int ch = *src++; + + if (ch >= '0' && ch <= '9') digit = ch - '0'; + else if (ch >= 'A' && ch <= 'Z') digit = ch - 'A' + 10; + else if (ch >= 'a' && ch <= 'z') digit = ch - 'a' + 10; + else + { + return 0; + } + + if (digit >= base) + { + return 0; + } + + ret = ret * base + digit; + } + + *error = 0; + + return ret; +} + + +char *processEscChars(char *line) +{ + register char *src = line, *dst = line; + + /* used when converting \xdd and \ddd (hex or octal) characters */ + char ch; + + if (line == NULL) return NULL; + + /* cycle through copying characters, except when a \ is encountered. */ + for ( ; *src != '\0'; src++, dst++) + { + ch = *src; + + if (ch == '\\') + { + src++; /* point to char following slash */ + switch (ch = *src) + { + case '\\': /* a single slash */ + ch = '\\'; + break; + case 'n': /* a newline (linefeed) */ + ch = '\n'; + break; + case 'r': /* a carriage return */ + ch = '\r'; + break; + case 't': /* a horizontal tab */ + ch = '\t'; + break; + case 'v': /* a vertical tab */ + ch = '\v'; + break; + case 'b': /* a backspace */ + ch = '\b'; + break; + case 'a': /* alert */ + ch = '\a'; + break; + case 'f': /* formfeed */ + ch = '\f'; + break; + case 'x': /* extension supporting hex numbers \xdd or \x0dd */ + { + int error; + ch = mystrtoul(src+1,16,2, &error); /* get value */ + if (!error) /* store character */ + { + src += 2; + } + else /* error so just store x (loose slash) */ + { + ch = *src; + } + } + + break; + default: /* just store letter (loose slash) or handle octal */ + + { + int error; + ch = mystrtoul(src,8,3, &error); /* get value */ + if (!error) /* store character */ + { + src += 3; + } + else + ch = *src; + } + + break; + } + } + + *dst = ch; + } + + /* ensure '\0' terminated */ + *dst = '\0'; + + return line; +} + + + +int +get_line (int file, char *str, int size) +{ + int success = 0; + + /* now, read the string */ + + for ( ; size > 0; ) + { + if (read(file,str,1) <= 0) + break; + + success = 1; + + if (*str == '\r') + continue; + + if (*str == '\n') + break; + + str++; + size--; + + } /* while */ + + *str = 0; + + return success; +} + +/* Function prototypes */ + + +/* Global variables */ + +static db_t *hashtab[1]; + + +/* Functions */ + + +/* db_fetch() - Query the hash and return a struct that contains the + key and the pointer. The calling function should not look beyond + that. */ + +db_t * +db_fetch (char *s) +{ + db_t *db_ptr; + + for (db_ptr = hashtab[0]; db_ptr != NULL; db_ptr = db_ptr->next) + { + if (strcmp (s, db_ptr->key) == 0) + { + break; + + } + } + + + return (db_ptr); +} + +/* db_insert() - Inserts a key,value pair into the hash. If the key + already exists in the hash, the new value is NOT inserted. */ + +db_t * +db_insert (char *key, char *value) +{ + db_t *db_ptr; + + if ((db_ptr = db_fetch (key)) == NULL) + { + /* not found */ + + db_ptr = (db_t *) malloc (sizeof (*db_ptr)); + + if (db_ptr == NULL || (db_ptr->key = strdup (key)) == NULL) + { + return (NULL); + } + + /* insert the key,value into the hash. */ + + db_ptr->next = hashtab[0]; + hashtab[0] = db_ptr; + } + + else + { + /* already there */ + + free ((void *) db_ptr->value); + } + + if ((db_ptr ->value = strdup (value)) == NULL) + { + return (NULL); + } + + /* else */ + + return (db_ptr); +} + + + +#endif /* NOCATS */ diff --git a/16/exmmtest/src/lib/nyan/kitten.h b/16/exmmtest/src/lib/nyan/kitten.h new file mode 100644 index 00000000..2cec22fe --- /dev/null +++ b/16/exmmtest/src/lib/nyan/kitten.h @@ -0,0 +1,73 @@ +/* $Id: kitten.h,v 1.1 2004/09/19 10:01:26 bartoldeman Exp $ */ + +/* Functions that emulate UNIX catgets */ + +/* Copyright (C) 1999,2000 Jim Hall */ + +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + + +#ifndef _CATGETS_H +#define _CATGETS_H + +#ifdef NOCATS + +/* #define NOCATS to disable that stuff completely */ +#define nl_catd int +#define catopen(x,y) 1 +#define catclose(x) +#define catgets(c,x,y,s) s + +#else + + + + +#ifdef __cplusplus +extern "C" { +#endif + + /* Data types */ + + typedef int nl_catd; + + /* Symbolic constants */ + +#define MCLoadBySet 0 /* not implemented */ +#define MCLoadAll 0 /* not implemented */ + + + /* Functions */ + +#define catgets(catalog, set,message_number,message) kittengets(set,message_number,message) +#define catopen(name,flag) kittenopen(name) +#define catclose(catalog) kittenclose() + + + char * pascal kittengets( int set_number, int message_number,char *message); + nl_catd kittenopen(char *name); + void kittenclose (void); + + + +#ifdef __cplusplus +} +#endif + +#endif /* NOCATS */ + +#endif /* _CATGETS_H */ diff --git a/exmmtest.exe b/exmmtest.exe index f21d7876..25791ee7 100644 Binary files a/exmmtest.exe and b/exmmtest.exe differ diff --git a/inputest.exe b/inputest.exe index b2f4d6ff..803e7d68 100644 Binary files a/inputest.exe and b/inputest.exe differ diff --git a/makefile b/makefile index 6cca691a..f470820e 100644 --- a/makefile +++ b/makefile @@ -308,4 +308,5 @@ clean: .symbolic @$(COPYCOMMAND) $(SRCLIB)16_head.* $(EXMMTESTDIR)$(SRCLIB) @$(COPYCOMMAND) $(SRCLIB)16_ca.* $(EXMMTESTDIR)$(SRCLIB) @$(COPYCOMMAND) $(SRCLIB)16_hc.* $(EXMMTESTDIR)$(SRCLIB) - @$(COPYCOMMAND) $(SRCLIB)types.h* $(EXMMTESTDIR)$(SRCLIB) + @$(COPYCOMMAND) $(SRCLIB)types.h $(EXMMTESTDIR)$(SRCLIB) + @$(COPYCOMMAND) $(NYANLIB)* $(EXMMTESTDIR)$(NYANLIB) diff --git a/scroll.exe b/scroll.exe index bd999b9e..a1a636ad 100644 Binary files a/scroll.exe and b/scroll.exe differ diff --git a/sountest.exe b/sountest.exe index f45d964c..68c1dc9d 100644 Binary files a/sountest.exe and b/sountest.exe differ diff --git a/src/exmmtest.c b/src/exmmtest.c index e4f56528..c93e902a 100644 --- a/src/exmmtest.c +++ b/src/exmmtest.c @@ -48,7 +48,7 @@ main(int argc, char *argv[]) void __based(sega)* bigbuffer; #endif #ifdef __BORLANDC__ - void memptr* bigbuffer; + memptr bigbuffer; #endif #ifdef FILERL char *bakapee; @@ -72,7 +72,7 @@ main(int argc, char *argv[]) else bakapee = "data/koishi~.pcx"; #endif - textInit(); +// textInit(); /* setup camera and screen~ */ //bug!!! @@ -108,7 +108,9 @@ main(int argc, char *argv[]) baka=0; // close(bakapeehandle); //hmm functions in cache system use the buffered stuff +#ifdef __WATCOMC__ printf("size of big buffer~=%u\n", _bmsize(sega, bigbuffer)); +#endif #endif printf("dark purple = purgable\n"); printf("medium blue = non purgable\n"); @@ -144,7 +146,9 @@ main(int argc, char *argv[]) printf("Total far free: %lu\n", (dword)(GetFarFreeSize())); getch();*/ printf("\n"); +#ifdef __WATCOMC__ heapdump(); +#endif //printf("core left: %lu\n", (dword)_coreleft()); //printf("far core left: %lu\n", (dword)_farcoreleft()); //printf("based core left: %lu\n", (dword)_basedcoreleft()); diff --git a/src/lib/16_ca.c b/src/lib/16_ca.c index f74a5710..5eb2d16b 100644 --- a/src/lib/16_ca.c +++ b/src/lib/16_ca.c @@ -218,22 +218,21 @@ void CAL_GetGrChunkLength (int chunk) boolean CA_FarRead(int handle, byte huge *dest, dword length, mminfo_t *mm) { boolean flag; - /*dword fat=0; - word segm=0; + /*dword fat=0; + word segm=0; //if(mm->EMSVer<0x40) - if(length>0xfffflu) - { - printf("File is a fat bakapee\n"); - segm=(length%0xfffflu)-1; - fat=segm*0xfffflu; + if(length>0xfffflu) + { + printf("File is a fat bakapee\n"); + segm=(length%0xfffflu)-1; + fat=segm*0xfffflu; length-=fat; // printf("CA_FarRead doesn't support 64K reads yet!\n"); - } - - if(!fat&&!segm) + } + + if(!fat&&!segm) {*/ - __asm - { + __asm { push ds mov bx,[handle] mov cx,[WORD PTR length] @@ -246,17 +245,34 @@ boolean CA_FarRead(int handle, byte huge *dest, dword length, mminfo_t *mm) mov errno,ax mov flag,0 jmp End +#ifdef __BORLANDC__ + } +#endif good: +#ifdef __BORLANDC__ + __asm { +#endif cmp ax,[WORD PTR length] je done // errno = EINVFMT; // user manager knows this is bad read mov flag,0 jmp End +#ifdef __BORLANDC__ + } +#endif done: +#ifdef __BORLANDC__ + __asm { +#endif mov flag,1 +#ifdef __BORLANDC__ + } +#endif End: +#ifdef __WATCOMC__ } - return flag; +#endif + return flag; //}else return 0;//todo: EXPAND!!! } @@ -274,22 +290,21 @@ End: boolean CA_FarWrite(int handle, byte huge *source, dword length, mminfo_t *mm) { boolean flag; - /*dword fat=0; - word segm=0; + /*dword fat=0; + word segm=0; //if(mm->EMSVer<0x40) - if(length>0xfffflu) - { - printf("File is a fat bakapee\n"); - segm=(length%0xfffflu)-1; - fat=segm*0xfffflu; + if(length>0xfffflu) + { + printf("File is a fat bakapee\n"); + segm=(length%0xfffflu)-1; + fat=segm*0xfffflu; length-=fat; // printf("CA_FarRead doesn't support 64K reads yet!\n"); } - - if(!fat&&!segm) + + if(!fat&&!segm) {*/ - __asm - { + __asm { push ds mov bx,[handle] mov cx,[WORD PTR length] @@ -302,17 +317,34 @@ boolean CA_FarWrite(int handle, byte huge *source, dword length, mminfo_t *mm) mov errno,ax mov flag,0 jmp End +#ifdef __BORLANDC__ + } +#endif good: +#ifdef __BORLANDC__ + __asm { +#endif cmp ax,[WORD PTR length] je done //errno = ENOMEM; // user manager knows this is bad write mov flag,0 jmp End +#ifdef __BORLANDC__ + } +#endif done: +#ifdef __BORLANDC__ + __asm { +#endif mov flag,1 +#ifdef __BORLANDC__ + } +#endif End: +#ifdef __WATCOMC__ } - return flag; +#endif + return flag; //}else return 0; } @@ -330,7 +362,7 @@ End: boolean CA_ReadFile(char *filename, memptr *ptr, mminfo_t *mm) { int handle; - dword size; + dword size; //long size; if((handle = open(filename,O_RDONLY | O_BINARY, S_IREAD)) == -1) @@ -361,7 +393,7 @@ boolean CA_ReadFile(char *filename, memptr *ptr, mminfo_t *mm) boolean CA_LoadFile(char *filename, memptr *ptr, mminfo_t *mm, mminfotype *mmi) { int handle; - dword size; + dword size; //long size; if((handle = open(filename,O_RDONLY | O_BINARY, S_IREAD)) == -1) diff --git a/src/lib/16_hc.c b/src/lib/16_hc.c index f9f4948c..df9602d8 100644 --- a/src/lib/16_hc.c +++ b/src/lib/16_hc.c @@ -33,23 +33,48 @@ void __near* LargestFreeBlock(size_t* Size) void __near* p; s0 = ~(size_t)0 ^ (~(size_t)0 >> 1); +#ifdef __BORLANDC__ + while (s0 && (p = malloc(s0)) == NULL) +#endif +#ifdef __WATCOMC__ while (s0 && (p = _nmalloc(s0)) == NULL) +#endif s0 >>= 1; if (p) +#ifdef __BORLANDC__ + free(p); +#endif +#ifdef __WATCOMC__ _nfree(p); +#endif s1 = s0 >> 1; while (s1) { +#ifdef __BORLANDC__ + if ((p = malloc(s0 + s1)) != NULL) +#endif +#ifdef __WATCOMC__ if ((p = _nmalloc(s0 + s1)) != NULL) +#endif { s0 += s1; +#ifdef __BORLANDC__ + free(p); +#endif +#ifdef __WATCOMC__ _nfree(p); +#endif } s1 >>= 1; } +#ifdef __BORLANDC__ + while (s0 && (p = malloc(s0)) == NULL) +#endif +#ifdef __WATCOMC__ while (s0 && (p = _nmalloc(s0)) == NULL) +#endif s0 ^= s0 & -s0; *Size = s0; @@ -68,7 +93,12 @@ size_t _coreleft(void) if (largest < sizeof(void __near*)) { if (p != NULL) +#ifdef __BORLANDC__ + free(p); +#endif +#ifdef __WATCOMC__ _nfree(p); +#endif break; } *(void __near* __near*)p = NULL; @@ -84,7 +114,12 @@ size_t _coreleft(void) while (pFirst != NULL) { void __near* p = *(void __near* __near*)pFirst; +#ifdef __BORLANDC__ + free(pFirst); +#endif +#ifdef __WATCOMC__ _nfree(pFirst); +#endif pFirst = p; } return total; @@ -153,6 +188,7 @@ size_t _farcoreleft(void) return total; } +#ifdef __WATCOMC__ void huge* LargestHugeFreeBlock(size_t* Size) { size_t s0, s1; @@ -367,7 +403,7 @@ void heapdump(void) write(heaphandle,scratch,strlen(scratch)); } heapstat(heap_status, &scratch); - + //near strcpy(scratch,"\n == near ==\n\n"); write(heaphandle,scratch,strlen(scratch)); @@ -432,7 +468,7 @@ void heapstat(int heap_status, byte *str) break; case _HEAPEMPTY: strcpy((str),"OK - heap is empty\n"); - + break; case _HEAPBADBEGIN: strcpy((str),"ERROR - heap is damaged\n"); @@ -454,7 +490,7 @@ void heapstat0(int heap_status) break; case _HEAPEMPTY: //printf("OK - heap is empty\n"); - + break; case _HEAPBADBEGIN: printf("ERROR - heap is damaged\n"); @@ -466,7 +502,7 @@ void heapstat0(int heap_status) printf("ERROR - bad node in heap\n"); } } - +#endif /* ============================ = diff --git a/src/lib/16_head.c b/src/lib/16_head.c index df0b31c7..7dd53866 100644 --- a/src/lib/16_head.c +++ b/src/lib/16_head.c @@ -1,27 +1,27 @@ -/* 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 "src/lib/16_head.h" - +/* 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 "src/lib/16_head.h" + /* Function: Wait ********************************************************** * * Parameters: wait - time in microseconds @@ -36,9 +36,9 @@ void wait(clock_t wait){ goal = wait + clock(); while((goal > clock()) && !kbhit()) ; -} /* End of wait */ - -long int +} /* End of wait */ + +long int filesize(FILE *fp) { long int save_pos, size_of_file; @@ -48,63 +48,15 @@ filesize(FILE *fp) size_of_file = ftell(fp); fseek(fp, save_pos, SEEK_SET); return(size_of_file); -} - -void printmeminfoline(byte *strc, const byte *pee, size_t h_total, size_t h_used, size_t h_free) -{ - byte str[64]; - strcat(strc,pee); strcat(strc," "); ultoa((dword)h_total,str,10); strcat(strc,str); strcat(strc," "); ultoa((dword)h_used,str,10); strcat(strc,str); strcat(strc," "); ultoa((dword)h_free,str,10); strcat(strc,str); - strcat(strc,"\n"); -} - -void print_normal_entry(char *text, dword total, dword used, dword free, byte *str) -{ - printf("%-17s", text); - convert("%8sB ", total); - convert("%9sB ", used); - convert("%9sB\n", free); -} - -/* - * As for printf(), but format may only contain a single format specifier, - * which must be "%s" and is replaced with the string form of num with commas - * separating groups of three digits. - * - * e.g. convert("%s bytes", 1234567) -> "1,234,567 bytes" - */ -void convert(const char *format, dword num) -{ - int c, i, j, n; - char des[4*sizeof(dword)+3]; - union REGS regs; - struct SREGS sregs; - char mycountry[48]; /* probably 34 bytes are enough... */ - char ksep = ','; /* or . */ - - regs.x.ax = 0x3800; - sregs.ds = FP_SEG(&mycountry); - regs.x.dx = FP_OFF(&mycountry); - intdosx(®s,®s,&sregs); - if (regs.x.cflag == 0) { - ksep = mycountry[7]; /* 1000's separator */ - /* dsep = mycountry[9]; ** decimal separator */ - } - - n = sprintf(des, "%lu", num); - /* insert commas in the string */ - c = 3; - for (i = n - 3; i > 0; i--) { - if (c%3==0) { - for (j = n; j >= i; j--) - des[j+1] = des[j]; - des[i]=ksep; /* ',' */ - n++; - } - c++; - } - printf(format, des); -} - +} + +void printmeminfoline(byte *strc, const byte *pee, size_t h_total, size_t h_used, size_t h_free) +{ + byte str[64]; + strcat(strc,pee); strcat(strc," "); ultoa((dword)h_total,str,10); strcat(strc,str); strcat(strc," "); ultoa((dword)h_used,str,10); strcat(strc,str); strcat(strc," "); ultoa((dword)h_free,str,10); strcat(strc,str); + strcat(strc,"\n"); +} + /////////////////////////////////////////////////////////////////////////// // // US_CheckParm() - checks to see if a string matches one of a set of @@ -138,8 +90,8 @@ US_CheckParm(char *parm,char **strings) } } return(-1); -} - +} + /* ========================== = @@ -201,4 +153,4 @@ US_CheckParm(char *parm,char **strings) #endif exit(exit_code); -}*/ +}*/ diff --git a/src/lib/16_head.h b/src/lib/16_head.h index f74e8823..e6e590b4 100644 --- a/src/lib/16_head.h +++ b/src/lib/16_head.h @@ -32,27 +32,29 @@ #define _LIBHEAD_H_ #include #include +#include #include // just for wait #include // just for wait -#include #include #include #include +#include #include #include +#include #ifdef __WATCOMC__ #include #include #include -#include "src/lib/nyan/kitten.h" #endif +#include "src/lib/nyan/kitten.h" #include "src/lib/types.h" //0000 test type def wwww -struct list { +/*struct list { struct list __based(__self) *next; int value; -}; +};*/ /* Control codes for all keys on the keyboard */ //here temperarly @@ -186,8 +188,6 @@ void wait(clock_t wait); long int filesize(FILE *fp); void printmeminfoline(byte *strc, const byte *pee, size_t h_total, size_t h_used, size_t h_free); -void print_normal_entry(char *text, dword total, dword used, dword free, byte *str); -void convert(const char *format, dword num); int US_CheckParm(char *parm,char **strings); extern void CA_OpenDebug (void); diff --git a/src/lib/16_mm.c b/src/lib/16_mm.c index ba0b8bfe..90439b1d 100644 --- a/src/lib/16_mm.c +++ b/src/lib/16_mm.c @@ -120,13 +120,24 @@ boolean MML_CheckForEMS(void) // mov emmcfems,1 jmp End +#ifdef __BORLANDC__ + } +#endif error: +#ifdef __BORLANDC__ + __asm { +#endif // // EMS is bad // mov emmcfems,0 +#ifdef __BORLANDC__ + } +#endif End: +#ifdef __WATCOMC__ } +#endif return(emmcfems); } @@ -150,8 +161,7 @@ byte MML_SetupEMS(mminfo_t *mm) unsigned totalEMSpages,freeEMSpages,EMSpageframe,EMSpagesmapped,EMShandle; totalEMSpages = freeEMSpages = EMSpageframe = EMSpagesmapped = 0; - __asm - { + __asm { mov ah,EMS_STATUS int EMS_INT // make sure EMS hardware is present or ah,ah @@ -187,13 +197,23 @@ byte MML_SetupEMS(mminfo_t *mm) jle getpages mov bx,[freeEMSpages] jmp getpages - -low: +#ifdef __BORLANDC__ + } +#endif + low: +#ifdef __BORLANDC__ + __asm { +#endif cmp bx,4 jle getpages // there is only 1,2,3,or 4 pages mov bx,4 // we can't use more than 4 pages - -getpages: +#ifdef __BORLANDC__ + } +#endif + getpages: +#ifdef __BORLANDC__ + __asm { +#endif mov [EMSpagesmapped],bx mov ah,EMS_ALLOCPAGES // allocate up to 64k of EMS int EMS_INT @@ -201,19 +221,30 @@ getpages: jnz error mov [EMShandle],dx jmp End -error: +#ifdef __BORLANDC__ + } +#endif + error: +#ifdef __BORLANDC__ + __asm { +#endif mov err,ah mov errorflag,1 jmp End +#ifdef __BORLANDC__ + } +#endif noEMS: End: +#ifdef __WATCOMC__ } +#endif if(errorflag==true) { //err = CPURegs.h.ah; strcpy(str,"MM_SetupEMS: EMS error "); //itoa(err,str2,16); - MM_EMSerr(&str, err); + MM_EMSerr(str, err); printf("%s\n",str); return err; } @@ -242,16 +273,20 @@ void MML_ShutdownEMS(mminfo_t *mm) if(!EMShandle) return; - __asm - { + __asm { mov ah,EMS_FREEPAGES mov dx,[EMShandle] int EMS_INT or ah,ah jz ok mov errorflag,1 +#ifdef __BORLANDC__ + } +#endif ok: +#ifdef __WATCOMC__ } +#endif if(errorflag==true) printf("MML_ShutdownEMS: Error freeing EMS!\n"); //++++ add something } @@ -278,8 +313,7 @@ byte MM_MapEMS(mminfo_t *mm, mminfotype *mmi) for (i=0;i<4/*MAPPAGES*/;i++) { - __asm - { + __asm { mov ah,EMS_MAPPAGE mov bx,[i] // logical page mov al,bl // physical page @@ -288,11 +322,22 @@ byte MM_MapEMS(mminfo_t *mm, mminfotype *mmi) or ah,ah jnz error jmp End +#ifdef __BORLANDC__ + } +#endif error: +#ifdef __BORLANDC__ + __asm { +#endif mov err,ah mov errorflag,1 +#ifdef __BORLANDC__ + } +#endif End: +#ifdef __WATCOMC__ } +#endif if(errorflag==true) { //err = CPURegs.h.ah; @@ -344,8 +389,7 @@ byte MM_MapXEMS(mminfo_t *mm, mminfotype *mmi) for (i=0;inumUMBs = 0; - __asm - { + __asm { mov ax,0x4300 int 0x2f // query status of installed diver cmp al,0x80 je good mov errorflag,1 +#ifdef __BORLANDC__ + } +#endif good: +#ifdef __WATCOMC__ } +#endif if(errorflag==true) return false; else return true; } @@ -422,8 +481,7 @@ void MML_SetupXMS(mminfo_t *mm, mminfotype *mmi) unsigned base,size; getmemory: - __asm - { + __asm { mov ax,0x4310 int 0x2f mov [WORD PTR XMSaddr],bx @@ -443,12 +501,22 @@ getmemory: call [DWORD PTR XMSaddr] // DX holds largest available UMB or ax,ax jz done // another error... - -gotone: +#ifdef __BORLANDC__ + } +#endif + gotone: +#ifdef __BORLANDC__ + __asm { +#endif mov [base],bx mov [size],dx -done: +#ifdef __BORLANDC__ } +#endif + done: +#ifdef __WATCOMC__ + } +#endif printf("base=%u ", base); printf("size=%u\n", size); MML_UseSpace(base,size, mm); mmi->XMSmem += size*16; @@ -475,8 +543,7 @@ void MML_ShutdownXMS(mminfo_t *mm) for (i=0;inumUMBs;i++) { base = mm->UMBbase[i]; - __asm - { + __asm { mov ah,XMS_FREEUMB mov dx,[base] call [DWORD PTR XMSaddr] @@ -672,27 +739,36 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi) // // get all available near conventional memory segments // -//---- length=coreleft(); - printf(" nearheap making!\n"); +// printf(" nearheap making!\n"); +#ifdef __WATCOMC__ _nheapgrow(); length=(dword)_memmax();//(dword)GetFreeSize(); start = (void huge *)(mm->nearheap = _nmalloc(length)); +#endif +#ifdef __BORLANDC__ + length=coreleft(); + start = (void huge *)(mm->nearheap = malloc(length)); +#endif length -= 16-(FP_OFF(start)&15); length -= SAVENEARHEAP; seglength = length / 16; // now in paragraphs segstart = FP_SEG(start)+(FP_OFF(start)+15)/16; MML_UseSpace(segstart,seglength, mm); mmi->nearheap = length; - printf("start=%FP segstart=%X seglen=%lu len=%lu\n", start, segstart, seglength, length); + printf("start=%Fp segstart=%x seglen=%l len=%l\n", start, segstart, seglength, length); //heapdump(); // // get all available far conventional memory segments // -//---- length=farcoreleft(); - printf(" farheap making!\n"); +// printf(" farheap making!\n"); +#ifdef __WATCOMC__ _fheapgrow(); length=(dword)GetFarFreeSize();//0xffffUL*4UL; +#endif +#ifdef __BORLANDC__ + length=farcoreleft(); +#endif //start = mm->farheap = halloc(length, 1); start = mm->farheap = _fmalloc(length); length -= 16-(FP_OFF(start)&15); @@ -701,7 +777,7 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi) segstart = FP_SEG(start)+(FP_OFF(start)+15)/16; MML_UseSpace(segstart,seglength, mm); mmi->farheap = length; - printf("start=%FP segstart=%X seglen=%lu len=%lu\n", start, segstart, seglength, length); + printf("start=%Fp segstart=%x seglen=%l len=%l\n", start, segstart, seglength, length); //heapdump(); mmi->mainmem = mmi->nearheap + mmi->farheap; @@ -716,9 +792,23 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi) //printf(" EMS1\n"); //printf("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"); //bug! mmi->EMSmem = 0; - for(i = 1;i < __argc;i++) + for(i = 1;i < +#ifdef __WATCOMC__ + __argc +#endif +#ifdef __BORLANDC__ + _argc +#endif + ;i++) { - if(US_CheckParm(__argv[i],ParmStringsexmm) == 0) + if(US_CheckParm( +#ifdef __WATCOMC__ + __argv[i] +#endif +#ifdef __BORLANDC__ + _argv[i] +#endif + ,ParmStringsexmm) == 0) goto emsskip; // param NOEMS } //printf("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"); //bug! @@ -747,9 +837,23 @@ goto xmsskip; // emsskip: mmi->XMSmem = 0; - for(i = 1;i < __argc;i++) + for(i = 1;i < +#ifdef __WATCOMC__ + __argc +#endif +#ifdef __BORLANDC__ + _argc +#endif + ;i++) { - if(US_CheckParm(__argv[i],ParmStringsexmm) == 0) + if(US_CheckParm( +#ifdef __WATCOMC__ + __argv[i] +#endif +#ifdef __BORLANDC__ + _argv[i] +#endif + ,ParmStringsexmm) == 0) goto xmsskip; // param NOXMS } //printf("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"); //bug! @@ -787,7 +891,12 @@ void MM_Shutdown(mminfo_t *mm) return; _ffree(mm->farheap); printf(" far freed\n"); +#ifdef __WATCOMC__ _nfree(mm->nearheap); printf(" near freed\n"); +#endif +#ifdef __BORLANDC__ + free(mm->nearheap); printf(" near freed\n"); +#endif if(MML_CheckForEMS()){ MML_ShutdownEMS(mm); printf(" EMS freed\n"); } if(MML_CheckForXMS(mm)){ MML_ShutdownXMS(mm); printf(" XMS freed\n"); } } @@ -898,7 +1007,9 @@ printf("\n"); if (mm->bombonerror) { +#ifdef __WATCOMC__ heapdump(); +#endif printf(OUT_OF_MEM_MSG,(size-mmi->nearheap)); printf("for stability reasons the program will shut down! wwww\n"); printf(" endid=%u\n",(mm->endid)); @@ -1151,9 +1262,10 @@ void MM_SortMem(mminfo_t *mm) void MM_ShowMemory(/*page_t *page, */mminfo_t *mm) { mmblocktype huge *scan; - word color,temp; +//++++ word color; + word temp; long end,owner; - word chx,chy; +//++++ word chx,chy; byte scratch[160],str[16]; //**** VW_SetDefaultColors(); @@ -1168,17 +1280,17 @@ void MM_ShowMemory(/*page_t *page, */mminfo_t *mm) CA_OpenDebug (); - chx=0; - chy=0; +//++++ chx=0; +//++++ chy=0; while(scan) { - if(scan->attributes & PURGEBITS) +/*++++ if(scan->attributes & PURGEBITS) color = 5; // dark purple = purgable else color = 9; // medium blue = non purgable if(scan->attributes & LOCKBIT) - color = 12; // red = locked + color = 12; // red = locked*/ if(scan->start<=end) { //printf("); @@ -1187,8 +1299,8 @@ CA_OpenDebug (); return; } end = scan->start+scan->length-1; - chy = scan->start/320; - chx = scan->start%320; +//++++ chy = scan->start/320; +//++++ chx = scan->start%320; //modexhlin(page, scan->start, (unsigned)end, chy, color); //for(chx=scan->start;chx+4>=(word)end;chx+=4) //{ diff --git a/src/lib/nyan/kitten.c b/src/lib/nyan/kitten.c index 49cb7474..4e501dec 100644 --- a/src/lib/nyan/kitten.c +++ b/src/lib/nyan/kitten.c @@ -22,6 +22,8 @@ #include /* sprintf */ #include /* getenv */ #include /* strchr */ +#include +#include #include #include "src/lib/nyan/kitten.h" diff --git a/src/lib/nyan/kitten.h b/src/lib/nyan/kitten.h index 62c5bc7b..2cec22fe 100644 --- a/src/lib/nyan/kitten.h +++ b/src/lib/nyan/kitten.h @@ -23,15 +23,13 @@ #ifndef _CATGETS_H #define _CATGETS_H - -#include #ifdef NOCATS /* #define NOCATS to disable that stuff completely */ #define nl_catd int #define catopen(x,y) 1 -#define catclose(x) +#define catclose(x) #define catgets(c,x,y,s) s #else