home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PROG_GEN / PMODE24.ZIP / EXAMPLES.ZIP / EX_CA.IN next >
Text File  |  1994-02-06  |  1KB  |  40 lines

  1.  
  2. Here are some examples to compile. Notice that CA will ignore this text just
  3. as it would ignore ASM code. It only cares for the lines which start with '#'.
  4. When you examine the output code, keep in mind the precedence of the operators
  5. used.
  6.  
  7. #       ebx>>=edx*2+ecx;
  8. #       ecx=edi|esi&edx^ecx-ebx|ebp^eax;
  9. #       edx=eax-ebx*5&[ecx+edx*2+:equate0]|[esi+edi];
  10.  
  11. The same first 3 examples, except now all registers but the ones explicitly
  12. modified will be preserved.
  13.  
  14. #7fh    ebx>>=edx*2+ecx;
  15. #       ecx=edi|esi&edx^ecx-ebx|ebp^eax;
  16. #       edx=eax-ebx*5&[ecx+edx*2+:equate0]|[esi+edi];
  17.  
  18. Back to preserving no regs.
  19.  
  20. #0      ebx=-[ecx+~(eax*2)];
  21. #       edx=10h+16+10000b;
  22. #       mem0=eax<<<[esi+[edi]];
  23. #       ecx=edx/eax;
  24. #       esi*=12345678h+&mem0+ecx+:equate0+8*ebx;
  25. #       mem0=+(mem1/mem2);
  26. #       mem0=mem1=eax=mem2=mem3;
  27. #       edi=(ecx*mem0)+(ebx>>2)+mem1;
  28. #       edi=[ebp]/([edi]/([esi]/([edx]/([ecx]:/([ebx]%[eax])))));
  29. #       eax=[(ebx=[(ecx=[(edx=[(esi=[(edi=[(ebp=[eax])+ebx])+ecx])+edx])+esi])+edi])+ebp];
  30. #       mem0=eax=[ebx=[ecx=[edx=[esi=[edi=[ebp=[eax]]]]]]];
  31.  
  32. Now, preserving EAX, EBX, ECX, and EDX.
  33.  
  34. #0fh    mem0/=mem1*mem2*1000h;
  35. #       ebp<<<=ecx<<=eax;
  36. #       mem0^=edi%10000h;
  37. #       eax=(****ebx:>>ecx):/edx;
  38. #       mem0-=+eax-+ebx++[ecx*edx];
  39.  
  40.