FASM, MASM, TASM, NASM, ... I don't know, ADRIAAANN!!!

Ok i know people are probably tired of the 'which assembler is best' debate - so i'm just going to keep it to the two free ones that I know of:

FASM vs. NASM

I have not used FASM myself, but it seems to be quite popular. I use NASM, and invested the time in learning it's syntax and have come to appreciate it's very non-stantard style, but if you are a FASM user please tell me anything i may be missing by not using FASM if you are familiar with both :)

Comments

  • I used to use nasm, but now i use Fasm, i will never go back, i can not praise fasm enough, its a great peace of code.
    The first thing that's a lot better is error checking, in nasm if theres a error in your code, it spits out a line number, that is not very easy to find, but in fasm it not only gives line number, but also prints the line that has the error in.

    The simtec is very much like nasm, so you do not need to relearn what you have learnt in nasm (eg: 1. 10k com file program needed only 2 changes,to get it to assemble from nasm to fasm).
    No linker is required for com or exe, but you can use one if you wanted to.
    The assembler is self assembling.
    In programing forums, nothing is more annoying than C programmers, saying if asm is so good, Y is your assembler made with a C compiler, the fact that it users gas as a backend, goesright over there heads.

    As i am making a OS, it will be easier to port to my OS than nasm would, its very small compared to nasm and as its self compiling, to do that with nasm i would have to port gcc :-(.
    There's so much more to say, i could go on forever.

    PS: Also there's a great forum, if you need help and the assembler is still being worked on,so there's constant updates.

    \\||////
    @)
    ASHLEY4.
  • : I used to use nasm, but now i use Fasm, i will never go back, i can not praise fasm enough, its a great peace of code.
    : The first thing that's a lot better is error checking, in nasm if theres a error in your code, it spits out a line number, that is not very easy to find, but in fasm it not only gives line number, but also prints the line that has the error in.
    :
    : The simtec is very much like nasm, so you do not need to relearn what you have learnt in nasm (eg: 1. 10k com file program needed only 2 changes,to get it to assemble from nasm to fasm).
    : No linker is required for com or exe, but you can use one if you wanted to.
    : The assembler is self assembling.
    : In programing forums, nothing is more annoying than C programmers, saying if asm is so good, Y is your assembler made with a C compiler, the fact that it users gas as a backend, goesright over there heads.
    :
    : As i am making a OS, it will be easier to port to my OS than nasm would, its very small compared to nasm and as its self compiling, to do that with nasm i would have to port gcc :-(.
    : There's so much more to say, i could go on forever.
    :
    : PS: Also there's a great forum, if you need help and the assembler is still being worked on,so there's constant updates.
    :
    : \\||////
    @)
    : ASHLEY4.
    :
    [blue]FASM is great, but to use local variables is just a pain in the A55! Why the author simply not add that support?.. I mean: without any macros - all to be done is calculate the size of local vars and make a stack frame which (that frame) can be aligned by some directive. Without nice locals - no way to build a big application with a lot of functions.

    But FASM is still OK - my IDE will generate stack frames for any assembler automatically. The great thing - that you do not link anyhting - include your modules and in a few secs you got your EXE file. And it is VERY FAST![/blue]
  • [red] The simtec is very much like nasm, so you do not need to relearn what you have learnt in nasm (eg: 1. 10k com file program needed only 2 changes,to get it to assemble from nasm to fasm).
    No linker is required for com or exe, but you can use one if you wanted to.
    The assembler is self assembling.
    [/red]

    Ok, what would I have to do to get my NASM progam in the previous post's to assemble? I know the BITS 16 is no good, is that all I would have to change? Thanks...
  • These have been tested and assemble with Fasm.
    [code]
    ;To assemble for Fasm do this
    ;c:fasm test1.asm test1.com
    org 100h

    use16

    start:
    mov al,13h ; ah assumed to be 0. ok.
    int 10h

    pop sp ;<--I don't get these pop's
    pop cx ;<--what was pushed to get any
    pop ds ;<--coherent value?
    lp1:
    pop ax ;<--and again another one.
    aaa
    lp2:
    xchg [di],al ; clean & put star
    ; es prefix removed
    add di,ax ; new pos for star / randomize pos in init
    loop lp1 ; init loop, skipped in star moving loop
    inc di ; a clean pixel must also move
    ; was stosb
    cbw ; clear ah
    ; was xor ax,ax
    inc cx ; to skip loop command
    jmp lp2 ; star moving loop
    [/code]
    [code]
    ;To assemble (for Fasm) for a com file do this
    ;c:fasm test.asm test.com
    ORG 0x0100
    use16 ;< this needs to be this

    ;for a exe add these lines and take the lines above off
    ;c:fasm test.asm test.exe

    ;format MZ
    ;push cs
    ;pop ds
    ;push cs
    ;pop es

    xor di,di
    lea si,[msg]
    call PrintMsg

    mov ah, 0
    int 16h
    cld
    mov si, msg
    mov di, switch
    call ArraySwitch
    mov di, 12 ;<----------shouldn't this be at least 16 since-
    lea si, [switch] ;it's displayed by 2 bytes in memory?
    call PrintMsg ;It seems to work with this value though!

    mov ah, 0
    int 16h

    mov ax, 4c00h
    int 21h

    ArraySwitch:
    mov cx,7
    repz movsb
    ret

    PrintMsg:
    push es
    mov ax, 0b800h
    mov es, ax
    MsgLoop:
    lodsb
    mov ah,7
    cmp byte al,0
    je Done
    stosw
    jmp MsgLoop
    Done:
    pop es
    ret



    msg db "Hello!",0



    switch rb 7 ;<This needs to be rb 7
    [/code]

    \\||////
    @)
    ASHLEY4.
  • : These have been tested and assemble with Fasm.
    : [code]
    : ;To assemble for Fasm do this
    : ;c:fasm test1.asm test1.com
    : org 100h
    :
    : use16
    :
    : start:
    : mov al,13h ; ah assumed to be 0. ok.
    : int 10h
    :
    : pop sp ;<--I don't get these pop's
    : pop cx ;<--what was pushed to get any
    : pop ds ;<--coherent value?
    : lp1:
    : pop ax ;<--and again another one.
    : aaa
    : lp2:
    : xchg [di],al ; clean & put star
    : ; es prefix removed
    : add di,ax ; new pos for star / randomize pos in init
    : loop lp1 ; init loop, skipped in star moving loop
    : inc di ; a clean pixel must also move
    : ; was stosb
    : cbw ; clear ah
    : ; was xor ax,ax
    : inc cx ; to skip loop command
    : jmp lp2 ; star moving loop
    : [/code]
    : [code]
    : ;To assemble (for Fasm) for a com file do this
    : ;c:fasm test.asm test.com
    : ORG 0x0100
    : use16 ;< this needs to be this
    :
    : ;for a exe add these lines and take the lines above off
    : ;c:fasm test.asm test.exe
    :
    : ;format MZ
    : ;push cs
    : ;pop ds
    : ;push cs
    : ;pop es
    :
    : xor di,di
    : lea si,[msg]
    : call PrintMsg
    :
    : mov ah, 0
    : int 16h
    : cld
    : mov si, msg
    : mov di, switch
    : call ArraySwitch
    : mov di, 12 ;<----------shouldn't this be at least 16 since-
    : lea si, [switch] ;it's displayed by 2 bytes in memory?
    : call PrintMsg ;It seems to work with this value though!
    :
    : mov ah, 0
    : int 16h
    :
    : mov ax, 4c00h
    : int 21h
    :
    : ArraySwitch:
    : mov cx,7
    : repz movsb
    : ret
    :
    : PrintMsg:
    : push es
    : mov ax, 0b800h
    : mov es, ax
    : MsgLoop:
    : lodsb
    : mov ah,7
    : cmp byte al,0
    : je Done
    : stosw
    : jmp MsgLoop
    : Done:
    : pop es
    : ret
    :
    :
    :
    : msg db "Hello!",0
    :
    :
    :
    : switch rb 7 ;<This needs to be rb 7
    : [/code]
    :
    : \\||////
    @)
    : ASHLEY4.
    :




    most probably we r now goin to use YASM its goin to our future now
    It is made for 64-bit computing machine...
    abhigo
  • : : These have been tested and assemble with Fasm.
    : : [code]
    : : ;To assemble for Fasm do this
    : : ;c:fasm test1.asm test1.com
    : : org 100h
    : :
    : : use16
    : :
    : : start:
    : : mov al,13h ; ah assumed to be 0. ok.
    : : int 10h
    : :
    : : pop sp ;<--I don't get these pop's
    : : pop cx ;<--what was pushed to get any
    : : pop ds ;<--coherent value?
    : : lp1:
    : : pop ax ;<--and again another one.
    : : aaa
    : : lp2:
    : : xchg [di],al ; clean & put star
    : : ; es prefix removed
    : : add di,ax ; new pos for star / randomize pos in init
    : : loop lp1 ; init loop, skipped in star moving loop
    : : inc di ; a clean pixel must also move
    : : ; was stosb
    : : cbw ; clear ah
    : : ; was xor ax,ax
    : : inc cx ; to skip loop command
    : : jmp lp2 ; star moving loop
    : : [/code]
    : : [code]
    : : ;To assemble (for Fasm) for a com file do this
    : : ;c:fasm test.asm test.com
    : : ORG 0x0100
    : : use16 ;< this needs to be this
    : :
    : : ;for a exe add these lines and take the lines above off
    : : ;c:fasm test.asm test.exe
    : :
    : : ;format MZ
    : : ;push cs
    : : ;pop ds
    : : ;push cs
    : : ;pop es
    : :
    : : xor di,di
    : : lea si,[msg]
    : : call PrintMsg
    : :
    : : mov ah, 0
    : : int 16h
    : : cld
    : : mov si, msg
    : : mov di, switch
    : : call ArraySwitch
    : : mov di, 12 ;<----------shouldn't this be at least 16 since-
    : : lea si, [switch] ;it's displayed by 2 bytes in memory?
    : : call PrintMsg ;It seems to work with this value though!
    : :
    : : mov ah, 0
    : : int 16h
    : :
    : : mov ax, 4c00h
    : : int 21h
    : :
    : : ArraySwitch:
    : : mov cx,7
    : : repz movsb
    : : ret
    : :
    : : PrintMsg:
    : : push es
    : : mov ax, 0b800h
    : : mov es, ax
    : : MsgLoop:
    : : lodsb
    : : mov ah,7
    : : cmp byte al,0
    : : je Done
    : : stosw
    : : jmp MsgLoop
    : : Done:
    : : pop es
    : : ret
    : :
    : :
    : :
    : : msg db "Hello!",0
    : :
    : :
    : :
    : : switch rb 7 ;<This needs to be rb 7
    : : [/code]
    : :
    : : \\||////
    @)
    : : ASHLEY4.
    : :
    :
    :
    :
    :
    : most probably we r now goin to use YASM its goin to our future now
    : It is made for 64-bit computing machine...
    : abhigo
    :

    Fasm for 64-bit processor's is in the making.

    \\||////
    @)
    ASHLEY4.
  • Hello, I was a Nasm man, but once I tried Fasm, I was hooked.
    Fasm comes with it's own .asm source code & assembles it's self. (wow)
    That was a big plus, since you can learn to write code from the source code.
    AND, it is so simular to the Nasm syntax that I converted all my old source code files from Nasm to Fasm in one evening.
    There are just a couple of differences in the syntax and Fasm will kick out the errors when a Nasm.ASM is assembled with Fasm,
    so you know what to look for in the Fasm help file which is perty good.
    Nasm help is great for .asm info that can be used in Fasm too.
    I like them both, but since only one great assembler is needed, Fasm wins out.

    Bitdog
    PS, it's been a while since I wrote an .asm
    but winter shut in is approaching,
    so I hope to finish my fasmenv.zip fer beginner DOS addicts.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories