flat assembler
Message board for the users of flat assembler.
Index
> Linux > Why is there no output ? |
Author |
|
LocoDelAssembly 03 Jan 2007, 21:54
According to Arafel's system calls reference
Quote: sys_write [fs/read_write.c] So you are requesting to the kernel to write five characters at address 0x00000005 to device 1 (stdout) |
|||
03 Jan 2007, 21:54 |
|
Adnarim 04 Jan 2007, 15:12
Hey thanks,
I changed the code this way and it works: Code: section .text global _start _start: mov esi,0 label1: inc esi cmp esi,5 jne label1 add esi,48 mov eax,4 mov ebx,1 push esi mov ecx,esp mov edx,4 int 80h mov eax,1 mov ebx,0 int 80h But two questions remain: Is there a better or let's say a more general way to convert integer 5 to Char 5 instead of adding 48? And the other thing is how can I add a newline character to this? So after add esi,48 I have dec 53 = char 5 in esi but how can I add now an newline charachter to this, so that when I print it a newline is shown after that? I know that the dec code is 10 and hex code of the newline feed is A, but how do I use this now? greets |
|||
04 Jan 2007, 15:12 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.