mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-12-15 14:40:53 +00:00
336 lines
3.6 KiB
Text
336 lines
3.6 KiB
Text
.486
|
|
.model flat
|
|
extrn __fltused:near
|
|
extrn __ftol:near
|
|
_DATA segment
|
|
public _words
|
|
align 4
|
|
_words label byte
|
|
dd 1
|
|
dd 2
|
|
dd 3
|
|
db 105
|
|
db 102
|
|
db 0
|
|
db 3 dup (0)
|
|
db 2 dup (0)
|
|
dd 4
|
|
dd 5
|
|
db 4 dup (0)
|
|
db 102
|
|
db 111
|
|
db 114
|
|
db 3 dup (0)
|
|
db 2 dup (0)
|
|
dd 6
|
|
dd 7
|
|
dd 8
|
|
db 101
|
|
db 108
|
|
db 115
|
|
db 101
|
|
db 0
|
|
db 1 dup (0)
|
|
db 2 dup (0)
|
|
dd 9
|
|
dd 10
|
|
dd 11
|
|
db 119
|
|
db 104
|
|
db 105
|
|
db 108
|
|
db 101
|
|
db 1 dup (0)
|
|
db 2 dup (0)
|
|
dd 0
|
|
db 8 dup (0)
|
|
db 8 dup (0)
|
|
public _wordlist
|
|
align 4
|
|
_wordlist label byte
|
|
dd _words
|
|
public _x
|
|
align 4
|
|
_x label byte
|
|
dd 1
|
|
dd 2
|
|
dd 3
|
|
dd 4
|
|
dd 0
|
|
dd 5
|
|
dd 6
|
|
db 12 dup (0)
|
|
dd 7
|
|
db 16 dup (0)
|
|
public _y
|
|
align 4
|
|
_y label byte
|
|
dd _x
|
|
dd _x+20
|
|
dd _x+40
|
|
dd 00H
|
|
public _main
|
|
_DATA ends
|
|
_TEXT segment
|
|
_main:
|
|
push ebx
|
|
push esi
|
|
push edi
|
|
push ebp
|
|
mov ebp,esp
|
|
sub esp,8
|
|
mov dword ptr (-8)[ebp],0
|
|
jmp L8
|
|
L5:
|
|
mov dword ptr (-4)[ebp],0
|
|
jmp L12
|
|
L9:
|
|
mov edi,dword ptr (-4)[ebp]
|
|
mov esi,dword ptr (-8)[ebp]
|
|
mov esi,dword ptr (_y)[esi*4]
|
|
mov edi,dword ptr [esi][edi*4]
|
|
push edi
|
|
lea edi,(L13)
|
|
push edi
|
|
call _printf
|
|
add esp,8
|
|
L10:
|
|
inc dword ptr (-4)[ebp]
|
|
L12:
|
|
mov edi,dword ptr (-4)[ebp]
|
|
mov esi,dword ptr (-8)[ebp]
|
|
mov esi,dword ptr (_y)[esi*4]
|
|
cmp dword ptr [esi][edi*4],0
|
|
jne L9
|
|
lea edi,(L14)
|
|
push edi
|
|
call _printf
|
|
add esp,4
|
|
L6:
|
|
inc dword ptr (-8)[ebp]
|
|
L8:
|
|
mov edi,dword ptr (-8)[ebp]
|
|
mov edi,dword ptr (_y)[edi*4]
|
|
cmp edi,0
|
|
jne L5
|
|
call _f
|
|
add esp,0
|
|
mov edi,dword ptr (_wordlist)
|
|
push edi
|
|
call _g
|
|
add esp,4
|
|
mov eax,0
|
|
L4:
|
|
mov esp,ebp
|
|
pop ebp
|
|
pop edi
|
|
pop esi
|
|
pop ebx
|
|
ret
|
|
_TEXT ends
|
|
_DATA segment
|
|
align 4
|
|
L16 label byte
|
|
dd L17
|
|
dd L18
|
|
dd L19
|
|
dd L20
|
|
dd 00H
|
|
public _f
|
|
_DATA ends
|
|
_TEXT segment
|
|
_f:
|
|
push ebx
|
|
push esi
|
|
push edi
|
|
push ebp
|
|
mov ebp,esp
|
|
sub esp,4
|
|
lea edi,(L16)
|
|
mov dword ptr (-4)[ebp],edi
|
|
jmp L24
|
|
L21:
|
|
mov edi,dword ptr (-4)[ebp]
|
|
mov edi,dword ptr [edi]
|
|
push edi
|
|
lea edi,(L25)
|
|
push edi
|
|
call _printf
|
|
add esp,8
|
|
L22:
|
|
mov edi,dword ptr (-4)[ebp]
|
|
lea edi,(4)[edi]
|
|
mov dword ptr (-4)[ebp],edi
|
|
L24:
|
|
mov edi,dword ptr (-4)[ebp]
|
|
mov edi,dword ptr [edi]
|
|
cmp edi,0
|
|
jne L21
|
|
mov eax,0
|
|
L15:
|
|
mov esp,ebp
|
|
pop ebp
|
|
pop edi
|
|
pop esi
|
|
pop ebx
|
|
ret
|
|
public _g
|
|
_g:
|
|
push ebx
|
|
push esi
|
|
push edi
|
|
push ebp
|
|
mov ebp,esp
|
|
sub esp,4
|
|
jmp L30
|
|
L27:
|
|
mov dword ptr (-4)[ebp],0
|
|
jmp L34
|
|
L31:
|
|
mov edi,dword ptr (-4)[ebp]
|
|
mov esi,dword ptr (20)[ebp]
|
|
mov edi,dword ptr [esi][edi*4]
|
|
push edi
|
|
lea edi,(L35)
|
|
push edi
|
|
call _printf
|
|
add esp,8
|
|
L32:
|
|
inc dword ptr (-4)[ebp]
|
|
L34:
|
|
mov edi,dword ptr (-4)[ebp]
|
|
cmp edi,3
|
|
jb L31
|
|
mov edi,dword ptr (20)[ebp]
|
|
lea edi,(12)[edi]
|
|
push edi
|
|
lea edi,(L25)
|
|
push edi
|
|
call _printf
|
|
add esp,8
|
|
L28:
|
|
mov edi,dword ptr (20)[ebp]
|
|
lea edi,(20)[edi]
|
|
mov dword ptr (20)[ebp],edi
|
|
L30:
|
|
mov edi,dword ptr (20)[ebp]
|
|
cmp dword ptr [edi],0
|
|
jne L27
|
|
call _h
|
|
add esp,0
|
|
mov eax,0
|
|
L26:
|
|
mov esp,ebp
|
|
pop ebp
|
|
pop edi
|
|
pop esi
|
|
pop ebx
|
|
ret
|
|
public _h
|
|
_h:
|
|
push ebx
|
|
push esi
|
|
push edi
|
|
push ebp
|
|
mov ebp,esp
|
|
sub esp,4
|
|
mov dword ptr (-4)[ebp],0
|
|
jmp L40
|
|
L37:
|
|
imul edi,dword ptr (-4)[ebp],20
|
|
lea esi,(_words+12)[edi]
|
|
push esi
|
|
mov esi,dword ptr (_words+8)[edi]
|
|
push esi
|
|
mov esi,dword ptr (_words+4)[edi]
|
|
push esi
|
|
mov edi,dword ptr (_words)[edi]
|
|
push edi
|
|
lea edi,(L41)
|
|
push edi
|
|
call _printf
|
|
add esp,20
|
|
L38:
|
|
inc dword ptr (-4)[ebp]
|
|
L40:
|
|
mov edi,dword ptr (-4)[ebp]
|
|
cmp edi,5
|
|
jb L37
|
|
mov eax,0
|
|
L36:
|
|
mov esp,ebp
|
|
pop ebp
|
|
pop edi
|
|
pop esi
|
|
pop ebx
|
|
ret
|
|
_TEXT ends
|
|
extrn _printf:near
|
|
_TEXT segment
|
|
_TEXT ends
|
|
_TEXT segment
|
|
align 1
|
|
L41 label byte
|
|
db 37
|
|
db 100
|
|
db 32
|
|
db 37
|
|
db 100
|
|
db 32
|
|
db 37
|
|
db 100
|
|
db 32
|
|
db 37
|
|
db 115
|
|
db 10
|
|
db 0
|
|
align 1
|
|
L35 label byte
|
|
db 37
|
|
db 100
|
|
db 32
|
|
db 0
|
|
align 1
|
|
L25 label byte
|
|
db 37
|
|
db 115
|
|
db 10
|
|
db 0
|
|
align 1
|
|
L20 label byte
|
|
db 119
|
|
db 104
|
|
db 105
|
|
db 108
|
|
db 101
|
|
db 0
|
|
align 1
|
|
L19 label byte
|
|
db 101
|
|
db 108
|
|
db 115
|
|
db 101
|
|
db 0
|
|
align 1
|
|
L18 label byte
|
|
db 102
|
|
db 111
|
|
db 114
|
|
db 0
|
|
align 1
|
|
L17 label byte
|
|
db 105
|
|
db 102
|
|
db 0
|
|
align 1
|
|
L14 label byte
|
|
db 10
|
|
db 0
|
|
align 1
|
|
L13 label byte
|
|
db 32
|
|
db 37
|
|
db 100
|
|
db 0
|
|
_TEXT ends
|
|
end
|