Code processing (only) upon input change

DSP related issues, mathematics, processing and techniques
Post Reply
Rocko
Posts: 186
Joined: Tue May 15, 2012 12:42 pm

Code processing (only) upon input change

Post by Rocko »

Hi,

I'm working with 'blue code' calculation, in which the input is (say): A,B,C and output is X,Y,Z.

I would like the code to process ONLY if A,B or C have changed and for a single code flow.
I remember (from the synthmaker) forum using such a technique, by converting from 'blue code' to assembley and adding a unique code.

But -I couldn't find examples in the new forum.
Can anyone please re-explain this method ?

Appreciated
KG_is_back
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Code processing (only) upon input change

Post by KG_is_back »

you basically need to use conditional jump

Code: Select all


//code that checks whether inputs changed
//result is in "temp" variable

mov eax,temp[0];
cmp eax,0; //compare with zero
jz theEnd; //jump if equal

//code that you want to skip

theEnd:

//additional code you don't want to skip


It should be easy to check where the "checking code" ends. It should end with "movaps temp,xmm?;" (where ? is 0-7)
To be sure, just check where the code ends when only the "checking code" is present in the code module.
Post Reply