Hi! 28-Июл-2006 00:05 [EMAIL PROTECTED] (Michael Devore) wrote to freedos-devel@lists.sourceforge.net:
MD> Uploaded to ftp://ftp.devoresoftware.com/downloads/emm386/ are the files MD> emmx220.zip, EMM386 version 2.20 memory manager, mostly executable files; MD> and emms220.zip, source code files. [...] MD> Oh yes, I changed two comments in EMM386C.C from /* to #if 0. Not because MD> I think it really needed to be done, or because I think it's of much MD> use. No, I did it because I am broken and feeble old man who ran out of MD> jokes for why not to do it long before its cheerleader(s) ran out of pixels. :) ______________O\_/_________________________________\_/O______________ diff -rup old/emm386c.c new/emm386c.c --- old/emm386c.c 2006-07-27 21:34:30.000000000 +0000 +++ new/emm386c.c 2006-07-28 12:04:58.000000000 +0000 @@ -883,7 +883,7 @@ foundend: #if 0 /* EMM386 no longer disallows 0xa000 upper memory block returns */ - / * this could cause weird bugs + /* this could cause weird bugs if upper memory a000 would ever be merged with 9fff:0 */ if (UMBsegments[index].segment == 0xa000) _____________________________________________________________________ O/~\ /~\O MD> Since low-level changes were made to this version of EMM386, please keep an MD> eye out for any problems and report them as soon as you can. While I don't After quick surfing in source, I found: 1. Bug: wrong handling for clc/stc in some places (they ignored, because popf follows, thus caller receives "always success"): ______________O\_/_________________________________\_/O______________ @@loc2: [...] clc ; flag success @@locret: [...] popf ret [...] @@locfail: stc jmp @@locret ExpandCurrentPoolBlock ENDP _____________________________________________________________________ O/~\ /~\O ______________O\_/_________________________________\_/O______________ @@allocsuccess: [...] clc @@allocret: [...] popf ret @@allocfail: stc jmp @@allocret AllocateXMSForPool ENDP _____________________________________________________________________ O/~\ /~\O 2. Probably, bug: CF not initialized, although comments say so ("probably" because I not found in RBIL spec for INT 67/87): ______________O\_/_________________________________\_/O______________ ; hack: handle undocumented ; int67/87 function = simulated int15/87 [...] CALL SIMULATE_INT1587 [...] ; simulate INT15/87 ;INT 15 - SYSTEM - COPY EXTENDED MEMORY (by RBIL) ;Return: CF set on error ; CF clear if successful SIMULATE_INT1587 proc near [...] @@ok: mov AH,0 ; everything OK and finished RET @@abort: mov AH,1 ; everything OK and finished RET @@invalid_command: mov ah,80h ret _____________________________________________________________________ O/~\ /~\O 3. Bug: missing popf after @@NO_386: ______________O\_/_________________________________\_/O______________ _IS386 PROC NEAR PUSHF ; save Flags [...] POPF mov ax,1 ; OK RET @@NO_386: xor ax,ax ret _____________________________________________________________________ O/~\ /~\O 4. Misfeature: UMBfree does not merges free blocks. 5. Probably, bug: CF always =0 after XOR, thus, first CheckBlockIntegrity in next code never called ("probably" because I not very understand idea of given code - thus, first call to CheckBlockIntegrity may be only superfluous code, which may be safely removed): ______________O\_/_________________________________\_/O______________ @@nybshared: [...] > xor al,ah ; turn off bit we turned on jne @@finddone ; not the first bit allocated in 16K region (nybble) > dec [esi].psi_16kfree > jnc @@finddone call CheckBlockIntegrity jmp @@finddone [...] @@freeshared: [...] > add edx,eax ; edx == 16k page memory address > dec [esi].psi_16kfree > jnc @@valid1 call CheckBlockIntegrity ; force valid value @@valid1: _____________________________________________________________________ O/~\ /~\O 6. Superfluous code (not need to check, if block at [edi] precedes block at [esi], because they will be found at next iterations): ______________O\_/_________________________________\_/O______________ ; check if start of first block matches end of test block mov eax,[edi].xas_addressK add eax,[edi].xas_sizeK ; eax -> end address of block (highest+1) cmp eax,[esi].xas_addressK jne @@checknext xchg esi,edi ; switch block pointer references for merging jmp @@merge _____________________________________________________________________ O/~\ /~\O Also, in next private email I send diff file with some code optimizations. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel