Skip to contentSkip to conversation

inside_SUB

DISCUSSION ssams 2 participants 2 messages Sep 16, 2002

lore
Share & tools
lore

ssams

author
#0 lore raw

by this code bellow i want print new line with the simple way
i sub first char "49" with 39. but i did not get output like what i want
output from this code is
1>>
when i look at ascii code this second char value is 187. would some body expalin me...?

regard

.data
msg: .byte 49
.text
.globl _start
_start:
mov $msg,%ecx
mov $1,%ebx
mov $1,%edx
mov $4,%eax

	int $0x80

mov %ecx,%eax
sub $39,%eax

	#ul %ebx
	mov %eax,%ecx
	mov $4,%eax
	int $0x80
	
	mov $1,%eax

int $0x80

=========================================================================
Khusus Pelanggan Telepon DIVRE 2, Tekan 166 untuk mendengarkan pesan Anda.
=========================================================================

#1 lore raw
Quoted 17 lines · ssams

by this code bellow i want print new line with the simple way
i sub first char "49" with 39. but i did not get output like what i want
output from this code is
1>>
when i look at ascii code this second char value is 187. would some body expalin me...?

regard

.data
msg: .byte 49
.text
.globl _start
_start:

Quoted 8 lines
        mov $msg,%ecx
        mov $1,%ebx
        mov $1,%edx
        mov $4,%eax
        int $0x80

        mov %ecx,%eax
        sub $39,%eax

xchg "sub $39,%eax" with "sub $39,(%eax)". %eax have a ptr value & You access a memory using this ptr!

Quoted 7 lines
        #ul %ebx
        mov %eax,%ecx
        mov $4,%eax
        int $0x80

        mov $1,%eax
        int $0x80
Signature · 1 line
Maciej Hrebien