Shop OBEX P1 Docs P2 Docs Learn Events
New edition of the sxlist.com newsletter — Parallax Forums

New edition of the sxlist.com newsletter

James NewtonJames Newton Posts: 329
edited 2005-05-14 00:18 in General Discussion
The sxlist.com newsletter (a.k.a. the massmind newsletter) is a semi-bi monthly publication of interesting things from the host of sxlist.com.

This next edition is over due... and it is, I feel, worth the wait. It is a complete tutorial on building and using macros in SASM for the SX. I've been working on this tutorial for over 3 months now and have sent copies out to several people for pre-release feedback which I have incorporated. I really feel this will get anyone who doesn't understand the MASSIVE POWER of macros, over the hump and well on the way to using them to program faster and smarter.

Macros allow you to put all the tiny details that you have learned about how things work into SASM so the next time you don't have to go back and re-learn it all. Macros allow you to encapsulate your own "best way" and use it again and again without getting lost in the details.

I've lost·cry.gif· a few subscribers over the holliday season (I don't blame you, I wasn't putting out anything) but I want you back and this next edition is MORE THAN WORTH IT!

In this edition, you will find out how to totally avoid paging! Your subroutines can be placed anywhere and can still be called without concern. No more "Address xxx is not within lower half of memory page" errors. And no wasted space org-ing to move into the next page before you really needed to.

It·also·explains a macro that allows you to build a code library, put it in an include file, and it will only add code for a·given function·to your program if·a function·is used! You can keep adding to the include file; as much code as you want, and it will not take up any space except as needed for the funtions you use in a program. Check this out: It will include the function the first time you use it, but only compile a call to it the second and following times! And all you have to do is type the name of the funciton each time. It figures out if that is the first use, or a following use, automatically.

I have high hopes for this series, if the response is good,·the edition to follow will be a commented version of my own macro laden include files; macros that implement if ... elseIf ... else ... endIf, select ... case ... caseElse ... endSelect, and while ... do, repeat ... while or until looping. They automatically compile the absolute smallest code for the comparison you are doing, in your environment.

Later installments may cover the gotoN and LookupW macros that avoid all the issues of standard table lookups and always compile the absolute tightest code possible. Or my delay macro that allows you to specify the delay in nano, micro, milli, or full seconds and automatically compiles the right code to do that delay for the clock and mode your are using.

And... down the road, you won't believe what can be done with macros: I've found a way to build an expression evaluator into a SASM macro. No kidding! I can type in LET A,·=, B, +, 10 and it compiles mov A, B add A, #10. It's very basic at this point, but I hope to combine it with a math library and provide true 8, 16 and 32 bit math in the same "absolute smallest tightest fastest code possible" way.

I've shown it to Peter Montgomery and his brain melted. devil.gif

Besides, supporting SXList.com is the "right" thing to do... Where else can you find the volumn of code, notes, tips, tricks, and ideas for the SX that you can find at SXList.com?

Still not convinced? Look at some older issues of the newsletter:
http://www.sxlist.com/techref/new/letter/index.htm
There is ground breaking, earth shattering, REALLY COOL stuff in there. And you didn't see it (until now) unless you subscribed.

Ok, that's enough sales pitch for one day. If you want it, click here:
http://www.sxlist.com/techref/ubicom/support.htm·and select one of the subscription options.


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
---
James Newton, Host of SXList.com
james@sxlist.com 1-619-652-0593 fax:1-208-279-8767
SX FAQ / Code / Tutorials / Documentation:
http://www.sxlist.com Pick faster!



Comments

  • Jim G.Jim G. Posts: 27
    edited 2005-02-15 17:10
    Thanks for the tickler...

    I took a look at the site and some older newletters and will definately start at least a trial subscription.

    You have already helped me with my RS232 problems!

    Jim Greenhaw
  • James NewtonJames Newton Posts: 329
    edited 2005-05-13 23:38
    The next edition finally made it out the door: The 04/04 newsletter starts like this...

    "In this edition, we are going to look at a cool math trick for generating sinewaves. The code is for the SX processor but can be converted to PIC or other common embedded processors without much trouble.

    Before your eyes glaze over on the math part, know that there are some good things to learn here. One is how complex math functions can get compressed into a few cycles of embeded controller code by looking at how the function output changes for very small changes in the input. When you can start with a correct value and concentrate on looking for a small adjustment, you can often "throw away" large parts of the function. The article inside this edition is a perfect example of that.

    Secondly, there is some good code that shows how doing an addition or subtraction can involve just toggleing ONE BIT.

    Read on!"

    Check out the previous editions at
    http://www.sxlist.com/techref/new/letter/index.htm

    and go to
    http://www.sxlist.com/support ·if you decide to subscribe.

    The next edition will most likely be on digital filters and after that, speech synth.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ---
    James Newton, Host of SXList.com
    james@sxlist.com 1-619-652-0593 fax:1-208-279-8767
    SX FAQ / Code / Tutorials / Documentation:
    http://www.sxlist.com Pick faster!



  • KenMKenM Posts: 657
    edited 2005-05-14 00:18
    32 bit math routines that work.......that would be awesome. As you know, Fr. "Iforgotname" wrote some 32 bit routines that were in an earlier edition of the newsletter.
    If you remember, there were some problems using the full 32 bits.....but it did not affect my application.
    I am a financial supporter of sxlist.com as it has helped me out numerous times.
    So come on you SX users, for just one lunch a month ($7) you too can support sxlist.
    James Newton said...
    , but I hope to combine it with a math library and provide true 8, 16 and 32 bit math in the same "absolute smallest tightest fastest code possible" way.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    トヨタは すばらし です!!
Sign In or Register to comment.