flat assembler
Message board for the users of flat assembler.

Index > Projects and Ideas > Portable assembly code?(between archs)

Goto page Previous  1, 2, 3, 4
Author
Thread Post new topic Reply to topic
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 03 May 2008, 09:02
Quote:
worry instead about what you want to accomplish and how to achieve it

I do. Even then, there are people who use 32bit machine, there are BSDers who use 64bit machine without any 32bit emulation, there are people who use ARM, etc. In most practical tasks you need to use external libraries, but most of those are not written in ASM, and so way to call them in Asm differs with OS calling standard, even on same processor.

These are some practical examples where assembly is inferior to HLLs. If you want your code to be usable for many people out there, you'll have to duplicate A LOT.
Post 03 May 2008, 09:02
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Borsuc



Joined: 29 Dec 2005
Posts: 2465
Location: Bucharest, Romania
Borsuc 03 May 2008, 09:24
vid wrote:
These are some practical examples where assembly is inferior to HLLs. If you want your code to be usable for many people out there, you'll have to duplicate A LOT.
I say that should be their problem.

I give off my sources so no one can complain. if they can make it more readable, they're more than welcome. Why is so hard to make it readable? Because I don't know how they think, for me asm and C are easy languages -- others prefer Pascal, etc.. I can't get into their heads so I leave it to them Wink

For me, C has advantages over asm, especially in design phase, or when testing new algorithms (but I still convert every C instruction to asm before, when I think up the algorithm, to know if it's efficient or not prematurely. Of course nothing beats a profiler, but that's just a preview).

That said, they don't exclude each other (C and asm), but complement each other. And assembly is very underrated IMO, especially when it comes to 'difficult to maintain/read/debug' part) It's not hard if you get used to it, but then again, I think everyone who is starting with asm will find it hard, just as they find their first languages very hard and full of bugs Wink
Post 03 May 2008, 09:24
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 05 May 2008, 17:48
I find it very very very hard to imagine that anyone thinks HLLs in general output good code. (They don't.) Also, not every platform has the latest GCC either. Plus some compilers (Intel) aren't free. And I certainly think a lot of 100% C code could be sped up with little asm bits here and there. Doesn't mean I'm against all HLLs, but for sure they aren't as utopian as some would have you believe. (And is it just me or is GCC kinda slow? Meh.)
Post 05 May 2008, 17:48
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 05 May 2008, 22:58
rugxulo: HLLs/compilers aren't the end-all-be-all magic silver bullet, the trick is being "good enough" and "comfortable enough to work with" - YMMV might vary wrt. just how good is good enough, but I don't think anybody claims that you can't usually beat a compiler.

And yeah, GCC is terribly slow, at least the versions I've tried. And for MSVC, there's also a noticeable speed hit betwen compiling .c and .cpp files (ie., compiling the same source in C or C++ mode).
Post 05 May 2008, 22:58
View user's profile Send private message Visit poster's website Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 06 May 2008, 02:18
Quote:

http://www.network-theory.co.uk/docs/gccintro/gccintro_49.html

Compiling with the option -O1 can often take less time than compiling with -O0, due to the reduced amounts of data that need to be processed after simple optimizations.


Uh ... yeah, sure, this makes perfect sense. Razz

But GCC is already pretty darn good, IMO. I just wish it was even better still (more cpu scheduling, better compile speed, easier to bootstrap) and maybe a bit less weirdly-designed!
Post 06 May 2008, 02:18
View user's profile Send private message Visit poster's website Reply with quote
penang



Joined: 01 Oct 2004
Posts: 59
penang 07 May 2008, 16:25
As long as this is about porting fasm to different arch, I hope that one day I can see fasm being used in native GPU (ATI/Nvidia) programming.

Am not holding my breath though.
Post 07 May 2008, 16:25
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20530
Location: In your JS exploiting you and your system
revolution 07 May 2008, 16:31
penang wrote:
As long as this is about porting fasm to different arch, I hope that one day I can see fasm being used in native GPU (ATI/Nvidia) programming.

Am not holding my breath though.
Don't just sit back and wait for it to happen. Sit up and start programming it, that is how things will happen.
Post 07 May 2008, 16:31
View user's profile Send private message Visit poster's website Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 07 May 2008, 19:07
penang, before Googling maybe you would like to see this first: http://board.flatassembler.net/topic.php?t=3702
Post 07 May 2008, 19:07
View user's profile Send private message Reply with quote
penang



Joined: 01 Oct 2004
Posts: 59
penang 08 May 2008, 15:02
Quote:

penang, before Googling maybe you would like to see this first: http://board.flatassembler.net/topic.php?t=3702



Thanks for the links. I'll soak them up.

In the meantime, the French are doing something about it .....

http://www.google.com/translate?u=http%3A%2F%2Fwww.pcinpact.com%2Factu%2Fnews%2F43165-premier-supercalculateur-GPU-France-Tesla.htm&langpair=fr%7Cen&hl=en&ie=UTF8

For those who understand French ...

http://www.pcinpact.com/actu/news/43165-premier-supercalculateur-GPU-France-Tesla.htm?ca=&vc=1&p=3&#c1596463
Post 08 May 2008, 15:02
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3, 4

< 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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.