All of lore.kernel.org
 help / color / mirror / Atom feed
* code_for_integer_printing
@ 2002-09-06 17:06 ssams
  2002-09-06 18:50 ` code_for_integer_printing lx
  0 siblings, 1 reply; 3+ messages in thread
From: ssams @ 2002-09-06 17:06 UTC (permalink / raw)
  To: linux-assembly

i want to ask about a little code bellow...
i build this code for print some integer value..
i think is easy for doing but after i do some fungtion
below
i did not find ionteger output.
so how is function to do it..?

this is my code, i hope you help me..?
thank's before..

.macro cetak		# macro for printing
	xor %eax,%eax
	mov $1,%ebx
	mov $4,%eax
	int $0x80
.endm
.data
promt1:
	.byte 65
.text
.globl _start
_start:
	mov $promt1,%eax 	#eax will divided
	mov $10,%ebx		#ebx is divident
	xor %ecx,%ecx
ulangi:
	xor %edx,%edx
	div %ebx		#eax : ebx
	push %edx		# save remainder
	inc %ecx
	cmp $0 ,%eax
	jne ulangi

	mov $3,%ecx
ulang_cetak:
	push %ecx
	pop %edx		#take point
	add $0 ,%dl		#convert to ascii
	mov %edx,%ecx		#for printing
	mov $1,%edx
	cetak			#print
	pop %ecx
	dec %ecx
	jnz ulang_cetak

	movl $1,%eax	#exit
	movl $0,%ebx
	int  $0x80
---------------------  Yang Mudah dan Menghibur ----------------------------

 

Hosting menjadi mudah dan murah hanya di PlasaCom. Klik http://idc.plasa.com

F1 Mania!! Ikuti F1 Game di Obelix Game Corner di http://www.plasa.com/infotel/f1.html

 

---------------------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-09-19 20:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-06 17:06 code_for_integer_printing ssams
2002-09-06 18:50 ` code_for_integer_printing lx
     [not found]   ` <web-49325170@m1.plasa.com>
2002-09-19 20:07     ` code_for_integer_printing lx

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.