Drop support for dirty rectangles.
[SDL.s60v3.git] / src / hermes / x86_main.asm
blobe78bf8f7a287fa2e59415656d9e1a87c815f2f6c
2 ; x86 format converters for HERMES
3 ; Some routines Copyright (c) 1998 Christian Nentwich (brn@eleet.mcb.at)
4 ; This source code is licensed under the GNU LGPL
5 ;
6 ; Please refer to the file COPYING.LIB contained in the distribution for
7 ; licensing conditions
9 ; Most routines are (c) Glenn Fiedler (ptc@gaffer.org), used with permission
12 BITS 32
14 %include "common.inc"
16 SDL_FUNC _ConvertX86
18 SECTION .text
20 ;; _ConvertX86:
21 ;; [ESP+8] ConverterInfo*
22 ;; --------------------------------------------------------------------------
23 ;; ConverterInfo (ebp+..)
24 ;; 0: void *s_pixels
25 ;; 4: int s_width
26 ;; 8: int s_height
27 ;; 12: int s_add
28 ;; 16: void *d_pixels
29 ;; 20: int d_width
30 ;; 24: int d_height
31 ;; 28: int d_add
32 ;; 32: void (*converter_function)()
33 ;; 36: int32 *lookup
35 _ConvertX86:
36 push ebp
37 mov ebp,esp
39 ; Save the registers used by the blitters, necessary for optimized code
40 pusha
42 mov eax,[ebp+8]
44 cmp dword [eax+4],BYTE 0
45 je endconvert
47 mov ebp,eax
49 mov esi,[ebp+0]
50 mov edi,[ebp+16]
52 y_loop:
53 mov ecx,[ebp+4]
55 call [ebp+32]
57 add esi,[ebp+12]
58 add edi,[ebp+28]
60 dec dword [ebp+8]
61 jnz y_loop
63 ; Restore the registers used by the blitters, necessary for optimized code
64 popa
66 pop ebp
68 endconvert:
69 ret
73 %ifidn __OUTPUT_FORMAT__,elf
74 section .note.GNU-stack noalloc noexec nowrite progbits
75 %endif