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'
35 %define MY_TYPE 'lwIP'
43 %define MY_NAME 'ISOLINUX'
48 %define MY_NAME 'EXTLINUX'
54 ; Macros similar to res[bwd], but which works in the code segment (after
55 ; section .text16) or the data segment (section .data16)
70 ; Align with zero bytes in a progbits segment
72 %macro alignz 1.nolist
73 times (((%1) - (($-$$) % (%1))) % (%1)) db 0
77 ; Macro to emit an unsigned decimal number as a string
79 %macro asciidec 1.nolist
80 %ifndef DEPEND ; Not safe for "depend"
91 %assign %$dcount %$dcount + 1
98 db ((%$v / %$d) % 10) + '0'
106 ; Macros for network byte order of constants
108 %define htons(x) ( ( ((x) & 0FFh) << 8 ) + ( ((x) & 0FF00h) >> 8 ) )
109 %define ntohs(x) htons(x)
110 %define htonl(x) ( ( ((x) & 0FFh) << 24) + ( ((x) & 0FF00h) << 8 ) + ( ((x) & 0FF0000h) >> 8 ) + ( ((x) & 0FF000000h) >> 24) )
111 %define ntohl(x) htonl(x)
116 CR equ 13 ; Carriage Return
117 LF equ 10 ; Line Feed
118 FF equ 12 ; Form Feed