User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Assembly section within the Software Development category of DaniWeb, a massive community of 422,819 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,338 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Assembly advertiser: Programming Forums
Views: 4559 | Replies: 26
Reply
Join Date: Jan 2007
Posts: 49
Reputation: Purple Avenger is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
Purple Avenger Purple Avenger is offline Offline
Light Poster

Re: Your opinion of Assembly:

  #11  
Jan 9th, 2007
Originally Posted by Ancient Dragon View Post
C language, for example, is portable as long as (1) the programmer sticks to ansii C standard functions and (2) there is a c compiler targeted for the platform.


C has issues a programmer needs to keep in mind if they want truly portable code that go well beyong the RTL.

The standard is full of the weasle words "implementation defined" and "behavior is undefined".

One of the biggest issues is non-crisp semantics for data types. That was something ADA took on directly and actually resolved in its spec. ADA semantics are dictated 100%. C punts quite often - you don't even know if a 'char' is going to be signed or unsigned by default in any given C implementation.

People who write genuinely portable code for a living get around most this with lots of synthetic types, extensive use of limits.h, sizeof() and a keen eye to where some snip of bit banging code might not be word endian neutral or word size neutral. The vast majority of C programmers in the world don't exhibit that kind of dicipline though.
Reply With Quote  
Join Date: May 2006
Location: Bellevue, WA
Posts: 1,548
Reputation: Infarction has a spectacular aura about Infarction has a spectacular aura about Infarction has a spectacular aura about 
Rep Power: 8
Solved Threads: 51
Sponsor
Infarction's Avatar
Infarction Infarction is offline Offline
Battle Programmer

Re: Your opinion of Assembly:

  #12  
Jan 10th, 2007
Originally Posted by Ancient Dragon View Post
>>If we confine our discussion to x86 hardware
claiming a program is portable makes no such restriction, and neither do I.

I believe Evenbit's argument arose from this phrase, which implies a focus on OS rather than hardware:
Originally Posted by Ancient Dragon
If you are looking for portability between operating systems, such as *nix and MS-Windows, then you should stay clear of assembly -- it ain't portable.
Last edited by Ancient Dragon : Jan 10th, 2007 at 5:50 pm. Reason: edit was mistake
Reply With Quote  
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 11,116
Reputation: Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of Ancient Dragon has much to be proud of 
Rep Power: 38
Solved Threads: 929
Moderator
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is online now Online
Most Valuable Poster

Re: Your opinion of Assembly:

  #13  
Jan 10th, 2007
*nix often does not run on the same hardware as MS-Windows. For example we have a lot of linux systems that run on Sun workstations with RISK processors (I think they are RISK)
I think it's about time we voted for senators with breasts. After all, we've been voting for boobs long enough. ~Clarie Sargent, Arizona senatorial candidate
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
Reply With Quote  
Join Date: Jan 2007
Location: jena/germany
Posts: 4
Reputation: howlingmadhowie is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
howlingmadhowie howlingmadhowie is offline Offline
Newbie Poster

Re: Your opinion of Assembly:

  #14  
Jan 18th, 2007
Originally Posted by Ancient Dragon View Post
*nix often does not run on the same hardware as MS-Windows. For example we have a lot of linux systems that run on Sun workstations with RISK processors (I think they are RISK)


the sparc architecture is a RISC architecture with pipelining. the pipelining leads to real problems trying to write assembler for it if you're used to the x86 type (which i am used to)

one of the problems is that the pipelining means that assembly for sparc systems knows what's going to happen before it happens. basically, the address of the next command is fetched before the current command is executed. so a jump like this:
a=3;
b=2
goto some_label;

would be in sparc assembly:
mov 3, register_for_a
jmp some_label
mov 2, register_for_b

because the address for the last instruction would already be in memory before the second instruction is executed.

wierd, huh?
Reply With Quote  
Join Date: May 2006
Location: Bellevue, WA
Posts: 1,548
Reputation: Infarction has a spectacular aura about Infarction has a spectacular aura about Infarction has a spectacular aura about 
Rep Power: 8
Solved Threads: 51
Sponsor
Infarction's Avatar
Infarction Infarction is offline Offline
Battle Programmer

Re: Your opinion of Assembly:

  #15  
Jan 18th, 2007
Originally Posted by howlingmadhowie View Post
the sparc architecture is a RISC architecture with pipelining. the pipelining leads to real problems trying to write assembler for it if you're used to the x86 type (which i am used to)

You do realize that a Pentium 4 has something like 40 pipeline stages, don't you? Pipelining is one of the most basic ways to increase throughput on a processor, though it does add a good deal of complexity to the design.
Reply With Quote  
Join Date: May 2006
Location: Bellevue, WA
Posts: 1,548
Reputation: Infarction has a spectacular aura about Infarction has a spectacular aura about Infarction has a spectacular aura about 
Rep Power: 8
Solved Threads: 51
Sponsor
Infarction's Avatar
Infarction Infarction is offline Offline
Battle Programmer

Re: Your opinion of Assembly:

  #16  
Jan 18th, 2007
Originally Posted by Ancient Dragon View Post
*nix often does not run on the same hardware as MS-Windows. For example we have a lot of linux systems that run on Sun workstations with RISK processors (I think they are RISK)

I think a more correct phrasing would be that Windows does not run on the same hardware as *nix...

While the statement is true, you should also consider that Windows comes as a binary installer for x86, whereas Linux sources (which I'm most familiar with in the *nix family) have separate source codes for different architectures. For instance, here's the contents of the $(SOURCE)/include directory (where ./asm/ is a symbolic link to the local architecture):
include $ ls
acpi       asm-frv      asm-m68k       asm-s390     asm-v850    media   sound
asm        asm-generic  asm-m68knommu  asm-sh       asm-x86_64  mtd     video
asm-alpha  asm-h8300    asm-mips       asm-sh64     asm-xtensa  net
asm-arm    asm-i386     asm-parisc     asm-sparc    config      pcmcia
asm-arm26  asm-ia64     asm-ppc        asm-sparc64  linux       rxrpc
asm-cris   asm-m32r     asm-ppc64      asm-um       math-emu    scsi

You'll notice if you download an image of a linux installation (e.g. for a live CD) that you do have to choose the approriate image for your architecture.
Reply With Quote  
Join Date: Jan 2007
Location: jena/germany
Posts: 4
Reputation: howlingmadhowie is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
howlingmadhowie howlingmadhowie is offline Offline
Newbie Poster

Re: Your opinion of Assembly:

  #17  
Jan 19th, 2007
yep, i knew that theoretically, but practically, i've never taken it into account while coding. maybe that explains why my assembler programms are so slow.
Reply With Quote  
Join Date: Jan 2007
Posts: 15
Reputation: akyprian is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
akyprian akyprian is offline Offline
Newbie Poster

Re: Your opinion of Assembly:

  #18  
Jan 30th, 2007
Hi,

After having developed software using HLL's for years, now I use Assembly Language for ALL my programming needs: small and very fast applications, no bloat, no dependencies (huge dll's), VERY easy to develop http://www.codeproject.com/script/im...miley_wink.gif and above all, I can do anything I want without facing any HLL limitations. You can give a look at this article: http://www.codeproject.com/useritems...bleriseasy.asp

Regards,

Antonis Kyprianou
Reply With Quote  
Join Date: May 2006
Location: Bellevue, WA
Posts: 1,548
Reputation: Infarction has a spectacular aura about Infarction has a spectacular aura about Infarction has a spectacular aura about 
Rep Power: 8
Solved Threads: 51
Sponsor
Infarction's Avatar
Infarction Infarction is offline Offline
Battle Programmer

Re: Your opinion of Assembly:

  #19  
Jan 30th, 2007
I would bring into question your programming needs. Most HLLs will tradeoff optimal efficiency for greatly reduced development time or increased code readability. Furthermore, assembly will limit your program to a specific architecture and OS, whereas with Java for example, you can take your code (or your .class file) and run it anywhere with a JVM.
Reply With Quote  
Join Date: Jan 2007
Posts: 15
Reputation: akyprian is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
akyprian akyprian is offline Offline
Newbie Poster

Re: Your opinion of Assembly:

  #20  
Jan 31st, 2007
My programs are intended to be used under Windows 32-bit or 16-bit DOS. Others target linux or other OS's, but yes, I don't develop cross platform applications. Other than that, I am able to develop small and very fast applications, no bloat, no dependencies (huge dll's), VERY easy to develop http://www.codeproject.com/script/im...miley_wink.gif and above all, I can do anything I want without facing any HLL limitations.

Code readability is another myth against Assembly. Microsoft Macro Assembler (MASM), for example, looks VERY similar to C code and is no harder to learn. I would say that it is easier.

Final point. Among others, I used VB (one of the easiest to learn and quickest to develop with languages) a lot before switching to Assembly and found no real problems to do so.

Regards,

Antonis
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Assembly Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the Assembly Forum

All times are GMT -4. The time now is 10:25 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC