	.section	.text
	.intel_syntax
	.global	put
	.type	put, @function
put:
	push	%ebx
	mov	%eax, 4			# Write system call
	mov	%ecx, [%esp + 12]	# Copy address of string
	.ifdef	NetBSD
	push	[%ecx - 4]		# Length
	push	%ecx			# Put address on the stack
	push	[%esp + 8]		# File descriptor
	push	0			# Extra double-word
	.else
	mov	%edx, [%ecx - 4]	# Length
	mov	%ebx, [%esp + 8]	# File descriptor
	.endif
	int	128
	pop	%ebx
	ret
