linux-assembly.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: code-need-to-correct
@ 2002-09-19 14:58 Doctor Owl
  2002-09-19 15:51 ` code-need-to-correct Robin Miyagi
  0 siblings, 1 reply; 5+ messages in thread
From: Doctor Owl @ 2002-09-19 14:58 UTC (permalink / raw)
  To: linux-assembly

Do what thou wilt shall be the whole of the Law,

I'd just like to provide my support to anyone that feels the need to fly
into a fit of rage and abuse people who post stupid questions without any
independant thought or research into exactly what they're doing, and most
likely do not even know who or where they are.

Most of you are doing a stand-up job replying to these peoples requests,
but are you going to hold their hands forever?  It's not like there is a
lack of information about this stuff floating about the net.

Regards,
DoctorOwl


http://mobile.yahoo.com.au - Yahoo! Messenger for SMS
- Always be connected to your Messenger Friends

^ permalink raw reply	[flat|nested] 5+ messages in thread
* code-need-to-correct
@ 2002-09-19 14:40 ssams
  2002-09-19 20:03 ` code-need-to-correct h-peter recktenwald
  0 siblings, 1 reply; 5+ messages in thread
From: ssams @ 2002-09-19 14:40 UTC (permalink / raw)
  To: linux-assembly


 .macro sys_write
	mov $4,%eax
	mov $1,%ebx
	int $0x80
.endm
.macro sys_read
	mov $3,%eax
	mov $2,%edx
	mov $0,%ebx
	int $0x80
.endm
.data
msg1: .ascii "Masukkan Angka: "
jum_masuk: 
	.byte .- msg1
satu: .ascii "Satu Lagi: "
jum_satu: 
	.byte .- satu
spasi: .byte 10
.bss
.lcomm input1,0
.lcomm input2,0
angka: .byte 0
.text 
.globl _start
_start:
	mov $msg1,%ecx
	mov $16,%edx
	sys_write
	sys_read
	mov %eax,input1

	
	mov $satu,%ecx
	mov $11,%edx
	sys_write
	sys_read
	mov %eax,input2


tambah:
	mov (input2),%eax
	add (input1),%eax
	mov $10,%bx
	xor %ecx,%ecx
ulang:
	div %bx
	push %edx
	inc %ecx
	cmp $0,%al
	jne ulang
cetak:
	pop %edx
	add $0x30,%dx
	mov %dx,angka
	push %ecx
	mov $angka,%ecx
	mov $1,%edx
	sys_write
	pop %ecx
	loop cetak	

	mov $spasi,%ecx
	mov $1,%edx
	sys_write

	movl $1,%eax	#exit
	movl $1,%eax	#exit
	movl $0,%ebx
	int  $0x80

output:

Masukkan angka: 4
Satu lagi: 5
2478030160157010470915781817.....

How to read input...?
=========================================================================
Khusus Pelanggan Telepon DIVRE 2, Tekan 166 untuk mendengarkan pesan Anda.
=========================================================================

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

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

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-19 14:58 code-need-to-correct Doctor Owl
2002-09-19 15:51 ` code-need-to-correct Robin Miyagi
  -- strict thread matches above, loose matches on Subject: below --
2002-09-19 14:40 code-need-to-correct ssams
2002-09-19 20:03 ` code-need-to-correct h-peter recktenwald
2002-09-19 20:14   ` code-need-to-correct lx

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).