Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

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