943,772 Members | Top Members by Rank

Ad:
  • Assembly Discussion Thread
  • Unsolved
  • Views: 7084
  • Assembly RSS
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Jan 9th, 2007
0

Re: Your opinion of Assembly:

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.
Reputation Points: 31
Solved Threads: 0
Light Poster
Purple Avenger is offline Offline
49 posts
since Jan 2007
Jan 10th, 2007
0

Re: Your opinion of Assembly:

>>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:
Quote 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 6:50 pm. Reason: edit was mistake
Reputation Points: 683
Solved Threads: 53
Posting Virtuoso
Infarction is offline Offline
1,580 posts
since May 2006
Jan 10th, 2007
0

Re: Your opinion of Assembly:

*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)
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,950 posts
since Aug 2005
Jan 18th, 2007
0

Re: Your opinion of Assembly:

*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?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
howlingmadhowie is offline Offline
4 posts
since Jan 2007
Jan 18th, 2007
0

Re: Your opinion of Assembly:

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.
Reputation Points: 683
Solved Threads: 53
Posting Virtuoso
Infarction is offline Offline
1,580 posts
since May 2006
Jan 18th, 2007
0

Re: Your opinion of Assembly:

*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):
Assembly Syntax (Toggle Plain Text)
  1. include $ ls
  2. acpi asm-frv asm-m68k asm-s390 asm-v850 media sound
  3. asm asm-generic asm-m68knommu asm-sh asm-x86_64 mtd video
  4. asm-alpha asm-h8300 asm-mips asm-sh64 asm-xtensa net
  5. asm-arm asm-i386 asm-parisc asm-sparc config pcmcia
  6. asm-arm26 asm-ia64 asm-ppc asm-sparc64 linux rxrpc
  7. 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.
Reputation Points: 683
Solved Threads: 53
Posting Virtuoso
Infarction is offline Offline
1,580 posts
since May 2006
Jan 19th, 2007
0

Re: Your opinion of Assembly:

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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
howlingmadhowie is offline Offline
4 posts
since Jan 2007
Jan 30th, 2007
0

Re: Your opinion of Assembly:

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
akyprian is offline Offline
15 posts
since Jan 2007
Jan 31st, 2007
0

Re: Your opinion of Assembly:

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.
Reputation Points: 683
Solved Threads: 53
Posting Virtuoso
Infarction is offline Offline
1,580 posts
since May 2006
Jan 31st, 2007
0

Re: Your opinion of Assembly:

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
akyprian is offline Offline
15 posts
since Jan 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Assembly Forum Timeline: urgent i have only 24 hours
Next Thread in Assembly Forum Timeline: MC68000/..332 Calculator





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC