All pastes #80557 Raw Edit

Untitled

public text v1 · immutable
·published 2006-07-06 15:11 UTC
rendered paste body
.data 
s: .string "abcdefghij\12"

.global main

main:

	leal s,%esi

	movl $1,%ebx
	movl $s,%ecx
	movl $0xb,%edx
	movl $4,%eax
	int $0x80
	xorl %edi,%edi
loop:
	leal (%esi,%edi),%ebx
	incl %edi
	test $99,%ebx // $99 = dec 99 = ASCII c, deberia ser 0 o \n pero esta para pruebas
	jne loop
	
	xorl %eax,%eax
	mov %edi,%ebx
	int $0x80

	ret