Assembly Guru : Question


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818

    Default Assembly Guru : Question

    Hello,
    My question is: What assembly language, style does the PIC use?
    <br>
    I have a book about assembly Language for the 8088 / Z80 processors and there some very different statements fot those 2. I need to learn some assembly, so as not to stay an assembly Dummy.
    <br>
    Anyone have recommendations as to study material?
    <br>
    Thanks, JS
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    PIC use Microchip assembler, nothing really like Z80, 8080 or else. Every datasheet state the available assembler mnemonics in.

    Free online book
    http://www.mikroe.com/en/books/picbook/picbook.htm
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Thank You

    Quote Originally Posted by mister_e View Post
    PIC use Microchip assembler, nothing really like Z80, 8080 or else. Every datasheet state the available assembler mnemonics in.

    Free online book
    http://www.mikroe.com/en/books/picbook/picbook.htm
    Thank You mister_e , I was aware of this online book, but too _ _ _ _ _ _ (pick your adjective) to print it out and use it. Now I have it printed, I will study it and , hopefully learn it's secrets!
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Forget the Books!

    Quote Originally Posted by Joe S.
    Anyone have recommendations as to study material?
    1. The datasheets. The "Instruction Set" section lists each opcode and what it does.
    2. The .ASM file generated by PBP
    3. The .LST file generated by the assembler.
    4. PBPPIC14.LIB / PBPPIC14.MAC
      -or- PBPPIC18.LIB /PBPPIC18.MAC files. (depending on the PIC you are using)

    I've looked at other PIC assembler books, and the one thing they all lack, is how to use assembly language with PicBasic Pro.
    It's not the same.

    I don't think I could even write a working program in straight assembly language. Mostly because I used the same list of items shown above myself, to learn ASM with PBP.

    PBP, doesn't really write any ASM. Instead it converts your Basic program into a series of macros that are at a level in-between Basic and assembly language.
    If you want to use ASM with PicBasic Pro, then this is the area you need to learn the most.
    You can actually work at the macro level, without knowing any of the 35 opcodes that the PIC uses (a few more for 18F's).

    Since you already know a lot about PBP, the easiest way will be to just create small programs. (blinky lights, or simple A/D conversions)
    Compile the program with PBP then open up the .ASM file that has the same name as your program. There you can see how it converted the Basic language statements into the "Macro" language. Then make small changes to the program, and see how the macro's change.

    Once you know what macros are used, you can look them up in the PBP1xPIC.LIB and .MAC files to see the actual Assembly language Opcodes used. When you come up on an opcode that you aren't familiar with, look it up in the datasheet. Since you already know what it's supposed to do (you wrote the PBP program) it makes it much easier to understand how the opcode works. Reading a book doesn't give you that "Edge".

    It's also a little like an interactive book.
    Instead of getting stuck because the author left something out.
    You can just make another test program in PBP to see how it ends up in ASM.

    I never did use anything out of those other books.
    It just didn't apply to PicBasic Pro.

    HTH,
    DT

  5. #5
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Post

    I think in years to come the only people using ASM will be Kernel programmers.

  6. #6
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    [list=1]

    I never did use anything out of those other books.
    It just didn't apply to PicBasic Pro.

    HTH,
    Hi Darrel,
    Hmmmmmmmn, Good to know, save my money too , Very good thing! That is pretty much how I have learned everything else I know, keep taking it apart to see what makes it tick. I just sort of thought there might be a <font color=red>college boy</font color> way that was more expedient. At least I am familiar with this path. ThankYou for the heads up!<br> I just want to understand what programs do at the machine's level when you or Mr_e or others post assy code examples and helpers. Probably I need to get sharper with PBP before wandering into the woods . . .
    Thanks again,
    JS
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Similar Threads

  1. from assembly to basic
    By shantanu in forum Off Topic
    Replies: 4
    Last Post: - 1st February 2007, 15:50
  2. PIC16F684 Program question
    By Nicholas in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th December 2006, 15:30
  3. Question for a math guru
    By Christopher4187 in forum General
    Replies: 3
    Last Post: - 22nd November 2006, 10:45
  4. Please answer my first question
    By John_001 in forum Off Topic
    Replies: 1
    Last Post: - 15th September 2006, 07:49
  5. How do you do this in Assembly
    By ice in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 10th May 2005, 07:47

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts