Page 1 of 1

Announcing MacPac

Posted: Thu Dec 04, 2008 11:00 pm
by tjhastings
Hello all,

I have created a macro pack (macpac) for NASM and decided to make it a public project with the hope that others may find the macros useful. All the usual stuff is included: procedures, loops, structs...

Please note thse macros are probably full of bugs. :oops: I have only just finished writing them and have not yet used them in real code.

http://code.google.com/p/macpac/

- TJ

Re: Announcing MacPac

Posted: Sat Dec 06, 2008 2:35 pm
by stephenj
After a brief review, it looks like we've implemented some of the same macros. I haven't looked at it too much yet, but I suspect your implementation is better than my own.

One macro that I tend to implement is the XOR swap trick (I've yet to find a good alternative to xchg). I'd check my macro include, but my main computer (and only amd64 capable machine) is fried, and I won't have an alternative for a few hours.

Great job though!

Re: Announcing MacPac

Posted: Sat Dec 06, 2008 7:34 pm
by tjhastings
stephenj wrote:After a brief review, it looks like we've implemented some of the same macros. I haven't looked at it too much yet, but I suspect your implementation is better than my own.
Are the macros you wrote available for download somwhere? I am always interested in seeing how other people implement macros as I often learn something that way.
stephenj wrote:One macro that I tend to implement is the XOR swap trick (I've yet to find a good alternative to xchg).
There is quite a bit more I could add. Current focus is on writing SWITCH/CASE macros to generate branch tables. Once finished with that focus will shift to writing test programs to make sure all the macros work properly.
stephenj wrote:I'd check my macro include, but my main computer (and only amd64 capable machine) is fried, and I won't have an alternative for a few hours.
Sorry to hear your computer is down. I do not have a 64-bit machine to test with and so none of the macpac's macros are 64-bit aware. (64-bit support is planned, however.)
stephenj wrote:Great job though!
Thanks!


- TJ

Re: Announcing MacPac

Posted: Sat Dec 06, 2008 8:12 pm
by stephenj
I've yet to publish anything (I don't feel I have anything good enough to publish). But I plan on publishing some of it... Someday.

When I write assembly, I tend not to write 32-bit stuff... There's just something about writing code that will be obsolete (from my perspective) within a few years, that is unappealing.

Re: Announcing MacPac

Posted: Sun Dec 07, 2008 12:14 pm
by Troy Martin
stephenj wrote:When I write assembly, I tend not to write 32-bit stuff... There's just something about writing code that will be obsolete (from my perspective) within a few years, that is unappealing.
I find real mode to be the kind of thing that lives forever, since all computers support it. So that's why I write in 16-bit assembly.

TJ, your macros look real nifty, good luck with them!