Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

mixer_tasm.cpp

Go to the documentation of this file.
00001 
00002 #ifdef USE_TASM
00003 void mixer_clip_asm(int *mix_buffer2,short *mix_buffer,int size)
00004 {
00005 asm {
00006 
00007 
00008 mixer_clip_asm:
00009         push            esi             
00010         push            edi
00011         push            eax
00012         push            ebx
00013         push            ecx
00014         push            edx
00015 
00016         mov             esi, [esp+24+4]
00017         mov             edi, [esp+24+8]
00018         mov             ecx, [esp+24+12]
00019 
00020         mov             ebx, 32200
00021         mov             edx, -32200
00022 
00023 .loop:
00024         mov             eax, [esi]
00025         sar             eax, 1
00026         add             esi, byte 4
00027 
00028         cmp             eax, ebx
00029         jg              .above          
00030         cmp             eax, edx
00031         jl              .below
00032         jmp             .clipped
00033 
00034 .above: 
00035         mov             eax, ebx
00036         jmp             .clipped
00037 
00038 .below: 
00039         mov             eax, edx
00040 
00041 .clipped:
00042 
00043         mov             [edi], ax
00044         add             edi, byte 2
00045         dec             ecx
00046         jz              .done
00047         jmp             .loop
00048 
00049 .done:
00050         pop             edx
00051         pop             ecx
00052         pop             ebx
00053         pop             eax
00054         pop             edi
00055         pop             esi
00056 
00057         ret
00058 };
00059 
00060 }
00061 #endif
00062 
00063            /*
00064 ;; mixer_asm(int *src, short *dest, int size)
00065 ;; --------------------------------------
00066 ;;  4: int *src
00067 ;;  8: short *dest
00068 ;; 12: int size
00069 ;; --------------------------------------
00070 
00071 
00072 */

Generated at Wed Apr 4 19:54:01 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001