Like Tree2Likes
  • 1 Post By Nominal Animal
  • 1 Post By Mario F.

Should I use tasm?

This is a discussion on Should I use tasm? within the Tech Board forums, part of the Community Boards category; Hi there I'm taking a course in assembly for my computer science degree. I was very surprised to see the ...

  1. #1
    glo
    glo is offline
    Registered User
    Join Date
    May 2006
    Posts
    169

    Should I use tasm?

    Hi there

    I'm taking a course in assembly for my computer science degree.

    I was very surprised to see the requirement to download a list of programs that date back to 1997: tasm, borland, etc!

    Is there an alternative for tasm? One that would work under my Win7 64 bit and still be compatible with tasm?

    Thanks
    glo

  2. #2
    Registered User
    Join Date
    Oct 2011
    Posts
    847
    Check out NASM, the Netwide Assembler.

    I don't use Windows, so I don't know if the latest installer for Windows (2.10.05) works for you. It should. (Even if the nasm.exe itself is just a 32-bit executable, it certainly can compile 64-bit assembly too.)

    All you really need for that is the nasm.exe, which you should use the same way you'd use tasm. The command line options may vary a bit, so I recommend you head out to the NASM Manual for 2.10.05, then try it out and see for yourself.

    Also, you might wish to check out NASM guide for TASM users, too. There seem to be some minor differences.

    If anything, you really should complain to the school/university/college, that their course prerequisites are no-longer available software that bears no relevance in the real world, and that the lecturer should either take up remedial courses in current tools, or be fired immediately. There simply is no reason for requiring obsolete commercial software, when portable, better, free alternatives are readily available. Your institution is wasting yours/taxpayers money by retaining that lecturer and course material.
    Elkvis likes this.

  3. #3
    Registered User
    Join Date
    Jan 2009
    Posts
    1,485
    I can see some justification for using older tools if they also use an older operating system where you are still permitted to do fun stuff with assembly.

  4. #4
    Registered User
    Join Date
    Oct 2011
    Posts
    847
    Quote Originally Posted by Subsonics View Post
    I can see some justification for using older tools if they also use an older operating system where you are still permitted to do fun stuff with assembly.
    Really, honestly?

    Why not use Linux instead? Everything you learn there is applicable to current systems, and not just some no-longer-irrelevant proprietary OS nobody uses anymore. You can find Linux on just about everywhere, from toasters to supercomputers. Not only is it free, but it is relevant, too. And you are permitted to do absolutely anything you want, unlike those proprietary operating systems people so love to enslave themselves to. Dammit.

    Spend the license fees on something like a Teensy ($16) or STM32F4Discovery ($17), buy a 1000-pack of LEDs and suitable resistors, and you can actually start making something tangible with that assembly, even if it is just a few flickering leds. Throw in some push buttons, and with the Teensy you can build a keyboard, or a gaming controller.

    I'm assuming you don't suggest pirating the compiler just because it is not for sale anymore, do you? Thanks to Disney et. al. U.S. corporations, the copyrights won't expire for decades yet, even if the works are no longer for sale anywhere.

    If you don't want to mess with something as fun as microcontrollers (take a look at Sylvia's Mini Maker Show before you say it's too complicated), just have an assembly course revolve around writing basic bignum (multiprecision natural number) operations in assembly, and compare the implementations to C or C++ implementations or the GNU MP library.

    Just think how smooth the transition and interesting the lectures are, if you start with something like C, showing the assembly generated from a simple C program, and instruct via example, switching between a higher level language and the corresponding assembly; explaining the concepts and paradigms and limitations in parallel to actual hands-on experience.

    I just get very frustrated when I see students' time wasted on useless crap, simply because their instructor has not kept themselves up to date. It is definitely not a question of finances, since all my suggestions are free -- apart from the microcontrollers, although it's very easy to get someone to sponsor a bunch for a class, since they're so darn cheap anyway. It is only about the human effort. And an instructor who somehow does not have the time to keep their skills up to date, has absolutely no place to instruct anyone!

  5. #5
    Registered User
    Join Date
    Jan 2009
    Posts
    1,485
    Quote Originally Posted by Nominal Animal View Post
    Really, honestly?

    Why not use Linux instead? Everything you learn there is applicable to current systems, and not just some no-longer-irrelevant proprietary OS nobody uses anymore. You can find Linux on just about everywhere, from toasters to supercomputers. Not only is it free, but it is relevant, too. And you are permitted to do absolutely anything you want, unlike those proprietary operating systems people so love to enslave themselves to. Dammit.
    I have seen that suggestion before, the idea is to have no userspace / kernelspace separation, memory mapped io and so on instead of rely on making system calls and learning more complicated calling conventions. The idea I suppose is to teach concepts, not any particular platform or assembler, keeping it simple would allow for this imo, you could argue that the same could be achieved with 6502 or z80 assembly in an emulator or perhaps using something like quemu and restrict yourself to BIOS interrupts.

    Quote Originally Posted by Nominal Animal View Post
    I just get very frustrated when I see students' time wasted on useless crap, simply because their instructor has not kept themselves up to date.
    I agree with this when there is a current portable standard in use, don't use an older outdated one, with assembly that notion is out the window anyway.
    Last edited by Subsonics; 10-24-2012 at 09:27 AM.

  6. #6
    Registered User
    Join Date
    Oct 2011
    Posts
    847
    Quote Originally Posted by Subsonics View Post
    I have seen that suggestion before, the idea is to have no userspace / kernelspace separation, memory mapped io and so on instead of rely on making system calls and learning more complicated calling conventions. The idea I suppose is to teach concepts, not any particular platform or assembler, keeping it simple would allow for this imo, you could argue that the same could be achieved with 6502 or z80 assembly in an emulator or perhaps using something like quemu and restrict yourself to BIOS interrupts.
    Ah, now I see what you referred to. I apologize, I misunderstood what you meant. My fault.

    Yes, that approach might be useful.

    But, wouldn't it be more realistic to use something like a STM32F4Discovery kit, that has a Cortex M4 architecture, programmed from a nice graphical workstation connected via USB to the kit? (Not limited to any specific OS, either.)

    Like I said, it might be more motivating for the students to have something hands-on, and to know that whatever they learn now, is directly applicable to real world, since their smartphone (if they have one) runs on either the same, or a very similar, architecture. (Besides, that kit already has acceleration sensors and audio output, so you can do pretty fun stuff with it too.)

    At less than $20 apiece ($15 unit price, 17 € where I got mine from Germany) the price should not be an issue.

    Quote Originally Posted by Subsonics View Post
    I agree with this when there is a current portable standard in use, don't use an older outdated one, with assembly that notion is out the window anyway.
    Well, even if one does not write much assembly, the ability to read it is certainly useful when profiling and analyzing a performance-critical application. It has been a very useful skill for me -- indirectly.

    Personally, just about all the assembly I nowadays write, is inline: architecture-optimized versions of functions I already have in C. I've drifted to using GCC vector extensions for most of my SSE2/SSE3 math (as then the compiler does the final optimization passes to that code too), so I get to write very little assembly nowadays. (I don't have an AVX-capable CPU yet , my current machine has an Athlon II X4 640.)

    I do still compile any bottlenecks to assembly, and see if there is a different approach that gets compiled to better code, and it sometimes gives me new ideas (sometimes up to the algorithm level), so it does seem to be useful skill. Not something I'd recommend to everyone, but if you work on tight embedded devices or performance-critical code, then assembly knowledge seems to come in handy. (Which, now that I think about it, means that using outdated proprietaty tools to learn it is doubly vexing.)

  7. #7
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,183
    STM32 is actually fairly complicated to set up, with all the PLLs and clock gating. Though at least it has a flat memory map thanks to 32-bit addressing space.

  8. #8
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,460
    Quote Originally Posted by Nominal Animal View Post
    Ah, now I see what you referred to. I apologize, I misunderstood what you meant. My fault.

    Yes, that approach might be useful.
    That is fine. But don't go on about denying any use for studying old systems and technologies. There's a whole world of legacy systems out there that still need to be maintained. Many of these are the foundation by which modern systems were built and are still relevant as part of any technological course worth its salt. Although, for sure I agree the OP situation is too much.

    Quote Originally Posted by Nominal Animal View Post
    Like I said, it might be more motivating for the students to have something hands-on, and to know that whatever they learn now, is directly applicable to real world, since their smartphone (if they have one) runs on either the same, or a very similar, architecture.
    I won't entirely disagree. However I support a different approach to university teaching. The time of study motivation has gone. Let's leave that for high school, alright?
    Students reaching this stage have (or should have) decided on a profession and that's their real motivation there. Study at this level should be about knowledge, not pampering.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  9. #9
    Registered User
    Join Date
    Oct 2011
    Posts
    847
    Quote Originally Posted by Mario F. View Post
    But don't go on about denying any use for studying old systems and technologies.
    Studying legacy systems is a completely different thing than using legacy systems to learn assembly/C/programming in general.

    Quote Originally Posted by Mario F. View Post
    There's a whole world of legacy systems out there that still need to be maintained.
    Oh yes, and skills to maintain them should be carefully cultivated. That has nothing to do with the current topic, however: learning assembly.

    Trying to learn modern skills on a proprietary, legacy system, is bonkers. Relevant hardware is cheap enough to not be an issue, and the programming tools are free.

    Quote Originally Posted by Mario F. View Post
    However I support a different approach to university teaching. The time of study motivation has gone. Let's leave that for high school, alright?
    Students reaching this stage have (or should have) decided on a profession and that's their real motivation there. Study at this level should be about knowledge, not pampering.
    Are you sure? "Pampering" has nothing to do with motivation/motivating. Besides, the only thing I learned in high school was how to drink booze, and annoy the hell out of not-so-well-balanced teachers.

    Because humans are social animals, learning and intellectual capabilities are tightly coupled to momentary motivation and interest: it is brain chemistry. Hands-on experience and surprising or at least unanticipated results have a profound biological effect that can be harnessed. If you, the lecturer, make it interesting and motivating and let your student discover stuff for themselves, you'll get better learning results -- no matter what kinds of humans you're working with.

    While you might think that "true learning" is only gained in a quiet dusty hall with your nose deep in a book without any illustrations, the sides of your palms stained with ink from your notes -- or, (shudder), listening to world-renown scientist meanderingly blathering on about research they did years ago, mostly remembering any details based on what others have written about it afterwards --, that belief really does not match real world results. Sure, a theoretical background is important, but at the university level, you can have that as a prerequisite; if the students don't bother to read the background materials prior to the course, they're unlikely to keep up, and will fail. Good riddance, I say.

    There is simply no replacement for exercises. In my experience, you learn most of the stuff in physics and math while doing the exercises (on your own, or in a study group), not during the lectures. Sure, the insights a typical lecturer gives will help you understand the information in the lecture materials better, but it does not "give" you any skills. You have to develop those on your own. (I myself am one of those who places absolutely zero value on information retained; I only value the ability to apply information and skills towards problem-solving. Problems like discovering new stuff, or helping others to learn. I hate learning by rote, or memorization without understanding; it's just a colossal waste of time and effort in my opinion.)

    As a lecturer, the "learning results" you get in subjects like this is heavily dependent on the exercises you have, and how the exercises are processed/explained/solutions shown. If they're interesting or at least funny, you'll get better results. If you make it motivating and interesting, you'll get stellar results with even mediocre course materials.

    The other side, popularizing the typically very dense information in a course, in a way that most students get a complete and correct picture of the whole (and some of the details), is frustratingly difficult; I've only met two or three such lecturers. (I definitely don't have that kind of skill myself, and never will, but I seem to get good results in workshop-type situations.)

    Returning back to the current thread, using legacy proprietary tools in an effort to teach current programming languages is just nuts. It's like giving a photographer glass plates, eggs, and silver nitrate salts (or whatever), and expect them to learn something about photography. That's not teaching photography, that's teaching the history of photography -- which is completely different. (I think it might be a pretty good way to grab the attention when teaching the history of photography, but still, it's history, not photography.) The stuff we can teach about photography, the ways you can manipulate the information/impression conveyed via a photograph, that all requires modern tools, or you'll spend all your time in a red-lighted closet, limited to tools that don't allow you to see the possibilities currently known and available!

    The part I agreed to was having a clean, simple system without the complexities of current operating systems to learn assembly on. Microcontrollers and embedded devices are perfect for that, because they're both cheap and relevant. Many universities use simulators -- I've come across at least two different opcode simulators used to teach assembly in an architecture-independent fashion, but they're awfully dull. They're better than some proprietary legacy systems, but not as good as something hands-on.
    _ _ _

    Mario F., I hope none of the above offends you. I seem to be on a streak to ruffling feathers here, and I'd rather avoid that. My intention above is not to question you in any way, only to disagree and question what you wrote. I've explained above exactly why I disagree. My opinion does not matter, but if you disagree with my reasoning above, please do set me straight.

  10. #10
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,252
    Are you sure? "Pampering" has nothing to do with motivation/motivating. [...] They're better than some proprietary legacy systems, but not as good as something hands-on.
    O_o

    I read that entire thing as saying "Students best learn by practical application of modern theory.".

    I don't see how guiding a motivated student in proper research has anything to do with trying to motivate them into doing research.

    Just to be clear here, I read what Mario F. said as being about motivating a young student to learn which is the job of a teacher but not applying to the university level because any one at that level should be self-motivated.

    Soma

  11. #11
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,460
    Quote Originally Posted by Nominal Animal View Post
    Mario F., I hope none of the above offends you. I seem to be on a streak to ruffling feathers here, and I'd rather avoid that. My intention above is not to question you in any way, only to disagree and question what you wrote. I've explained above exactly why I disagree. My opinion does not matter, but if you disagree with my reasoning above, please do set me straight.
    No need to. These are all subjective matter. Opinion based on different experiences, culture, education, etc, generally won't just change on a forum debate. But to ease your concerns, I can assure you there's quite a few people here that will laugh out loud if they will hear me saying that. I too tend to be combative about my ideas. My advise is if that bothers some people here, don't concern yourself with it. There's nothing wrong in doing it, such as there's nothing wrong in not doing it. Don't feel guilty because some people get offended at your aggressiveness. As long as you remain civil, stick to your guns.

    One correction though, Knowledge-centric education such as the one I defend has nothing to do with dust hallways, boring books and monochord lectures. I do not support motivational teaching on a university setting. That's all. But you reminded me, and I agree, that the sorry state of current basic and high-school teaching a bit all around the globe, really doesn't leave much room for students to reach the university knowing exactly what they want and with a professional attitude to their studies.
    laserlight likes this.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  12. #12
    Registered User
    Join Date
    Oct 2011
    Posts
    847
    Quote Originally Posted by Mario F. View Post
    As long as you remain civil, stick to your guns.
    Thanks, I really appreciate that.

    Quote Originally Posted by Mario F. View Post
    One correction though, Knowledge-centric education such as the one I defend has nothing to do with dust hallways, boring books and monochord lectures.
    I do agree. I think they are just trappings held onto for reasons not related to education, usually social (prestige and plain opposition to change).

    I equated using TASM to learn assembly, to dusty hallways and boring books. TASM might be relevant if you were training legacy systems development/maintenance, say old embedded devices or robotics (didn't the shuttle use radiation shielded 80386 processors?), but it is not suitable for learning assembly in my opinion: too far removed from current systems capabilities.

    Quote Originally Posted by Mario F. View Post
    I do not support motivational teaching on a university setting.
    When I talk about "motivation", I mean it in the same sense as "rationale": as the answer to the question "why this approach" or "why this view to subject matter" or "why does this matter".

    By motivation, I definitely do not refer to any kinds of "rewards", or cheering students, keeping a friendly atmosphere, or spouting platitudes... That belongs somewhere else, maybe comprehensive school where kids are still forming their self-images (or whatever it is that makes them grow up sane and resilient and inquisitive; I dunno, my pedagogy-fu is weak and limited to adults).

  13. #13
    glo
    glo is offline
    Registered User
    Join Date
    May 2006
    Posts
    169
    Thanks for the suggestions,

    The architecture I study is 8086 and I'd really like to use nasm.
    The thing is, I can not assemble the hello world example my teacher assistant provided. It appears like the syntax is different between assemblers? So code that would work for tasm won't work for nasm? I'm still a bit confused.

  14. #14
    Registered User
    Join Date
    Oct 2011
    Posts
    847
    There are some small differences, yes, which means you may need some minor changes to get the code to compile. They are listed in the A general NASM guide for TASM coders and other ASM people I linked to earlier.

    It's been well over a decade I've last used TASM, so I'm sorry I cannot give you a concise list myself.

  15. #15
    Registered User
    Join Date
    Nov 2012
    Location
    Some rock floating in space...
    Posts
    32

    Arrow

    Quote Originally Posted by glo View Post
    Hi there

    I'm taking a course in assembly for my computer science degree.

    I was very surprised to see the requirement to download a list of programs that date back to 1997: tasm, borland, etc!

    Is there an alternative for tasm? One that would work under my Win7 64 bit and still be compatible with tasm?

    Thanks
    glo
    Is Turbo Assembler still even being sold now? You'd be hard pressed to find a copy of it without resorting to file sharing networks... which isn't a good idea if you don't like viruses.

    You might be able to find a used copy in good condition from some used software vendor on the internet. But you'd probably pay a pretty penny for it.

    If you're looking for something which supports the Turbo Assembler Syntax, then there's The Lazy Assembler which has been updated to support some of the newer instruction extensions like MMX SSE etc.

    But The Lazy Assembler hasn't been updated since 2007

    NASM (Netwide Assembler) is your best bet. The syntax it supports is different than Turbo Assembler, but it's current and up-to-date and there's tons of documentation for it around the NET.

    There's even a 16-bit DOS target version of NASM available so you can write 16 bit code if you want... This version is a bit dated and is no longer maintained though.

    MASM is free on the other hand.. It comes with the Device-Driver Development Kit that microsoft has available on their network I think. It's not very well documented really, but there are tons of example programs around the net for it especially if you want to write 32-bit Windows programs with it.

    Best of luck

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Creating Interpreter for TASM from C++
    By vojadpirfit in forum C++ Programming
    Replies: 13
    Last Post: 04-18-2012, 03:09 PM
  2. TASM/turbo assambly
    By nuubik1337 in forum Tech Board
    Replies: 3
    Last Post: 12-14-2011, 02:24 PM
  3. How do I setup tasm with borland?
    By lox in forum C Programming
    Replies: 6
    Last Post: 07-11-2005, 09:44 PM
  4. TASM assembler
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 11-11-2003, 02:52 PM
  5. tasm board
    By Brian in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 12-01-2002, 02:08 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21