1;Copyright (C) 1997-2007 ZSNES Team ( zsKnight, _Demo_, pagefault, Nach ) 2; 3;http://www.zsnes.com 4;http://sourceforge.net/projects/zsnes 5;https://zsnes.bountysource.com 6; 7;This program is free software; you can redistribute it and/or 8;modify it under the terms of the GNU General Public License 9;version 2 as published by the Free Software Foundation. 10; 11;This program is distributed in the hope that it will be useful, 12;but WITHOUT ANY WARRANTY; without even the implied warranty of 13;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14;GNU General Public License for more details. 15; 16;You should have received a copy of the GNU General Public License 17;along with this program; if not, write to the Free Software 18;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 20 21%ifdef __AMD64__ 22bits 64 23%else 24bits 32 25%endif 26 27section .text 28 29%ifdef MACHO 30section .text align=16 31section .data align=4 32section .bss align=4 33%endif 34 35%ifdef ELF 36 37%imacro newsym 1 38 GLOBAL %1 39 %1: 40%endmacro 41%imacro newsym 2+ 42 GLOBAL %1 43 %1: %2 44%endmacro 45%define EXTSYM EXTERN 46 47section .note.GNU-stack noalloc noexec nowrite progbits 48 49%else 50%ifdef LINUX 51%imacro newsym 1 52 GLOBAL _%1 53 _%1: 54 %1: 55%endmacro 56%imacro newsym 2+ 57 GLOBAL _%1 58 _%1: 59 %1: %2 60%endmacro 61%imacro extsym 1 62 EXTERN %1 63 %define %1 %1 64%endmacro 65%else 66%imacro newsym 1 67 GLOBAL __%1 68 __%1: 69 %1: 70%endmacro 71%imacro newsym 2+ 72 GLOBAL __%1 73 __%1: 74 %1: %2 75%endmacro 76%imacro EXTSYM 1-* 77%rep %0 78 EXTERN _%1 79 %define %1 _%1 80%rotate 1 81%endrep 82%endmacro 83%endif 84 85%endif 86 87%macro ALIGN32 0 88 times ($$-$) & 1Fh nop ; Long word alignment 89%endmacro 90%macro ALIGN16 0 91 times ($$-$) & 1Fh nop ; Long word alignment 92%endmacro 93