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