Shop OBEX P1 Docs P2 Docs Learn Events
Assembly tips — Parallax Forums

Assembly tips

WaldoDTDWaldoDTD Posts: 142
edited 2004-11-14 01:39 in General Discussion
Does anyone have any tips for learning Assembly Language is there a nationwide class program thing?-hacker

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2004-11-11 17:25
    Each micro-processor has its own Assembly Language. Thus each 'class' will be specific to a particular processor. There won't really be a 'nationwide class' kind of thing. Each vendor will have their own documentation and examples.

    Having said that, every micro-processor does share some commonalities with every other processor. They all move data from register to register, register to memory, they all have a 'stack' of some sort, etc. They'll all use different syntax (different commands) to do these things.

    There are a couple of ways to go about this for PIC processors. One is to purchase the www.picant.com/c2c package. This will let you code in 'C' (or Pascal, or C++), compile the result into PIC assembly (which you can read), then single-step the PIC assembly under a simulator with simulated LED's, switches, etc.

    Another approach would be to purchase the SK Tech Tool Kit from Parallax. With a full set of hardware for debugging, the SX/B language does in PBasic what the C2C package does in C.

    That takes care of the PIC and SX processors. Note there are the Z80, 8051, ATMEL-AVR, and Hitachi (Renesas) H8 processors also currently in use. Not to mention the 6502, Motorola HC11, etc.

    But I assume you want to start somewhere, and keep your expenses low, so the C2C or the SX route is what I would recommend.
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2004-11-11 18:06
    Hey,

    reading this thread, my "pre-Assembly Language time" comes back to my mind. I had a KIM-1 board at that time with a 6502 microprocessor, and you could only type in programs in hex code via a keypad. Thus, you had to "hand-assemble" the programs before typing them in. I can only remember that the hex code for RTS (return from subroutine) was 0x60 smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,


    G
  • BeanBean Posts: 8,129
    edited 2004-11-12 00:48
    I started on Z-80 assembly (on a timex sinclair 1000), but as Allan said most assembly is similar.
    I would recommend the SX Tech Kit because you can use SX/B and it shows you the basic code right beside the assembly code it generates.
    I can post an example if you want one. Just let me know.

    Bean.
  • peterjpeterj Posts: 24
    edited 2004-11-12 23:16
    I also learned first assembly on the 6502, though I had the benefit of a real assembler for my Apple ][noparse][[/noparse]. The first book I got was the classic McGraw Hill text (black cover with orange lettering, I cannot remember the author's name) but a lot of it was over my head at the time. A short while later I discovered Roger Wagner's "Assembly Lines" series in SofTalk magazine, and later picked up "Assembly Lines, The Book" which was a compilation fo the first dozen-odd articles plus a nice set of appendices. This book is the best introduction to assembly language that I have ever found anywhere, and it puts even the closest runners-up to shame.

    The books that come with the SX-Tech toolkit are certainly some of the better books out there when it comes to teaching assembly for microcontrollers, but both still leave quite a bit to be desired as far as I am concerned. But between the two I was able to muddle through. Generally I find 3rd party books to be vastly more readable than the mfgrs. data sheets, but this is not the case with the Ubicom chips. I say this not to knock the books, but rather so say just how good the Ubicom documentation is. The datasheet for the SX28 is one of the most lucid and readable datasheets I've ever seen and I find the Ubicom SX Family User's Manual an excellent source for reference. (Both of these can be downloaded from the parallax web site.)

    -p.
  • WaldoDTDWaldoDTD Posts: 142
    edited 2004-11-13 20:47
    Where can I find this compilation?
  • Ken GraceyKen Gracey Posts: 7,401
    edited 2004-11-14 01:39
    Hacker,

    http://www.parallax.com/sx/index.asp is our home page for the SX.

    http://www.parallax.com/sx/downloads.asp is the downloads.

    Ken Gracey
    Parallax, Inc.
Sign In or Register to comment.