Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Assembly for beginners - Page 26 — Parallax Forums

Propeller Assembly for beginners

12324262829

Comments

  • Heater.Heater. Posts: 21,230
    edited 2013-03-23 09:43
    Harpit,

    No idea about the first question as I don't use the Prop tool. For sure the other tools, BST etc, will tell you your program is too big when you try to put it in your Prop. Easy.

    Your second question makes no sense to me at all. When you call a method that is how your program flow goes. Never mind what is or is not included in the HUB image.

    However, users of the Prop Tool from Parallax are used to the idea that all the code they write ends up compiled and included into the HUB image that gets down loaded to the Prop. No matter if some methods are never used in the running program.

    BST users, on the other hand, may be used to the idea that BST has an option to not include methods that are not actually called somewhere in the program. Thus saving HUB space when methods are unused.

    For beginners there is no such information provided because including all the code you write is what the Prop Tool puts in HUB and is the simplest thing to expect it to do.

    By the time you get to filling up your Propeller you are no longer a beginner and end up here on the forum asking such questions. At which point you may get directed to BST or HomeSpun which are not Parallax products.
  • HarpritHarprit Posts: 539
    edited 2013-03-23 12:26
    Thank you heater.

    The books just arrived at my house.
    Too late to mail today
    Will go out on Monday, first thing.

    Thank you again to every one that helped me get the job done.

    Harprit
  • TecKidata54TecKidata54 Posts: 1
    edited 2013-03-23 13:21
    Propeller Assembly Language:(http://www.parallax.com/portals/0/propellerqna/Content/QnaTopics/QnaAssembly.htm)
    Notable Propeller Assembly:(http://www.parallax.com/portals/0/propellerqna/Content/QnaTopics/QnaAssembly.htm)
    Where does Assembly code reside and where does it get processed:(http://www.parallax.com/portals/0/propellerqna/Content/QnaTopics/QnaAssembly.htm)
    How to indicate the end of Assembly code?" " " "
  • HarpritHarprit Posts: 539
    edited 2013-03-28 14:16
    Thank you Tek.

    The first batch of books have been mailed with 80 pages of documented code in a file .
    Parallax was sent a copy. They have ackowledged receipt.
    Turns out postage in US is $3
    Canada $11. I charged nothing extra
    Rest of the world $22. I charged $10 only
    Hope we have some reviews by the end of next week
    That should do it for now.
    H
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2013-04-06 07:29
    @ Harprit

    My book arrived, thanks! for that. It looks good and although my time is limited I've started to dig in. :)


    I did notice a reference to a
    Professional Development Board (PDB) (pages 37,39,40 to mention a few)

    Listed in the Parallax Store here:
    http://www.parallax.com/Store/Microcontrollers/BASICStampModules/tabid/134/ProductID/123/List/1/Default.aspx?SortField=UnitCost,ProductName

    Professional Development Board (#28138)
    The Parallax Professional Development Board (PDB) is high-quality, fully-integrated development platform
    for BASIC Stamp®
    , Javelin Stamp™, and SX28AC/DP microcontrollers. A wide variety of typical I/O
    (LEDs, LCD interface, buttons, etc.) devices and circuitry are built into the PDB, providing the developer
    with an ideal platform for rapid microcontroller project development



    but of course it is showing a picture of the
    Propeller Professional Development Board (PPDB)

    Listed in the Parallax Store here:

    http://www.parallax.com/Portals/0/Downloads/docs/prod/prop/32111-Propeller%20Professional%20Development%20Board.pdf

    Propeller™ Professional Development Board
    (#32111)
    Introduction
    The Propeller Professional Development Board (PPDB) is a high-quality, fully-integrated development
    platform for the Propeller microcontroller. A wide variety of typical I/O (LEDs, Buttons, etc.) devices and
    circuitry are built into the PPDB, providing the developer with an ideal platform for rapid Propeller project

    I think that most people would figure it out before they ordered a board and get the incorrect one but I thought I would mention it just in case.

    Ok, back to learning. :)
  • SteveWoodroughSteveWoodrough Posts: 190
    edited 2013-04-07 18:08
    For what it's worth, I transferred Harprit’s PASM code from the Open Office document to standard SPIN files. I tried to be careful during the copy procress, but I make no guarantees as I have not tested each file and even if I did, I still don’t really know what I am doing!
    Regards,
    Steve
  • HarpritHarprit Posts: 539
    edited 2013-04-08 11:20
    I could not open Steves' file so I do not know if it is good bad or indifferent.

    However, the close to 100 pages of heavily documented code in the original file,
    that is being provided to all book recipients, is very closely
    referenced to and from the text pages and is not suitable
    for stand alone viewing. It will not make much sense without the text.
    It supports the text in this particular book only.
    All the code can be cut and pasted to the propeller tool and all formatting
    will be preserved if it is left as is.
    It does not have to be converted to anything.
    If Steve can withdraw his post I request that he do so.
    It will only add to the confusion in a not easy to understand subject.
    If errata are issued they will reference only the original file.

    Harprit.
  • User NameUser Name Posts: 1,451
    edited 2013-04-08 12:04
    Harprit wrote: »
    I could not open Steves' file so I do not know if it is good bad or indifferent.

    FWIW, it opened fine here. If it's copyrighted, though, perhaps it shouldn't be made available this way. I haven't purchased a book. I was just intrigued because Harprit said it wouldn't open.
  • HarpritHarprit Posts: 539
    edited 2013-04-08 12:47
    Confession!
    It would not open for me because for other software I have needs an old Op Sys.
    I am still running Windows 2000!!!!
    My archaic versions of AutoCad and Pro-E ($10,000 or so to update) need the older Op Sys.
    The files are probably just fine but will not reflect any updates I issue
    Besides, we don't need more than one set of files floating around.
    Removal would be prudent.
    H
  • HarpritHarprit Posts: 539
    edited 2013-05-02 10:36
    A box of books has been sent to Parallax for sale at the upcoming Expo in CA.

    H
  • AlarusAlarus Posts: 48
    edited 2013-06-23 22:33
    How to set / reset C(Z) flag on PASM?
  • kuronekokuroneko Posts: 3,623
    edited 2013-06-23 22:39
    Alarus wrote: »
    How to set / reset C(Z) flag on PASM?
    http://forums.parallax.com/showthread.php/108002-Direct-flag-manipulation-in-assembler-(errors-noted)

    Is it really so difficult (to figure out)? Especially Z ...
  • AlarusAlarus Posts: 48
    edited 2013-06-23 23:06
    Thank you, Kuroneko!
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-06-26 09:53
    Hmmm... I wonder if Assembly for beginners on the Propeller would be a more appealing focus that Propeller Assembly for beginners.

    You may think I am being silly or clever, but the beginner really wants to be empowered by a general overview, not just one platform at a time.
  • PublisonPublison Posts: 12,366
    edited 2013-06-26 10:19
    Hmmm... I wonder if Assembly for beginners on the Propeller would be a more appealing focus that Propeller Assembly for beginners.

    You may think I am being silly or clever, but the beginner really wants to be empowered by a general overview, not just one platform at a time.

    I would have to respectfully submit that this is a Parallax forum, and a Propeller sub forum. It IS platform specific. If someone was looking for help with PASM, this is where they would come.

    General assembler questions could be answered here:

    http://en.wikipedia.org/wiki/Assembly_language

  • AlarusAlarus Posts: 48
    edited 2013-06-30 20:17
    Prompt please, fast algorithm for translation from ASCII to HEX?
    I just came up with this:
                                    cmp     data,#$30                               wc                                                      
                  if_b              jmp     #Error                                            
                                    cmp     data,#$3A                               wc            
                  if_b              sub     data,#$30
                  if_b              jmp     #:end
                                    cmp     data,#$41                               wc
                  if_b              jmp     #Error
                                    cmp     data,#$47                               wc
                  if_ae             jmp     #Error                                
                                    sub     data,#$37                                            
    :end
    
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-06-30 20:49
    Alarus: I am not quite sure what you are trying to achieve from the sample.

    Here is some of my code from my P2 debugger which may help (note cmpr is not a valid instruction on P1)
    _LmmAscii          
                    cmp     lmm_x, #" "             wc      ' c if <$20: visible?
            if_nc   cmpr    lmm_x, #"~"             wc      ' c if >$7E: visible?  <---- you will need to change this to a cmp
            if_nc   jmp     #visible                              ' visible so display
                    mov     lmm_v, lmm_x                    ' save char
                    mov     lmm_x, #"<"                     ' "<"
                    CALL    DisplayChar 
                    shl     lmm_v, #24                      ' prep for displaying 2 hex nibbles
                   CALL    DisplayNibble
                   CALL    DisplayNibble
                    mov     lmm_x, #">"                     ' ">"
                   CALL    DisplayChar
    
    
    DisplayNibble
                    rol     lmm_v, #4                       ' to next nibble
                    mov     lmm_x, lmm_v                    ' copy value
                    and     lmm_x, #$0F                     ' extract nibble
                    or      lmm_x, #"0"                     ' make numeric
                    cmp     lmm_x,#":"              wc      ' c if <$3A
            if_nc   add     lmm_x,#("A"-"9"-1)              ' convert to A-F if reqd
                   CALL    DisplayChar
    DisplayNibble_ret
                   ret
    
    
  • kuronekokuroneko Posts: 3,623
    edited 2013-06-30 23:41
    Alarus wrote: »
    Prompt please, fast algorithm for translation from ASCII to HEX?
    Without range checking (data in {$30..$39, $41..$46}):
    cmpsub  data, #$30              ' $30..$39 >> $00..$09, $41..$46 >> $11..$16
                    cmp     data, #$10 wc
            if_nc   sub     data, #$07              '                       $11..$16 >> $0A..$0F
    


    Update: if the input can get away with lower case (e.g. 'a'..'f') the this will do:
    cmpsub  data, #$57 wc           ' $30..$39 >> $30..$39, $61..$66 >> $0A..$0F
            if_nc   sub     data, #$30              ' $30..$39 >> $00..$09
    
  • AlarusAlarus Posts: 48
    edited 2013-07-02 19:32
    Thank you!
              cmpsub  data, #$30              ' $30..$39 >> $00..$09, $41..$46 >> $11..$16                 
              cmp     data, #$11 wc           'can compare to #$11
    if_nc     sub     data, #$07              '                       $11..$16 >> $0A..$0F
    
  • AlarusAlarus Posts: 48
    edited 2013-07-21 22:36
    Reduced code in ASCII2HEX up to 40 cycles.
    ASCII2HEX                       cmp     data,#$47                               wc                                              
                  if_c              cmpsub  data,#$30                               wc              
                  if_nc             jmp     #Error                            
                                    cmp     data,#$0A                               wc                                
                                    muxnc   $,$                                     wc,nr
                  if_c              sub     data,#$07
                  if_c              cmp     data,#$0A                               wc
                  if_c              jmp     #Error                                                                                                     
    ASCII2HEX_ret                   ret
    
  • kuronekokuroneko Posts: 3,623
    edited 2013-07-21 23:44
    I wouldn't bother with carry reversal (muxnc) just use it as an early exit for "0".."9".
    A2H             cmp     data, #$47 wc           ' nc: > F                                                                       
            if_c    cmpsub  data, #$30 wc           ' $00..$09, *, $11..$16
            if_nc   jmp     #Error       
                                
                    cmp     data, #$0A wc                               
            if_c    jmp     A2H_ret                 ' $00..$09
    
                    sub     data, #$07
                    cmp     data, #$0A wc
    A2H_ret if_nc   ret                             ' $0A..$0F
                    jmp     #Error
    
  • RsadeikaRsadeika Posts: 3,824
    edited 2013-09-04 11:59
    So, how is the book coming along?

    Ray
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2013-09-04 19:13
    @ Rsadeika

    It's available. You can contact Harprit through his profile above..

    Bob
  • HarpritHarprit Posts: 539
    edited 2013-09-06 17:42
    The book is still available. $30.00 Postpaid total
    Paypal only to harprit.sandhu@gmail.com
    H
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-09-08 22:36
    Publison wrote: »
    I would have to respectfully submit that this is a Parallax forum, and a Propeller sub forum. It IS platform specific. If someone was looking for help with PASM, this is where they would come.

    General assembler questions could be answered here:

    http://en.wikipedia.org/wiki/Assembly_language


    Well, each to his own point of view.

    I personally did not make much headway with Assembly Language programming on the SX chip or the Propeller until I grasped that Loops were backward branches and that is why machine language doesn't include looping.

    Procedural tutorials for one platform tend to not always provide empowering overview.

    New users just might also come to the Propeller to learn Assember because Parallax provides a more informative approach rather than 'what others do'. Everyone in the world provides a 'platform specific' tutorial for assembler for their in-house product.

    But Parallax claims to have an educational mission. Teach the fundamentals and concepts that allow transferable skills to be applied may not please 'the marketing department', but it just may be translated into more popularity and more actual cash paying customers.

    I mentioned this because I think it would be good for Parallax's bottom line.

    Users flocked to the BasicStamp2 because it was informative.
  • RickBRickB Posts: 395
    edited 2013-11-25 13:27
    Has anyone published a serious review of this book?
  • RickBRickB Posts: 395
    edited 2013-11-29 13:00
    The deafening silence speaks volumes.
    The only reference to this book found by Google is in this thread.
    Is anyone (other than the author) willing to comment on the quality of the book for its intended audience?

    Rick
  • __red____red__ Posts: 470
    edited 2013-11-29 18:15
    Honestly, I think it's rough and needs some serious editing before I would consider it of commercial quality. In many cases it feels like the author is repeating things he's seen in this thread and doesn't understand them himself. This may just be a styling issue which copy-editing could address but regardless, it was the impression I was left with.

    Admittedly, I came to the book as someone who became "dangerous" in PASM from these two tutorials: http://gadgetgangster.com/news/45-designer-news/275-propeller-assembly-tutorial.html



    Red
  • fataldavefataldave Posts: 61
    edited 2013-11-29 18:32
    __red__ wrote: »
    Honestly, I think it's rough and needs some serious editing before I would consider it of commercial quality. In many cases it feels like the author is repeating things he's seen in this thread and doesn't understand them himself. This may just be a styling issue which copy-editing could address but regardless, it was the impression I was left with.

    Admittedly, I came to the book as someone who became "dangerous" in PASM from these two tutorials: http://gadgetgangster.com/news/45-designer-news/275-propeller-assembly-tutorial.html



    Red

    I also picked up this book, I was looking for something on PASM and this was the only one I found. I have to agree with red, its current state is that of a draft, many spelling and general errors are distracting at least for me to keep with the flow of the book. There is also a little repetition as it seems things were moved around but the original part not removed. Overall I think it was helpful, I am about half way done with the book. It has a lot of well documented code and examples that are easy to follow.
  • cavelambcavelamb Posts: 720
    edited 2013-11-29 19:32
    Hmmm... I wonder if Assembly for beginners on the Propeller would be a more appealing focus that Propeller Assembly for beginners.

    You may think I am being silly or clever, but the beginner really wants to be empowered by a general overview, not just one platform at a time.

    kuroneko has been most helpful in trying to understand the details of programming this little jewel,
    but I'd agree with Loopy.

    I'm an experienced Assembly programmer.
    But PASM still eludes me.
    I just haven't found a starting point yet.
Sign In or Register to comment.