Skip to contentSkip to conversation

print_int

DISCUSSION ssams 1 participant 1 message May 8, 2002

lore
Share & tools
lore

ssams

author
#0 lore raw

i have code for printing integer, but no output i get. can anybody help me..?

.data
angka:

	.byte 0x32
.text
.globl  mulai
mulai:
	movl $angka,%eax
	movb $10,%dh
ulang:
	xorl %ecx,%ecx
	div  %dh
	pushl %ecx
	inc   %edx
	cmp   $0,%eax
	jne   ulang

cetak:

	popl %ecx
	movl  %eax,%ecx
	addl $0x30,%ecx
	movl  $4,%eax
	movl  $1,%ebx
	movl  $3,%edx
	int   $0x80
	
	movl  $1,%eax
	int  $0x80