Thread: Should I use tasm?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    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
    Ticked and off
    Join Date
    Oct 2011
    Location
    La-la land
    Posts
    1,728
    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.

  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
    Ticked and off
    Join Date
    Oct 2011
    Location
    La-la land
    Posts
    1,728
    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
    Ticked and off
    Join Date
    Oct 2011
    Location
    La-la land
    Posts
    1,728
    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
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    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.
    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.

  8. #8
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    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.

  9. #9
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    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

  10. #10
    Ticked and off
    Join Date
    Oct 2011
    Location
    La-la land
    Posts
    1,728
    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.

  11. #11
    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, 03: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, 03:52 PM
  5. tasm board
    By Brian in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 12-01-2002, 03:08 PM