Shop OBEX P1 Docs P2 Docs Learn Events
Assembly Tutorials - I am willing to write is someone is willing teach... — Parallax Forums

Assembly Tutorials - I am willing to write is someone is willing teach...

Chris_DChris_D Posts: 305
edited 2009-02-23 19:56 in Propeller 1
Hi everyone,

As mentioned the other day, I am wanting to do some assembly language programming on the Propeller. I have skimmed through all of the references that were mentioned and have already picked up enough - just enough to get in trouble I am sure.··

Knowing how well this forum works with helping each other and how much the tutorials and such are placed in sticky notes, perhaps we can help each other out.

I am a fairly skilled basic programmer and am very much used to teaching other forms of programming to people and have done a bit of technical writing.· What I suggest is this...

I will post some questions along the way during the development of a routine or two.· Along with the questions I will post a basic program example of what I want to do and the code for what I think the assembly program should look like.· Then we discuss it and I will boil the explanations down into something that a rookie such as my self can understand.· I could then publish this in PDF and someone can put it in a sticky note or somewhere for others to learn from.

Does this sound good to anyone?

Chris

Comments

  • JohnBFJohnBF Posts: 107
    edited 2009-02-19 18:42
    Chris,

    My own background is actually quite similar to yours (plus work in web development - asp.net, vb, etc.) and I am also working to figure Propeller assembly from the various bits and pieces out there. Your idea sounds great to me. I would certainly benefit, and I'd be happy to join in to the extent that what I've learned so far is helpful.

    /John
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2009-02-19 18:45
    Hi Chris, that sounds good to me, something I want to learn more about ( at a very basic level ). Maybe if you get going with this you could take questions from a moderated "class" and try to answer/brainstorm ·their problems. Whichever way you go I will follow along with interest if I feel it's not out of my depth. There is still lots I don't know about Spin and the Propeller architecture I hope this is not too big a disadvantage.

    Jeff T.
  • Chris_DChris_D Posts: 305
    edited 2009-02-19 19:08
    Hi guys,

    Just to make sure I didn't confuse anyone ;-)

    I am an absolute beginner with Assembly programming.· We will VERY MUCH need the teachings of an experienced assembly person.· I will do my best to boil down the information that hopefully will help guide all of us beginners into the world of Assembly.· Without question, I will be asking for everyone to participate as each of us understands things at different levels.·The questions from rookies will be key to making the final documents effective!

    Chris
  • AleAle Posts: 2,363
    edited 2009-02-19 19:48
    There are here in forum several very well versed in assembly people. I may be one of them, I hope smile.gif. I'm willing to help. This could be written in the propeller wiki, so others could benefit from it.
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2009-02-19 19:58
    Chris, we already have some great tutorials in the stickies, as novices why not work through the tutorials and provide feedback to the teachers (and each other ) from the viewpoint of the pupils. I am sure there are methods in the tutorials that can be applied for your/our own needs with modification and perhaps someone will step in and provide advice from time to time. It could be structered in a way that anyone wanting to join the learning experience could enter at any time thus allowing the class to grow.

    I think working with others and the feedback on progress is sometimes a better way to learn. You could document the progress and the mistakes.

    Jeff T.

    EDIT: Ale , thats a generous offer and sounds great to me.
  • JohnBFJohnBF Posts: 107
    edited 2009-02-19 21:17
    I'm not sure if this is part of the plan, and I'm not sure this is exactly a PASM issue, but here's something I'm stuck on.

    I put together a routine that assigns a value to each of two longs, then runs an ASM routine which adds them, then reports back the result, then displays the result by blinking an LED that many times. Works fine.

    Then I want to enhance the program by entering one of the numbers (PST/FullDuplexSerialPlus). This does not work - the LED blinks infinitely whatever is entered. Can anyone see quickly what the dumb mistake is here?

    /John
  • Mike GreenMike Green Posts: 23,101
    edited 2009-02-19 21:27
    @JohnBF
    Do not "hijack" other peoples' threads. It's impolite, confuses things, and it's generally bad. Start your own thread!

    Probable mistakes in your 2nd program:
    1) Why set the mode parameter to 1? Why not leave it as 0?
    2) You assign "debug.rx" to one of the parameters. It returns a character code. It doesn't scan a string of digits and return their value.
    Consider using the "Extended FullDuplexSerial" object. This uses "FullDuplexSerial", but provides routines to scan in decimal and hex
    values and convert them to numeric values.
  • JohnBFJohnBF Posts: 107
    edited 2009-02-19 21:30
    Sorry, and thanks. /John
  • Chris_DChris_D Posts: 305
    edited 2009-02-20 11:30
    Ale,· Thanks very much for the offer, I will take advantage of it !

    Unsoundcode,· While I have only been into this for about 1 week, I may not have seen all the assembly language references, examples, or tutorials.· I am pretty sure there isn't anything from Parallax in the form of a book, tutorials, or other educational materials.· The existing user submitted examples are very helpful, but few in numbers.·

    I believe the community would benefit by having more examples and more explanations which is what I am trying to accomplish.· I especially feel strongly about making comparisons to the BASIC programming language as that is where nearly all programers start from.· There may also need to be a cross comparision to SPIN as well.

    In anycase, I don't expect this to be a book or complete tutorial, but rather another tutorial to help bridge the gaps of what I see missing in the current offerings.



    Chris
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2009-02-20 16:17
    Hi Chris, I think the best starting place is deSilvas tutorial at this link http://forums.parallax.com/showthread.php?p=663640

    At that same link there are articles that compliment deSilvas text.

    The machine language tutorial is so well laid out that I feel it is where everyone should start so that all on are the same page so to speak.

    Each chapter has examples and explanations that I for one would like expanding on to help me understand a little better. If more than one person is to accept Ale's offer of help then it has to be structured where everyone can keep the same pace , so it needs to be moderated to prevent a ball of confusion. You have just been voted in as moderator #1.

    This thread can be used for discussion one chapter at a time focusing on the contents of that one chapter only. Perhaps occasionally Ale can set assignments that involve what we have learnt to date.

    Just throwing ideas around please give thoughts.·Are there any more interested.

    Jeff T.
  • AleAle Posts: 2,363
    edited 2009-02-20 17:06
    Well, I agree with what Unsoundcode suggests, and it is between what I can do, hopefully.
  • blittledblittled Posts: 681
    edited 2009-02-20 17:16
    Count me in. I have some assembly knowledge (Z80, 6502, 6800, 8080, MicroChip Pic). I'm used to interrupts though [noparse]:)[/noparse]. The only thing that I need to get up to speed with is the self modifying code and the lack of a stack to push registers into.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    What electronics need - MORE POWER!!!!!!!
  • Mike HuseltonMike Huselton Posts: 746
    edited 2009-02-20 17:18
    Start with deSilva. Accept Ale's generous offer. Don't waste time.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    JMH
  • Chris_DChris_D Posts: 305
    edited 2009-02-21 14:14
    Per the wishes of several, I will work through the existing material further before moving on.

    Perhaps I have missed it (again repeating I have not read through everything entirely yet), but is there any of these tuturials that help to demonstrate the basic structure/flow of a program.· Perhaps something that shows how to do if-then-elseif-then decision structures, for-next type loops?

    Chris
    ·
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-02-21 14:24
    Chris_D: A suggestion... Put all that you find in a list. This was the slowest part when I started. A lot of wheel reinventing was done. I am willing to help where I can.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps (SixBladeProp)
    · Prop Tools under Development or Completed (Index)
    · Emulators (Micros eg Altair, and Terminals eg VT100) - index
    · Search the Propeller forums (via Google)

    My cruising website is: ·www.bluemagic.biz
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2009-02-21 14:26
    Assembly Language Primer for the Absolute Beginner by Doug Dingus (potato head)

    http://forums.parallax.com/attachment.php?attachmentid=52004

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Aka: CosmicBob
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2009-02-21 16:09
    Chris , I understand what you are saying when you say you want to be able to program basic and spin instructions in assembly thats the way I think too. Taking my own circumstances into account I don't think I could jump straight into that without first learning the elementary lessons of asm.

    DeSilvas text seemed like a good starting place , I missed the article by Doug Dingus I will check that out .

    Your plans to add an additional document for the beginner , and it sounds like you have the writing ability , could end up in the stickies which I think would be a great addition.

    The guys that have replied to the·thread all have great skills so you are in good shape there , if your needs mean taking the fast track and 101 tuition I'm sure you will get plenty of help. My visualization was more of a joint learning program but if thats not the way that suits you it's no detriment , people will learn from your feedback.

    Please keep us posted with your thoughts ideas and progress.

    Jeff T.
  • potatoheadpotatohead Posts: 10,261
    edited 2009-02-21 18:00
    Thanks for the plug bob! I add to that work, from time to time. Usually, it's some core discussion that clarifies either terminology, or some element of the basic assembly mind set that's worth knowing for context. That is the focus of that document. BTW: The next addition will be addressing modes, cog space and hub space, indirect, immediate and an additional bit on "Register". Thanks go to Carl for sparking those foundation discussions.

    I too highly recommend desilvas work. It's excellent!

    I went ahead and uploaded version 9. http://forums.parallax.com/forums/default.aspx?f=25&m=209237

    The addressing addendum mentioned above is a work in progress. What is there is complete, but sparse. However, many small corrections and additions have been made since version 7. Since this was linked, I thought an update now was warranted.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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) : 2/21/2009 8:11:17 PM GMT
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2009-02-22 23:23
    @Doug , I worked through your article and thought the level was perfect for the beginner. For me personally I already new perhaps 50% which means the other 50% taught me something (A+) and cleared up some of the things I missed or didn't understand from DeSivas text , your article is a must read prelude to the other.

    The introduction of Gear·was a nice surprise·, never having used it before·. I would have liked to see more examples using Gear maybe watching the effect of masks and truth tables but I can figure that out , could be a whole new article.

    thanks for taking the time

    Jeff T.
  • potatoheadpotatohead Posts: 10,261
    edited 2009-02-23 16:32
    You are welcome, and thanks for the feedback. That's always good.

    Gear is kind of a fun bit of code. There are lots of other solutions now, but Gear still is handy when you don't have a Propeller. It gets a lot of stuff right. I've used it many times to sort out timing and pin issues. That portion of the work is dated now. [noparse]:([/noparse] You are right too. I think that could just be expanded and linked with Gear for a kit that is Gear specific.

    My plan, over time, is to fill out the core discussions. Those are almost done. Shifting, more on bit masks, addressing examples, indexing, and I think it will be a good foundation. It is and always will be a foundation text, a primer for those looking to go and learn more. I'm very glad to hear it leads into DeSilva's text nicely. Back when he was writing, we briefly discussed that and it made sense then.

    I'm at a bit of a loss for good program examples that don't require a lot of stuff. Every once in a while, I think of something, or a way to express it that is useful, without having to have something specific hardware wise. My fear is to wander off into some territory too far and lose the flow. That is part of why there are addendums. If the reader just goes through the core text, they actually will get enough to understand a whole lot of what they see from there. I'm very careful about what goes in that section for that reason.

    I want to use a simple character based display to provide better examples with. At some point then, a break from the largely setup neutral format is going to come. Haven't sorted that out just yet. Perhaps another foundation text is warranted for that kind of thing. Don't know that yet either!

    Thanks again! Appreciated.

    Edit: I see this too:

    Chris says: Perhaps I have missed it (again repeating I have not read through everything entirely yet), but is there any of these tuturials that help to demonstrate the basic structure/flow of a program. Perhaps something that shows how to do if-then-elseif-then decision structures, for-next type loops?

    That's gonna have to get done for sure. I think that's a good addition to the foundation text and is something I completely glossed over. I'll add this in the next version or two.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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!
  • tdeyletdeyle Posts: 85
    edited 2009-02-23 18:17
    @potatohead:

    The attachment link states on the first page that it is version 08, not 09. Is this a typo? Is the content version 09 but the front page not changed?
  • potatoheadpotatohead Posts: 10,261
    edited 2009-02-23 19:56
    Oh, that's totally a typo. I'll fix that. If you downloaded the one that says "version 09" on the link, that is the latest.

    Nice catch!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    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!
Sign In or Register to comment.