Hi! 21-Дек-2006 13:14 [EMAIL PROTECTED] (Japheth) wrote to freedos-devel@lists.sourceforge.net:
J> This thread has been opened for Jemm386 issues and discussion. Ok, I may discuss at public, if you wish. 1. On your site, program versions nowhere mentioned, only in "news" sometime. 2. I see "Jemm386 ... based on the source of FreeDOS Emm386", but I not see in JEMM normal build subsystem (which was at last included by Michael into latest releases), which allows to compile sources by different compilers with minimal efforts (to customize batch and makefiles). 3. jemm doesn't includes some patches for emm386, which makes it more compatible with different compilers. For example: - asm mov ah,function + asm mov ah,byte ptr [function] 4. I compare latest version with previous to see the differences, and found: + CMP AX,OFFSET RESGRP:BP06_FATAL + JZ V86_EXC06_FATAL [...] + cmp edx, eax ; source < destination? + jnc @@calc_src_done ; no, use std copy This somewhat question of taste, but "je" and "jae" after "cmp" is much better reflects _sense_ (logic) of code and, thus, should make it more readable. 5. Is it valid code, to mix 16- and 32-bit registers? + MOV DS,EAX ; segment register caches + MOV ES,EAX + MOV FS,EAX + MOV GS,EAX 6. Is there reason to copy return address? RPRINTSTR PROC push bp mov bp,sp XCHG BX,[bp+2] [...] mov ah,0Eh int 10h [...] XCHG BX,[bp+2] pop bp RET 7. There is code, which may be optimized. For example, *wordout+*byteout+*nibout. Or: @@ok: mov AH,0 ; everything OK and finished + clc [...] inc al ;4 extra bytes for size + checksum? shl al,2 ;4 bytes (makes Kyrandia 3 work [better]!?) [...] + shl edi,4 add edi,esi ; edi -> EMS region buffer address [...] shl ebx,4 ; convert seg to memory offset + add ebx,ecx [...] + cmp eax,edx ; ensure no overflow from improper current value ja @@noadj2 + mov eax,edx @@noadj2: + sub eax,edx ; max - used == max available [...] +void fmemset(char far *s1, char c, int count) { + char far * s = s1; for ( ; count; count--) *s++ = c; } [...] void fmemcpy(char far *s1,char far *s2,int len) { + char far * dst = s1; + char far * src = s2; + for ( ; len; len--) + *dst++ = *src++; } 8. Same (about conditional jumps after cmp and about optimization) with DEBUG, which you change. I compare 99i with 99g and found: +ii: + mov bl,0 > >+ mov ah,al > >+ and ah,TOUPPER + cmp ah,'W' > >+ jne ii_1 > >+ inc bx > >+ call skipwhite > >+ jmp ii_2 +ii_1: + cmp [machine],byte 3 + jb ii_2 + cmp ah,'D' + jne ii_2 + inc bx + inc bx + call skipwhite +ii_2: + call getword ;get word into DX [...] > >+ cmp bl,1 > >+ jz ii_3 > >+ cmp bl,2 > >+ jz ii_4 in al,dx call hexbyte + jmp ii_5 +ii_3: + in ax,dx > >+ call hexword + jmp ii_5 +ii_4: + in eax,dx + push ax + shr eax,16 + call hexword + pop ax + call hexword +ii_5: [...] + cmp byte [fileext],0 > >+ jnz ll4 [...] +oo: + mov bl,0 + mov ah,al + and ah,TOUPPER + cmp ah,'W' PS: I jemm may completely replace ms-emm386 and, for example, compatible with W9x? ------------------------------------------------------------------------- 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