Message-Id: Comments: Authenticated sender is From: "Salvador Eduardo Tropea (SET)" Organization: INTI To: broadview AT earthlink DOT net, djgpp AT delorie DOT com Date: Fri, 14 Nov 1997 16:24:25 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: does anyone have anyideas on how to optimize this code Precedence: bulk "STEVEN S. FALLS" wrote: > Hi, my name is Ardy and I have a pixelplotting ruteen that needs to be > optmized. This is what I got, please help! > thanks, > -Ardy > > This was writen in NASM: > > BITS 32 > GLOBAL _SetPix__Fiic > GLOBAL _SetPixRam__Fiic > GLOBAL _GetPix__Fii > GLOBAL _GetPixRam__Fii > GLOBAL _ClearPg__Fv > GLOBAL _ClearPgRam__Fv > GLOBAL _CopyPg__Fv > GLOBAL _Line__Fiiiic > EXTERN __go32_info_block > EXTERN _YTbl > EXTERN _RamPg > > SECTION .text > _SetPix__Fiic: > push ebp > mov edx,[_YTbl] > mov ebx,[esp+12] > mov ebx,[edx+ebx*4] > add ebx,[esp+8] > mov al,[esp+16] > mov fs,[__go32_info_block+26] > add ebx,0A0000h > mov [fs:ebx],al > pop ebp > ret > _SetPixRam__Fiic: Why are you using Assembler for it? I think you'll get this code or better using C (try O3 and omit-frame-pointer for the routine). Even more, for loops you can use an inline version, it will be much more faster. SET ------------------------------------ 0 -------------------------------- Visit my home page: http://www.geocities.com/SiliconValley/Vista/6552/ Salvador Eduardo Tropea (SET). (Electronics Engineer) Alternative e-mail: set-sot AT usa DOT net - ICQ: 2951574 Address: Curapaligue 2124, Caseros, 3 de Febrero Buenos Aires, (1678), ARGENTINA TE: +(541) 759 0013