flat assembler
Message board for the users of flat assembler.

Index > Linux > Fasm syntax

Author
Thread Post new topic Reply to topic
Fixit



Joined: 22 Nov 2012
Posts: 161
Fixit 21 Mar 2013, 19:47
This is a lot different than Masm, is there a file that explains this in detail ?

Does Linux use DOS-like interrupts ?

I think $0a is the Null character or newline ?

Thanks.

Code:
format ELF executable
entry _start

segment readable executable
_start:

        mov     eax,4
        mov     ebx,1
        mov     ecx,msg
        mov     edx,msg_size
        int     $80

        mov     eax,1
        xor     ebx,ebx
        int     $80


segment readable writeable
msg db 'First program for Linux using FreshIDE and FASM Thursday, March 21, 2013',$0a
    db 'Now Fresh can run Linux ELF executables. Smile', $0a
msg_size = $-msg
    
Post 21 Mar 2013, 19:47
View user's profile Send private message Reply with quote
r22



Joined: 27 Dec 2004
Posts: 805
r22 21 Mar 2013, 20:00
$0a is a line feed
$0d is a carriage return
null is usually 0
Post 21 Mar 2013, 20:00
View user's profile Send private message AIM Address Yahoo Messenger Reply with quote
HaHaAnonymous



Joined: 02 Dec 2012
Posts: 1178
Location: Unknown
HaHaAnonymous 21 Mar 2013, 20:03
[ Post removed by author. ]


Last edited by HaHaAnonymous on 28 Feb 2015, 21:22; edited 1 time in total
Post 21 Mar 2013, 20:03
View user's profile Send private message Reply with quote
Fixit



Joined: 22 Nov 2012
Posts: 161
Fixit 22 Mar 2013, 00:46
Thanks guys.

Andy
Post 22 Mar 2013, 00:46
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.