linux-assembly.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* how_shifting_bit
@ 2002-09-16  5:19 ssams
  2002-09-16 15:17 ` how_shifting_bit Maciej Hrebien
  0 siblings, 1 reply; 2+ messages in thread
From: ssams @ 2002-09-16  5:19 UTC (permalink / raw)
  To: linux-assembly

/* i am trying building some code with instruction 'shl'
i have a little problem when print second char. this is my
code
want somebody correct it...?
regard */  
.data
 msg: .byte 0b111111    #char'?'
 baris_baru: .byte 10
 .text
 .globl _start
 _start:
	mov $4, %eax	/* fungsi syscall - write */
 	mov $1, %ebx	/* file handler forstdout */
	mov $1, %edx	
	mov $msg, %ecx	
	int $0x80	/* do syscall */
	
	mov $msg,%eax
	mov $1,%cl
	shl %cl,%eax	#eax=111 1110 = '~'
	movzwl %ax,%ecx
	mov $4, %eax	/* fungsi syscall - write */
	int $0x80
/* after char '?' i want print '~'. No output generated
what and where it wrong..?*/
	
	mov $baris_baru,%ecx
	mov $4, %eax	/* fungsi syscall - write */
	int $0x80
	
	mov $1,%eax
	int $0x80
can anybody explain me please..?
regard.
indonesian
=========================================================================
Khusus Pelanggan Telepon DIVRE 2, Tekan 166 untuk mendengarkan pesan Anda.
=========================================================================

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

end of thread, other threads:[~2002-09-16 15:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-16  5:19 how_shifting_bit ssams
2002-09-16 15:17 ` how_shifting_bit Maciej Hrebien

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).