1 ;; -----------------------------------------------------------------------
3 ;; Copyright 1994-2008 H. Peter Anvin - All Rights Reserved
4 ;; Copyright 2009 Intel Corporation; author: H. Peter Anvin
6 ;; This program is free software; you can redistribute it and/or modify
7 ;; it under the terms of the GNU General Public License as published by
8 ;; the Free Software Foundation, Inc., 53 Temple Place Ste 330,
9 ;; Boston MA 02111-1307, USA; either version 2 of the License, or
10 ;; (at your option) any later version; incorporated herein by reference.
12 ;; -----------------------------------------------------------------------
24 ; Identify the module we're compiling; the "correct" should be defined
25 ; in the module itself to 1
28 %define MY_NAME 'SYSLINUX'
33 %define MY_NAME 'PXELINUX'
38 %define MY_NAME 'ISOLINUX'
43 %define MY_NAME 'EXTLINUX'
49 ; Macros similar to res[bwd], but which works in the code segment (after
50 ; section .text16) or the data segment (section .data16)
65 ; Align with zero bytes in a progbits segment
67 %macro alignz 1.nolist
68 times (((%1) - (($-$$) % (%1))) % (%1)) db 0
72 ; Macro to emit an unsigned decimal number as a string
74 %macro asciidec 1.nolist
75 %ifndef DEPEND ; Not safe for "depend"
86 %assign %$dcount %$dcount + 1
93 db ((%$v / %$d) % 10) + '0'
101 ; Macros for network byte order of constants
103 %define htons(x) ( ( ((x) & 0FFh) << 8 ) + ( ((x) & 0FF00h) >> 8 ) )
104 %define ntohs(x) htons(x)
105 %define htonl(x) ( ( ((x) & 0FFh) << 24) + ( ((x) & 0FF00h) << 8 ) + ( ((x) & 0FF0000h) >> 8 ) + ( ((x) & 0FF000000h) >> 24) )
106 %define ntohl(x) htonl(x)
111 CR equ 13 ; Carriage Return
112 LF equ 10 ; Line Feed
113 FF equ 12 ; Form Feed