Shop OBEX P1 Docs P2 Docs Learn Events
Machine Language Tutorial! — Parallax Forums

Machine Language Tutorial!

deSilvadeSilva Posts: 2,967
edited 2011-03-13 13:02 in Propeller 1
Finally - The first version! And thank you all for your support!

The most recent update is this: Still fighting typos and smaller issues - no serious need you upgrade!

Important note:
In posting # ?? this thread contains a spanish translation by Joe "BOT" Red (first 50% at the moment!)
In posting # 2 this thread contains Potatohead's evolving "Assembly Language for the Absolute Beginner"

Both update their postings regularly!

Post Edited (deSilva) : 8/25/2007 11:40:34 PM GMT
«13

Comments

  • potatoheadpotatohead Posts: 10,253
    edited 2007-08-18 23:28
    From the PDF above:

    "Just BTW – you English readers have no idea how privileged you are
    to understand the excellent Parallax documentation written in your
    mother language. Do use this privilege!"

    Indeed!

    At deSilvas request, here is the current revision of the beginner PDF, with some changes / edits incorporated from comments received. The latest work will appear here from now on. Version 09 is in progress, and is the latest. I'm catching up some typos and adding an appendix or two.

    Version 09 now uploaded to the forum. New appendix information, and a few gotchas sent to me via e-mail. Addressing is a work in progress at the moment. The information added is useful, but not yet complete. As usual, gotchas, bugs and error corrections are more current in the latest version.

    Older versions are still here because there are links to them and not the thread.

    I'm giving Grahams tutorial a bit of love too --it's often missed. I got a lot out of this one! Helped me get a leg up at the beginning. Recommended.

    You can find it here: http://forums.parallax.com/forums/default.aspx?f=25&m=187621

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
    Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
    Safety Tip: Life is as good as YOU think it is!

    Post Edited (potatohead) : 12/9/2009 7:20:15 AM GMT
  • deSilvadeSilva Posts: 2,967
    edited 2007-08-19 00:35
    I uploaded a version 1.01 - it turned out the PDF-renderer produced a very tiny underscore with the Courier font, visible at 150% magnification only, certainly recognizable when printing, but not in the standard view.

    So I decided to remove underscores in the places where possible.
    However the underscore is an essential character in the assembly language, for subroutine returns, conditional prefixes, number separation etc.

    I have now substituted a minus for it in that places, which means you can no longer simply copy and paste some code! Sorry, maybe I shall find a better solution....

    Post Edited (deSilva) : 8/19/2007 12:40:48 AM GMT
  • potatoheadpotatohead Posts: 10,253
    edited 2007-08-19 01:02
    That's a major bummer. Try the Lucida Console font for the code elements. It's got way better hinting than the Courier one does.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2007-08-19 04:49
    Well done, indeed! burger.gif
    (Making do, we lack an applause emoticon)

    Post Edited (Fred Hawkins) : 8/19/2007 4:53:52 AM GMT
  • deSilvadeSilva Posts: 2,967
    edited 2007-08-19 09:07
    @Potatohead: Good hint! Works fine now, after 2 hours of stupid work :-(
    But I improved it on the fly - found 4 inconsistencies, and also spell Fred's name right now smile.gif


    I think I could risk another update, as long as America is deep asleep - OT: Do you know this:
    www.theonion.com/content/node/45792 Most ONION stuff is unreadeable, but this is one of their best smile.gif

    Changes:
    - I left an unfnished appendix in the version 1.2:
    "Pitfalls of SPIN" - all the funny things I encountered. I must really read through the sticky thread next month...
    - A major misunderstanding wrt the MUX instrcution has been fixed.

    This rendering issue with Courier turns up only, when having a background color in the boxes..
    Wish Microsoft could make something like "WYSIWYG" as sported by the Macintosh since 1984...

    Post Edited (deSilva) : 8/19/2007 12:22:19 PM GMT
  • ColeyColey Posts: 1,108
    edited 2007-08-19 09:34
    deSilva,

    Once again a BIG Thank You from me.

    That's the best thing about this forum, the time and effort people are willing to put in to assist others!

    Better than any other microcontroller forum I have been on.

    It is a professional and well laid out document, this should definitely be made as a sticky.

    Regards,

    Coley yeah.gif
  • potatoheadpotatohead Posts: 10,253
    edited 2007-08-19 14:43
    I do know the onion!

    Actually had not read that one. Thanks! Are those guys geniuses or what?

    Nicely done!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
  • Franz AchatzFranz Achatz Posts: 140
    edited 2007-08-19 15:27
    i have contacted Dr. K
  • rjo_rjo_ Posts: 1,825
    edited 2007-08-20 18:59
    deSilva,

    After I started reading through your Tutorial, I went to the German site. You guys are amazing. I was particularly happy to see that you are interested in the OpenEEG project... and am waiting to see what new and fabulous applications you create for the Propeller.

    I would also like to say how lucky the German audience is to have you translating the important information about the Propeller from English to German.

    Your tutorial is very clear... If I were you, I wouldn't worry about little editorial issues.
    I find the occasional syntax error to be part of the fun in reading your work.

    The only suggestion I would have is that you should define what "intermediate" level actually means... with reference to the major sections... for example.

    "Chapter 1".... if you don't know what $FF is in binary... you should read something else and come back.

    Same for the video chapters... I think you need a little section at the top..."If you don't understand "this or that"... then go to "here or there" to study and then come back."

    This is a minor point... but it will help the "wrong" reader from getting the idea that he/she will never understand what you are saying.

    Very, very good reading.

    Thanks,

    Rich
  • deSilvadeSilva Posts: 2,967
    edited 2007-08-20 19:45
    Thank you Rich!

    If I only had time....
    I started this in a German forum and translated it to English. The problem being: it is now out of sync. A re-translation is no good sport, I would "improve" it again, needing a re-translation to English ... Gosh!

    Intermediate means in the first place: Not for beginners!
    I become aware more and more - through this forum - that there are many misconceptions in the happy beginner wrt hardware features of the Prop. When you have worked some time with SPIN, these misconceptions will resolve one after the other. That's why I should like the reader to have gained some familiarity with SPIN first....

    Also: Propeller Assembly is interwoven with the the PropellerTool, using CON and DAT elements known to the SPIN programmer

    I had not the intention to walk through the hardware in the first place, but it's the merriment of most of this forum's clients.

    Applications for micro controllers can have so many aspects!

    I like your suggestion about "conditional reading". Thats how my "sidetracks" came into life.

    But Potatohead is also doing fine, and he "starts at the beginning".

    Post Edited (deSilva) : 8/20/2007 8:07:13 PM GMT
  • rjo_rjo_ Posts: 1,825
    edited 2007-08-20 20:26
    You might consider posting German version here... who knows you might get some help with your work!

    Ich don‘ spricht t Deutsch sehr gut, aber es gibt Russen, Spanier und Chinese hier, der macht.

    AND you might enjoy the attempted translations[noparse]:)[/noparse]

    Thanks again.

    Rich
  • GeorgeCollinsGeorgeCollins Posts: 132
    edited 2007-08-20 20:34
    I have been reading this over the weekend. This is very helpful-- thank you do much.
  • RinksCustomsRinksCustoms Posts: 531
    edited 2007-08-20 22:54
    rjo_ said...
    You might consider posting German version here... who knows you might get some help with your work!

    Ich don‘ spricht t Deutsch sehr gut, aber es gibt Russen, Spanier und Chinese hier, der macht.

    AND you might enjoy the attempted translations[noparse]:)[/noparse]

    Thanks again.

    Rich
    " I don't speak Dutch for sure, never got Russian, Spanish or Chineese either, their match?! "
    or was that a begining to a joke, "A German, a Rusky, a Spaniard, and a Chineese walk into a tavern... "tongue.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    E3 = Thought

    http://folding.stanford.edu/·- Donating some CPU/GPU downtime just might lead to a cure for cancer! My team stats.
  • edited 2007-08-21 14:46
    Great learning tool!!!.. I went to quickly check the forum late at night... I found this document and I was glued to the computer for 2 hours!!.. I love the way the document helps you to understand the basics and then leads you to more complex areas of Assembler... very important for the microcontroller/assembler newbies like me (I have no idea what POP and PUSH instructions are smile.gif highly recommended reading for the ones who are hesitant to learn assembler because they feel Prop Assembly is difficult to learn…

    DaSilva.. a HUGE HUGE THANKS from me…

    BTW… if there is enough interest, I will gladly translate this document to Spanish (with DaSilva's blessing of course) … Ok Spanish speaking Propeller Heads, please let me know…·· cool.gif

    Post Edited (Joe "Bot" Red) : 8/21/2007 3:01:54 PM GMT
  • deSilvadeSilva Posts: 2,967
    edited 2007-08-21 15:38
    @Joe Red
    (1) Thanks a lot!
    (2) There must be a spanish speaking group! We just know of BTX, but that can't be all.. This Forum has more than 1.000 (quiet) members...
    And be aware it is A LOT of work. I myself was absolutely astonished when I read: "39 pages". There will be 8 to 10 more to follow, but then it's completed... More or less smile.gif
  • edited 2007-08-21 15:56
    Hey deSilva.... I understand it is a lot of work to translate, but if there is enough interest, it will be worth the effort.. smile.gif anyway.. my translation offer is nothing compared to what you have done!.. you are right.. there are many Spanish speaking fellas in the forum... but the mayority is probably fluent in English too.. let see what their opinion is...

    Thanks again!..
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-08-21 16:59
    deSilva said...
    (2) There must be a spanish speaking group! We just know of BTX, but that can't be all.. This Forum has more than 1.000 (quiet) members...
    Very true, the number of Guests (people who are reading but are not signed in) typically outnumber the signed in people by 5 to 1 or more and up to half of them·read this forum.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • edited 2007-08-21 20:32
    Good point Paul.. Hey DeSilva... can you please IM me with a modifiable copy of the PDF?? , your posted PDF seems to be non-modifiable (locked by security settings) I would like to basically overwrite your original document paragraph by paragraph so I can keep the formatting and fonts (especially since you initially had fun with the fonts smile.gif

    Thanks!.. Jose
  • deSilvadeSilva Posts: 2,967
    edited 2007-08-21 21:56
    I see no problems to post the word file. I have not yet decided the copyright/copyleft situation, but it is obvious that I cannot keep Pandora's box closed.

    My main concern is, that the damn thing is not yet finished - But I am now quite confident that this can be done by adding rather than including what I have in mind...

    Edit: Removed Attachment

    Post Edited (deSilva) : 8/24/2007 7:48:49 AM GMT
  • edited 2007-08-22 02:31
    Ohh this is of great help!!!.. thanks!!!.. I was about to IM you.. I have been translating the PDF version, but the formatting was driving me nuts.. a Word doc is perfect!!!.. I have just 4 pages translated so far.. but it was the PDF format that was slowing me down.... I will keep you posted with my progress... smile.gif

    Post Edited (Joe "Bot" Red) : 8/22/2007 3:29:16 AM GMT
  • deSilvadeSilva Posts: 2,967
    edited 2007-08-22 21:37
    Joe - this looks excellent! I can read a little bit Spanish and you stayed very close to the original - thank you!

    But what is most important: You have to include a third title line:
    "Una traducci
  • edited 2007-08-23 02:41
    deSilva, I am glad you liked it!.. I tried to stay as close and true to your original document as possible, for two reasons, one is that whoever reads it in spanish gathers the same knowledge and flow of the tutorial as the original, and second is out of respect to your original tutorial effort ... smile.gif

    Again, many thanks for helping newbies like me on learning the powerful Propeller Assembly Language! smile.gif

    I will post a couple more translated pages tomorrow.

    PS.. I will be more than happy to include myself on the credits !! thanks!
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-08-23 23:58
    I have added this thread to the Software related sticky.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • deSilvadeSilva Posts: 2,967
    edited 2007-08-24 07:41
    Thank you, Paul. Note that this thread also contains Potatohead's evolving "Assembly Language for the Beginner", which is highly instructive for the persons "beginning from the start" (or is it: "starting from the beginning"?)

    Post Edited (deSilva) : 8/24/2007 8:02:19 AM GMT
  • epmoyerepmoyer Posts: 314
    edited 2007-08-24 19:42
    DeSilva,

    Excellent job on the doc! I'm glad to see this doc out in the community; there was a real need for it. Have you considered posting it on the Propeller Wiki? The wiki is here: propeller.wikispaces.com

    Thanks for all your hard work.
  • deSilvadeSilva Posts: 2,967
    edited 2007-08-24 20:18
    I obviously lost control about its whereabouts, but I do not care very much smile.gif However I still have three unfinished chapters here I should like to add before I myself "push" it....
  • deSilvadeSilva Posts: 2,967
    edited 2007-08-25 08:19
    @Joe: Can you please also include this section to the BNF-Sidetrack; I have been asked to elaborate on that further:
    deSilva said...

    BNF – Gee Wizz! But this is not for me !
    Wrong: It is JUST for you! You see this throughout many documentations, done sometimes sloppily (as with me above), and there are many variations. But this system to explain the syntax (or the structure) of many things is common knowledge in the world of serious programming. And it is most simple, indeed!

    There is something called terminals (No, it's not where you fly-off, but where you want to arrive at!): these are the symbols or graphics of the things you want to describe, the “building stones”. In the case of a computer language it’s numbers, letters, underscore, brackets, commas. In many cases you do not proceed to the last detail, you stick with “number” or “label”. Note however that this can exactly be what the reader wants to know badly: What EXCACTLY is a label? Can I use an underscore within? Or a dollar-sign? But you have the choice at which level of abstraction to stop in this process of concretisation…

    “number” and “label” are called – surprise, surprise! – non-terminals. So a BNF rule is nothing but an explanation how a specific non-terminal looks like.
    - ::= used to separate the non-terminal to be explained from the explanation
    - | means “or”, separates “choices”
    - ( … ) used to “cluster” parts of the explanations, especially when you have “choices”
    - [noparse][[/noparse] … ] marks an “option”, the part(s) within the brackets can be used but need not
    - ( ...)+ indicates optional repetition, one or many times
    - ( … )* or [noparse][[/noparse]...]* indicates an option that can be repeated, zero or many times

    Lots of symbols… But how do you distinguish non-terminals, terminals and those funny (meta-)symbols? You will see many styles:
    - include terminals in “ .. “, include non-terminals in < … >
    - include terminals in “…” only when they collide with the meta.symbols ([noparse]/noparse*+|)
    - write non-trerminals in small letters and CAPITALIZE terminals (that’s the way I did it)
    - other rules….

    I shall give just one example for a real number
    realNumber   ::= sign numberstring [noparse][[/noparse]&#8220;.&#8221; numberstring] [noparse][[/noparse]expPart]
    expPart      ::= (&#8220;E&#8221;|&#8221;e&#8221;) sign numberstring
    sign         ::= [noparse][[/noparse]&#8220;+&#8221;|&#8221;-&#8220;]
    numberstring ::= (0|1|2|3|4|5|6|7|8|9)+
    




    Obviously you can describe the syntax of the BNF in it’s own formalism J As always Wikipedia gives a good overview and further links. And if you are familiar with something called REGEX, you should have been at ease already all the time
    Post Edited (deSilva) : 8/25/2007 10:40:47 AM GMT
  • edited 2007-08-25 14:30
    Sure!! my pleasure!!.. I am half way done through the translation... I will post an update shortly!

    Ok.. here it is up to page 27,·close to 70% translated·· :-)

    updated to· page 29·· on· 10/5/2007....·· :-)

    Post Edited (Joe "Bot" Red) : 10/5/2007 6:59:32 PM GMT
  • deSilvadeSilva Posts: 2,967
    edited 2007-08-25 23:37
    Joe, please delete your former attachment .- it might lead to confusion when you offer both downloads!!
  • edited 2007-08-26 02:06
    hey deSilva... it is done... former Spanish translation entry has been deleted... however, I am concerned about one issue, and it is about the multi lingual nature of this thread, and I am certain Paul's valuable help is in need here: Your tutorial is a fine example of true selfness and wilingness to help others in the unfounded intimidating nature of Propeller Assembler, BUT, it seems to me that a separate Spanish Thread in the Sticky section would be of great help, not only because the limited Spanish related documentation (including my spanish translation of your assembler tutorial) would usually harder to find. And if you are asking yourself: why? the simple reason is: all the forum threads are in English, so a search at search.parallax.com using spanish words won't return many hits, probably missing your spanish translated tutorial and many other useful docs. Perhaps a separate Spanish Main Forum link will help expand the Spanish speaking community at the Parallax forums... just an idea...
Sign In or Register to comment.