Sorry, let me clarify, I am writing assembly code, using a .s file with GCC, I don't need to know how to do macros with c or cpp files, but with assembly files. Thanks. Brad -----Original Message----- From: darwin-kernel-admin@lists.apple.com [mailto:darwin-kernel-admin@lists.apple.com] On Behalf Of Brad Post (MACBU) Sent: Wednesday, February 04, 2004 10:48 AM To: darwin-kernel@lists.apple.com Subject: Assembly macros with Gcc Anyone have a good reference on how to do macros in assembly? I'm trying to get some macros to work with gcc and Project Builder (not Xcode) and having some troubles, so does anyone know a good reference with decent examples? I'm trying to do something like this: #define SAVE_STATISTICS(stat, reg) lwz reg, stat(r3) addi reg, reg, 1 stw reg, stat(r3) I've tried a bunch of stuff, but gcc doesn't seem to like it and I'm hoping someone here might have a good reference book or website.... Thanks. Brad _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored. _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.