Skip to main content
GameDev.net gamedev.net
🔒 Locked

"ALIGN 16" problem (fast bitmap scaling)

Started by docyoung83 Nov 21, 2004 at 4:51 PM 0 replies 250+ views
Original Post
docyoung83
docyoung83
I downloaded some C++ source code off of the internet for a fast bitmap scaling routine, and it uses assembly instructions for the scaling. I know NOTHING about assembly, but there seems to be a problem with the command ALIGN 16. The entire program will compile just fine except for those lines. SNIP:

_asm{	
        mov eax, YContrib;      
	mov eax, [eax];
	sub eax, 12;
	mov ContribPtrY, eax;      
	mov YCounter, 0;           
	
	ALIGN 16;   <=== HERE
	VerticalLoop:              
			
	mov ebx, XContrib;
	mov ebx, [ebx];
	sub ebx, 12;
        mov ContribPtrX, ebx;  
	add ContribPtrY, 12;
	mov edi, ContribPtrY;
	mov ecx, [edi];
	mov esi, [edi + 4];
				
			
	sub esi, ecx;
	inc esi;
	mov YDelta, esi;

	mov eax, SourceWidth;
	imul eax, ecx;
	add eax, pSrc;
	sub eax, 4;
	mov esi, eax;		 
				
	mov edi, [edi + 8];
	mov YWeightPtr, edi;   
		
	mov eax, uSrcWidth;
	mov ecx, [RGBArray];
	mov ColumnCounter, eax;
	mov RGBArrPtr, ecx;
				
	ALIGN 16;	<=== AND HERE			

        // and on and on and on...

I think you get the idea. Anyway, I've tried searching for "ALIGN 16" and "ALIGN 16 C++" and whatnot, but no help. Is there some include file I need, or is there an equivalent statement that I can use instead? I'm using Borland C++Builder for my program. Thanks. By the way, in case this doesn't work out, any suggestions for some fast bitmap scaling routines (link to source) would be appreciated.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.