flat assembler
Message board for the users of flat assembler.

Index > Main > fasm exit code

Author
Thread Post new topic Reply to topic
Kicer



Joined: 30 Apr 2005
Posts: 34
Location: Poland
Kicer
Hi

what are fasm exit codes? it used to (version 1.68) return 0 when everything was ok, now (1.69.14) it returns 8 (?)
Post 27 Jul 2010, 05:42
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17662
Location: In your JS exploiting you and your system
revolution
For which OS?

For Win32 console the return values are:

0: okay
1: usage string
2: code error
255: fatal error
Post 27 Jul 2010, 08:09
View user's profile Send private message Visit poster's website Reply with quote
Kicer



Joined: 30 Apr 2005
Posts: 34
Location: Poland
Kicer
Linux

Code:
[michal@Kicer tmp]$ touch file.asm
[michal@Kicer tmp]$ fasm file.asm 
flat assembler  version 1.69.14  (16384 kilobytes memory)
1 passes, 0 bytes.
[michal@Kicer tmp]$ echo $?
8
[michal@Kicer tmp]$ 
    
Post 27 Jul 2010, 18:24
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17662
Location: In your JS exploiting you and your system
revolution
FASM.ASM:
Code:
      display_bytes_count:
      mov     eax,[written_size]
  call    display_number
      mov     esi,_bytes_suffix
   call    display_string
      xor     al,al
       jmp     exit_program    
SYSTEM.INC
Code:
exit_program:
      movzx   ebx,al
      mov     eax,1
       int     0x80    
Post 27 Jul 2010, 19:49
View user's profile Send private message Visit poster's website Reply with quote
Kicer



Joined: 30 Apr 2005
Posts: 34
Location: Poland
Kicer
weird then...
Post 28 Jul 2010, 20:16
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.