Subversion Repositories Kolibri OS

Rev

Rev 109 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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