home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
PROG_GEN
/
PMODE24.ZIP
/
EXAMPLES.ZIP
/
EX_CA.IN
next >
Wrap
Text File
|
1994-02-06
|
1KB
|
40 lines
Here are some examples to compile. Notice that CA will ignore this text just
as it would ignore ASM code. It only cares for the lines which start with '#'.
When you examine the output code, keep in mind the precedence of the operators
used.
# ebx>>=edx*2+ecx;
# ecx=edi|esi&edx^ecx-ebx|ebp^eax;
# edx=eax-ebx*5&[ecx+edx*2+:equate0]|[esi+edi];
The same first 3 examples, except now all registers but the ones explicitly
modified will be preserved.
#7fh ebx>>=edx*2+ecx;
# ecx=edi|esi&edx^ecx-ebx|ebp^eax;
# edx=eax-ebx*5&[ecx+edx*2+:equate0]|[esi+edi];
Back to preserving no regs.
#0 ebx=-[ecx+~(eax*2)];
# edx=10h+16+10000b;
# mem0=eax<<<[esi+[edi]];
# ecx=edx/eax;
# esi*=12345678h+&mem0+ecx+:equate0+8*ebx;
# mem0=+(mem1/mem2);
# mem0=mem1=eax=mem2=mem3;
# edi=(ecx*mem0)+(ebx>>2)+mem1;
# edi=[ebp]/([edi]/([esi]/([edx]/([ecx]:/([ebx]%[eax])))));
# eax=[(ebx=[(ecx=[(edx=[(esi=[(edi=[(ebp=[eax])+ebx])+ecx])+edx])+esi])+edi])+ebp];
# mem0=eax=[ebx=[ecx=[edx=[esi=[edi=[ebp=[eax]]]]]]];
Now, preserving EAX, EBX, ECX, and EDX.
#0fh mem0/=mem1*mem2*1000h;
# ebp<<<=ecx<<=eax;
# mem0^=edi%10000h;
# eax=(****ebx:>>ecx):/edx;
# mem0-=+eax-+ebx++[ecx*edx];