summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/i386/write12.S
blob: a40f63a862ff0dbbb56dc9d33acf889050f41edd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include "PIC.h"

.text

.global __write1
.type	__write1,@function

.global __write2
.type	__write2,@function

					# regparm=1, daher Stringadresse in %eax
__write2:
	clc				# CY = 0
	.byte	0xB2			# zusammen mit nächstem Byte: mov dl,0xF9
__write1:
	stc				# CY = 1
	sbbl	%ecx,%ecx		# __write2: ecx=0, __write1: ecx=-1
	incl	%ecx
	incl	%ecx			# __write2: ecx=2, __write1: ecx=1
	xorl	%edx,%edx
	decl	%edx
.Lnext:	incl	%edx
	cmpb	%ch,(%edx,%eax)		# ch=0, da bei beiden Filedescriptoren Bits 15:8 0 sind
	jnz	.Lnext			# Stringlänge in edx, ohne eax zerstört zu haben
	PIC_SAVE		# non-PIC: empty line
	PIC_INIT		# non-PIC: empty line
	pushl	%edx
	pushl	%eax
	pushl	%ecx
#ifdef __DYN_LIB
	call	write@PLT
#else
	call	write			# alles ruf uf dn Stack und ab damit
#endif
	addl	$12,%esp		# und das leidvolle Putzen
	PIC_RESTORE		# non-PIC: empty line
	ret
a>Pascal Rigaux2007-04-291-1/+1 * - allow umounting cdrom during a transactionPascal Rigaux2007-04-272-0/+2 * use full buffer size when snprintfing (gb)Olivier Blin2007-04-251-1/+1 * 1.8Olivier Blin2007-04-252-1/+4 * use api.mandriva.com to retrieve mirror list (#29346)Olivier Blin2007-04-252-117/+82 * implement ask_from_list_index() and drop other ask_from_list() functionsOlivier Blin2007-04-252-45/+23 * add generic ask_from_list_comments() and ask_from_list() implementation using...Olivier Blin2007-04-251-0/+19 * add ask_from_list_index() prototypeOlivier Blin2007-04-251-0/+1 * add lowercase() function (used to retrieve mirror list)Olivier Blin2007-04-252-0/+10 * remove huge unwanted commitOlivier Blin2007-04-258-137/+165 * crappy commit (reverted later)Olivier Blin2007-04-258-165/+137 * pass DISTRIB_TYPE when building stage1 (useful to know which mirro list to re...Olivier Blin2007-04-252-1/+2 * re-sync after the big svn lossPascal Rigaux2007-04-251-715/+100 * re-sync after the big svn lossPascal Rigaux2007-04-25