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. I have only just finished writing them and have not yet used them in real code.
http://code.google.com/p/macpac/
- TJ
Announcing MacPac
-
- Posts: 12
- Joined: Sat Feb 02, 2008 5:49 pm
Announcing MacPac
Theorem: a cat has nine tails.
Proof: No cat has eight tails. A cat has one tail more than no cat.
Therefore, a cat has nine tails.
Proof: No cat has eight tails. A cat has one tail more than no cat.
Therefore, a cat has nine tails.
Re: Announcing MacPac
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!
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!
-
- Posts: 12
- Joined: Sat Feb 02, 2008 5:49 pm
Re: Announcing MacPac
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: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.
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:One macro that I tend to implement is the XOR swap trick (I've yet to find a good alternative to xchg).
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: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.
Thanks!stephenj wrote:Great job though!
- TJ
Theorem: a cat has nine tails.
Proof: No cat has eight tails. A cat has one tail more than no cat.
Therefore, a cat has nine tails.
Proof: No cat has eight tails. A cat has one tail more than no cat.
Therefore, a cat has nine tails.
Re: Announcing MacPac
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.
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.
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Announcing MacPac
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.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.
TJ, your macros look real nifty, good luck with them!