Board.KolibriOS.org
http://board.kolibrios.org/

What is the difference between nasm and fasm?
http://board.kolibrios.org/viewtopic.php?f=23&t=3404
Page 1 of 2

Author:  zutokaza [ Sat Oct 15, 2016 9:04 pm ]
Post subject:  What is the difference between nasm and fasm?

I have lots of experience in high level programming languages like C, C++, Lua, Java, etc. ASM is very new to me and I kinda consider asm programmers to be the gods of the programming world!

I would like to know the difference between nasm and fasm because I want to program with fasm on Kolibri OS, but there are a lot of books on NASM. Like this one on Tutorial point.

Also, off topic, but can 16bit and 32bit registers be mixed?

Author:  hidnplayr [ Sat Oct 15, 2016 9:55 pm ]
Post subject:  Re: What is the difference between nasm and fasm?

On x86, 16 bit registers can be accessed when in 32 bit mode (such as protected mode) but why do you want to?
Nasm and fasm are basically different dialects of the intel assembly language.
Must read for fasm: https://flatassembler.net/docs.php%3Farticle%3Dmanual

Author:  hidnplayr [ Sat Oct 15, 2016 9:58 pm ]
Post subject:  Re: What is the difference between nasm and fasm?

Ps: programming in assembly is not just about learning the language, you need to learn the architecture, x86 in this case

Author:  zutokaza [ Sun Oct 16, 2016 10:18 am ]
Post subject:  Re: What is the difference between nasm and fasm?

Thank you. That cleared up somethings. I downloaded the source code from the SVN. I found most example code and code that I could integrate into a project I want to do in KolibriOS. I am not aiming for commercial use.

I am using Sasm (simple Open Source IDE for NASM, MASM, GAS and FASM assembler languages.) and flat assembler.

I have KolibriOS running in virtualbox. I was looking at and researching the libraries available. Do you know where I can find a simple example of the libimg?

Author:  hidnplayr [ Sun Oct 16, 2016 11:24 am ]
Post subject:  Re: What is the difference between nasm and fasm?

You can find the source code of libimg here: http://websvn.kolibrios.org/listing.php ... d53c34aa50
If you look in the .test folder, you'll find some test/demo programs.

Author:  zutokaza [ Sun Oct 16, 2016 12:37 pm ]
Post subject:  Re: What is the difference between nasm and fasm?

I found it. Thank you very much. Does KolibriOS have print screen? Also, can I calculate the area for the image dimensions for print screen? (If it exists.) I'd like to do this for easy image export.

Author:  Leency [ Sun Oct 16, 2016 1:16 pm ]
Post subject:  Re: What is the difference between nasm and fasm?

/rd/1/scrshot app or from menu-orher-screenshooter
No, sorry for now there is no tool to select copied area or crop image in Kolibri. Only full screen.

Author:  hidnplayr [ Sun Oct 16, 2016 1:39 pm ]
Post subject:  Re: What is the difference between nasm and fasm?

You can get the current screen resolution using system function 14.
You can get (a portion of) the screen pixels using system function 36
See http://websvn.kolibrios.org/filedetails ... sfuncs.txt

Author:  Ray [ Sun Oct 16, 2016 4:15 pm ]
Post subject:  Re: What is the difference between nasm and fasm?

One of the main advantages of the FASM is its new simple syntax to work with pointers. Just [] instead of "offset", "ptr" etc.

Author:  0CodErr [ Sun Oct 16, 2016 4:19 pm ]
Post subject:  Re: What is the difference between nasm and fasm?

Ray, You're wrong, NASM uses [] instead of "offset", "ptr" etc.

Author:  0CodErr [ Sun Oct 16, 2016 4:27 pm ]
Post subject:  Re: What is the difference between nasm and fasm?

hidnplayr, As it said in the documentation http://websvn.kolibrios.org/filedetails.php?repname=Kolibri+OS&path=%2Fkernel%2Ftrunk%2Fdocs%2Fsysfuncs.txt#line-455 SysFn14 does not return real screen size. For this purpose need to use SysFn61.1 http://websvn.kolibrios.org/filedetails.php?repname=Kolibri+OS&path=%2Fkernel%2Ftrunk%2Fdocs%2Fsysfuncs.txt#line-2711

Author:  Ray [ Sun Oct 16, 2016 5:32 pm ]
Post subject:  Re: What is the difference between nasm and fasm?

0CodErr wrote:
Ray, You're wrong, NASM uses [] instead of "offset", "ptr" etc.

It could be that it is already uses FASM like syntax for pointers. I didn't look at it for a very long time.

Author:  0CodErr [ Sun Oct 16, 2016 5:42 pm ]
Post subject:  Re: What is the difference between nasm and fasm?

Ray, you wrote that FASM uses its new simple syntax. But this syntax already was in NASM. Actually FASM uses NASM-like syntax in many cases(exept macro-system of course). May be you don't know, that NASM appeared earlier than FASM?

Author:  Ray [ Sun Oct 16, 2016 5:55 pm ]
Post subject:  Re: What is the difference between nasm and fasm?

I do know that of course. But the syntax without [] is older than the syntax with [], isn't it?

Author:  0CodErr [ Sun Oct 16, 2016 6:33 pm ]
Post subject:  Re: What is the difference between nasm and fasm?

Ray wrote:
But the syntax without [] is older than the syntax with [], isn't it?
But this is not relevant to the current topic, isn't it?

Page 1 of 2 All times are UTC+03:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/