minor fixes
[ia32rtools.git] / tests / ops.asm
1 ; test random ops
2
3 _text           segment para public 'CODE' use32
4
5 sub_test        proc near
6                 push    ebp
7                 push    ebx
8                 push    esi
9                 push    edi
10                 mov     ebx, 10000h
11                 mov     esi, 20000h
12                 mov     edi, 30000h
13                 mov     ecx, 10
14 loop:
15                 lodsb
16                 xlat
17                 stosb
18                 lodsw
19                 neg     ax
20                 stosw
21                 lodsd
22                 stosd
23                 movsb
24                 cmpsw
25                 scasb
26                 loop    loop
27
28                 std
29                 stosb
30                 stosw
31                 stosd
32                 cld
33
34                 cdq
35                 bsf     eax, ecx
36
37                 call    __allshl
38                 mov     edi, eax
39                 call    __allshr
40                 bswap   eax
41                 xor     ecx, eax
42                 add     eax, ecx
43
44                 repne cmpsb
45                 setne   cl
46                 adc     cl, cl
47
48                 push    1
49                 pop     eax
50                 pop     edi
51                 pop     esi
52                 pop     ebx
53                 pop     ebp
54                 retn
55 sub_test        endp
56
57 _text           ends
58
59 ; vim:expandtab