From: sparky4 Date: Sun, 4 Sep 2016 02:20:05 +0000 (-0500) Subject: bcexmm compiles again ^^ X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=2492ca08bf13697e400753c5d577a3a08d500f86;p=16.git bcexmm compiles again ^^ --- diff --git a/DEBUG.16B b/DEBUG.16B index ee36ee43..b74e8306 100755 --- a/DEBUG.16B +++ b/DEBUG.16B @@ -1,12 +1,12 @@ -Seg:0 Size:3871 Owner:0x0 -+++++++++++++++++++++++++++++++++++++++++++++++++_ +Seg:0 Size:2882 Owner:0x6e69 ++++++++++++++++++++++++++++++++++++++_ 0 -Seg:f1f Size:256 Owner:0xe8 +Seg:b42 Size:256 Owner:0xcf80 ++++_  -Seg:101f Size:273 Owner:0xfe0 +Seg:c42 Size:273 Owner:0xfe0 ++++_ -000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Seg:9fde Size:28706 Owner:0x0 _  diff --git a/MEMINFO.16B b/MEMINFO.16B new file mode 100755 index 00000000..e69de29b diff --git a/MMDUMP.16B b/MMDUMP.16B index 72cc22e0..44ec557b 100755 Binary files a/MMDUMP.16B and b/MMDUMP.16B differ diff --git a/bcexmm.exe b/bcexmm.exe index a9d85568..136f4d75 100755 Binary files a/bcexmm.exe and b/bcexmm.exe differ diff --git a/bcexmm.prj b/bcexmm.prj index 90eb12de..792a4f39 100755 Binary files a/bcexmm.prj and b/bcexmm.prj differ diff --git a/src/lib/16_ca.c b/src/lib/16_ca.c index 35644b35..e2b6cef9 100755 --- a/src/lib/16_ca.c +++ b/src/lib/16_ca.c @@ -532,9 +532,8 @@ void CAL_HuffExpand (byte huge *source, byte huge *dest, // expand less than 64k of data //-------------------------- - __asm - { -;;;;; mov bx,[headptr] + __asm { +//// mov bx,[headptr] mov si,[sourceoff] mov di,[destoff] @@ -545,35 +544,60 @@ void CAL_HuffExpand (byte huge *source, byte huge *dest, mov ch,[si] // load first byte inc si mov cl,1 - +#ifdef __BORLANDC__ + } +#endif expandshort: +#ifdef __BORLANDC__ + __asm { +#endif test ch,cl // bit set? jnz bit1short mov dx,[ss:bx] // take bit0 path from node shl cl,1 // advance to next bit position jc newbyteshort jnc sourceupshort - +#ifdef __BORLANDC__ + } +#endif bit1short: +#ifdef __BORLANDC__ + __asm { +#endif mov dx,[ss:bx+2] // take bit1 path shl cl,1 // advance to next bit position jnc sourceupshort - +#ifdef __BORLANDC__ + } +#endif newbyteshort: +#ifdef __BORLANDC__ + __asm { +#endif mov ch,[si] // load next byte inc si mov cl,1 // back to first bit - +#ifdef __BORLANDC__ + } +#endif sourceupshort: +#ifdef __BORLANDC__ + __asm { +#endif or dh,dh // if dx<256 its a byte, else move node jz storebyteshort mov bx,dx // next node = (huffnode *)code jmp expandshort - +#ifdef __BORLANDC__ + } +#endif storebyteshort: +#ifdef __BORLANDC__ + __asm { +#endif mov [es:di],dl inc di // write a decopmpressed byte out -;;;; mov bx,[headptr] // back to the head node for next bit +//// mov bx,[headptr] // back to the head node for next bit cmp di,ax // done? jne expandshort @@ -588,9 +612,8 @@ storebyteshort: length--; - __asm - { -;;;; mov bx,[headptr] + __asm { +//// mov bx,[headptr] mov cl,1 mov si,[sourceoff] @@ -599,16 +622,32 @@ storebyteshort: mov ds,[sourceseg] lodsb // load first byte - +#ifdef __BORLANDC__ + } +#endif expand: +#ifdef __BORLANDC__ + __asm { +#endif test al,cl // bit set? jnz bit1 mov dx,[ss:bx] // take bit0 path from node jmp gotcode +#ifdef __BORLANDC__ + } +#endif bit1: +#ifdef __BORLANDC__ + __asm { +#endif mov dx,[ss:bx+2] // take bit1 path - +#ifdef __BORLANDC__ + } +#endif gotcode: +#ifdef __BORLANDC__ + __asm { +#endif shl cl,1 // advance to next bit position jnc sourceup lodsb @@ -618,19 +657,35 @@ gotcode: inc cx mov ds,cx xor si,si +#ifdef __BORLANDC__ + } +#endif sinorm: +#ifdef __BORLANDC__ + __asm { +#endif mov cl,1 // back to first bit - +#ifdef __BORLANDC__ + } +#endif sourceup: +#ifdef __BORLANDC__ + __asm { +#endif or dh,dh // if dx<256 its a byte, else move node jz storebyte mov bx,dx // next node = (huffnode *)code jmp expand - +#ifdef __BORLANDC__ + } +#endif storebyte: +#ifdef __BORLANDC__ + __asm { +#endif mov [es:di],dl inc di // write a decopmpressed byte out -;;;; mov bx,[headptr] // back to the head node for next bit +//// mov bx,[headptr] // back to the head node for next bit cmp di,0x10 // normalize es:di jb dinorm @@ -638,8 +693,13 @@ storebyte: inc dx mov es,dx xor di,di +#ifdef __BORLANDC__ + } +#endif dinorm: - +#ifdef __BORLANDC__ + __asm { +#endif sub [WORD PTR ss:length],1 jnc expand dec [WORD PTR ss:length+2] @@ -647,8 +707,7 @@ dinorm: } } - __asm - { + __asm { mov ax,ss mov ds,ax } diff --git a/src/lib/16_head.h b/src/lib/16_head.h index 71e861ce..74822da2 100755 --- a/src/lib/16_head.h +++ b/src/lib/16_head.h @@ -155,6 +155,7 @@ extern int profilehandle,debughandle; //make it into game global #define nil ((void *)0) #ifdef __BORLANDC__ #define _FCORELEFT 0x90000UL-16UL +#define sprite #endif #ifdef __WATCOMC__ #define _FCORELEFT 0x90000UL+16UL