Subversion Repositories Kolibri OS

Rev

Rev 109 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1.  
  2. ;
  3. ;   Assembler
  4. ;     SMALL
  5. ;       CODE
  6. ;         GaMe
  7. ;           Libary
  8. ;
  9. ;   Ver 0.03 By Pavlushin Evgeni (RUSSIA)
  10. ;   www.waptap@mail.ru
  11.  
  12. ;InfoList
  13. ;0.01 correct
  14. ;0.02 control ~14.05.2004
  15. ;0.03 all macros optimized by halyavin, add at ~07.06.2004
  16.  
  17.  
  18. ;         corectiryemoe,corectnoe,step
  19. macro correct arg1,arg2,arg3
  20. {
  21. local plus,minus,equal
  22.     mov eax,arg2
  23.     cmp arg1,eax
  24.     je  equal
  25.     mov eax,arg3  
  26.     ja  minus
  27. plus:
  28.     add arg1,eax  
  29.     jmp equal
  30. minus:
  31.     sub arg1,eax  
  32. equal:
  33. }
  34.  
  35. macro control min,max,arg
  36. {
  37. local gr,low,norm
  38.     mov eax,max
  39.     cmp arg,eax
  40.     jg  gr
  41.     mov eax,min
  42.     cmp arg,eax
  43.     jnl norm
  44. gr:
  45. low:
  46.     mov arg,eax
  47. norm:
  48. }
  49.