⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ldlinux.lst

📁 Windows上的精简Linux系统
💻 LST
📖 第 1 页 / 共 5 页
字号:
     1                                  ; -*- fundamental -*- (asm-mode sucks)     2                                  ; $Id: ldlinux.asm,v 1.147 2004/06/13 20:50:44 hpa Exp $     3                                  ; ****************************************************************************     4                                  ;     5                                  ;  ldlinux.asm     6                                  ;     7                                  ;  A program to boot Linux kernels off an MS-DOS formatted floppy disk.	 This     8                                  ;  functionality is good to have for installation floppies, where it may     9                                  ;  be hard to find a functional Linux system to run LILO off.    10                                  ;    11                                  ;  This program allows manipulation of the disk to take place entirely    12                                  ;  from MS-LOSS, and can be especially useful in conjunction with the    13                                  ;  umsdos filesystem.    14                                  ;    15                                  ;  This file is loaded in stages; first the boot sector at offset 7C00h,    16                                  ;  then the first sector (cluster, really, but we can only assume 1 sector)    17                                  ;  of LDLINUX.SYS at 7E00h and finally the remainder of LDLINUX.SYS at 8000h.    18                                  ;    19                                  ;   Copyright (C) 1994-2004  H. Peter Anvin    20                                  ;    21                                  ;  This program is free software; you can redistribute it and/or modify    22                                  ;  it under the terms of the GNU General Public License as published by    23                                  ;  the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA 02139,    24                                  ;  USA; either version 2 of the License, or (at your option) any later    25                                  ;  version; incorporated herein by reference.    26                                  ;     27                                  ; ****************************************************************************    28                                      29                                  %ifndef IS_MDSLINUX    30                                  %define IS_SYSLINUX 1    31                                  %endif    32                                  %include "macros.inc"    33                              <1> ;; $Id: macros.inc,v 1.6 2003/04/16 02:49:31 hpa Exp $    34                              <1> ;; -----------------------------------------------------------------------    35                              <1> ;;       36                              <1> ;;   Copyright 1994-2003 H. Peter Anvin - All Rights Reserved    37                              <1> ;;    38                              <1> ;;   This program is free software; you can redistribute it and/or modify    39                              <1> ;;   it under the terms of the GNU General Public License as published by    40                              <1> ;;   the Free Software Foundation, Inc., 53 Temple Place Ste 330,    41                              <1> ;;   Bostom MA 02111-1307, USA; either version 2 of the License, or    42                              <1> ;;   (at your option) any later version; incorporated herein by reference.    43                              <1> ;;    44                              <1> ;; -----------------------------------------------------------------------    45                              <1>     46                              <1> ;;    47                              <1> ;; macros.inc    48                              <1> ;;     49                              <1> ;; Convenient macros    50                              <1> ;;    51                              <1>     52                              <1> %ifndef _MACROS_INC    53                              <1> %define _MACROS_INC    54                              <1>     55                              <1> ;    56                              <1> ; Identify the module we're compiling; the "correct" should be defined    57                              <1> ; in the module itself to 1    58                              <1> ;    59                              <1> %ifndef IS_SYSLINUX    60                              <1> %define IS_SYSLINUX 0    61                              <1> %endif    62                              <1> %ifndef IS_MDSLINUX    63                              <1> %define IS_MDSLINUX 0    64                              <1> %endif    65                              <1> %ifndef IS_PXELINUX    66                              <1> %define IS_PXELINUX 0    67                              <1> %endif    68                              <1> %ifndef IS_ISOLINUX    69                              <1> %define IS_ISOLINUX 0    70                              <1> %endif    71                              <1>     72                              <1> ;    73                              <1> ; Macros similar to res[bwd], but which works in the code segment (after    74                              <1> ; section .text) or the data segment (section .data)    75                              <1> ;    76                              <1> %macro	zb	1.nolist    77                              <1> 	times %1 db 0    78                              <1> %endmacro    79                              <1>     80                              <1> %macro	zw	1.nolist    81                              <1> 	times %1 dw 0    82                              <1> %endmacro    83                              <1>     84                              <1> %macro	zd	1.nolist    85                              <1> 	times %1 dd 0    86                              <1> %endmacro    87                              <1>     88                              <1> ;    89                              <1> ; Macro to emit an unsigned decimal number as a string    90                              <1> ;    91                              <1> %macro asciidec	1.nolist    92                              <1> %ifndef DEPEND	; Not safe for "depend"    93                              <1> %if %1 >= 1000000000    94                              <1> 	db ((%1/1000000000) % 10) + '0'    95                              <1> %endif    96                              <1> %if %1 >= 100000000    97                              <1> 	db ((%1/100000000) % 10) + '0'    98                              <1> %endif    99                              <1> %if %1 >= 10000000   100                              <1> 	db ((%1/10000000) % 10) + '0'   101                              <1> %endif   102                              <1> %if %1 >= 1000000   103                              <1> 	db ((%1/1000000) % 10) + '0'   104                              <1> %endif   105                              <1> %if %1 >= 100000   106                              <1> 	db ((%1/100000) % 10) + '0'   107                              <1> %endif   108                              <1> %if %1 >= 10000   109                              <1> 	db ((%1/10000) % 10) + '0'   110                              <1> %endif   111                              <1> %if %1 >= 1000   112                              <1> 	db ((%1/1000) % 10) + '0'   113                              <1> %endif   114                              <1> %if %1 >= 100   115                              <1> 	db ((%1/100) % 10) + '0'   116                              <1> %endif   117                              <1> %if %1 >= 10   118                              <1> 	db ((%1/10) % 10) + '0'   119                              <1> %endif   120                              <1> 	db (%1 % 10) + '0'   121                              <1> %endif   122                              <1> %endmacro   123                              <1>    124                              <1> ;   125                              <1> ; Macros for network byte order of constants   126                              <1> ;   127                              <1> %define htons(x)  ( ( ((x) & 0FFh) << 8 ) + ( ((x) & 0FF00h) >> 8 ) )   128                              <1> %define ntohs(x) htons(x)   129                              <1> %define htonl(x)  ( ( ((x) & 0FFh) << 24) + ( ((x) & 0FF00h) << 8 ) + ( ((x) & 0FF0000h) >> 8 ) + ( ((x) & 0FF000000h) >> 24) )   130                              <1> %define ntohl(x) htonl(x)   131                              <1>    132                              <1> %endif ; _MACROS_INC   133                                  %include "config.inc"   134                              <1> ;; $Id: config.inc,v 1.5 2004/01/29 06:31:49 hpa Exp $   135                              <1> ;; -----------------------------------------------------------------------   136                              <1> ;;      137                              <1> ;;   Copyright 2002-2004 H. Peter Anvin - All Rights Reserved   138                              <1> ;;   139                              <1> ;;   This program is free software; you can redistribute it and/or modify   140                              <1> ;;   it under the terms of the GNU General Public License as published by   141                              <1> ;;   the Free Software Foundation, Inc., 53 Temple Place Ste 330,   142                              <1> ;;   Bostom MA 02111-1307, USA; either version 2 of the License, or   143                              <1> ;;   (at your option) any later version; incorporated herein by reference.   144                              <1> ;;   145                              <1> ;; -----------------------------------------------------------------------   146                              <1>    147                              <1> ;;   148                              <1> ;; config.inc   149                              <1> ;;   150                              <1> ;; Common configuration options.  Some of these are imposed by the kernel.   151                              <1> ;;   152                              <1>    153                              <1> %ifndef _CONFIG_INC   154                              <1> %define _CONFIG_INC   155                              <1>    156                              <1> max_cmd_len	equ 255			; Must be odd; 255 is the kernel limit   157                              <1> HIGHMEM_MAX	equ 037FFFFFFh		; DEFAULT highest address for an initrd   158                              <1> DEFAULT_BAUD	equ 9600		; Default baud rate for serial port   159                              <1> BAUD_DIVISOR	equ 115200		; Serial port parameter   160                              <1>    161                              <1> %assign	DO_WBINVD 0			; Should we use WBINVD or not?   162                              <1>    163                              <1> ;   164                              <1> ; Version number definitinons   165                              <1> ;   166                              <1> %ifndef DEPEND				; Generated file   167                              <1> %include "version.gen"   168                              <2> %define VERSION "2.10"   169                              <2> %define VER_MAJOR 2   170                              <2> %define VER_MINOR 10   171                              <1> %endif   172                              <1>    173                              <1> ;   174                              <1> ; Should be updated with every release to avoid bootsector/SYS file mismatch   175                              <1> ;   176                              <1> %define	version_str	VERSION		; Must be 4 characters long!   177                              <1> %define date		DATE_STR	; Defined from the Makefile   178                              <1> %define	year		'2004'   179                              <1>    180                              <1> %endif ; _CONFIG_INC   181                                  %include "kernel.inc"   182                              <1> ;; $Id: kernel.inc,v 1.1 2002/04/26 05:56:24 hpa Exp $   183                              <1> ;; -----------------------------------------------------------------------   184                              <1> ;;      185                              <1> ;;   Copyright 1994-2002 H. Peter Anvin - All Rights Reserved   186                              <1> ;;   187                              <1> ;;   This program is free software; you can redistribute it and/or modify   188                              <1> ;;   it under the terms of the GNU General Public License as published by   189                              <1> ;;   the Free Software Foundation, Inc., 53 Temple Place Ste 330,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -