home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 August (Alt) / CHIP 2005-08.1.iso / program / guvenlik / syslinux-3.07.exe / cmdline.inc < prev    next >
Encoding:
Text File  |  2004-12-14  |  1.1 KB  |  45 lines

  1. ;; $Id: cmdline.inc,v 1.2 2004/12/14 22:46:24 hpa Exp $
  2. ;; -----------------------------------------------------------------------
  3. ;;   
  4. ;;   Copyright 2003 H. Peter Anvin - All Rights Reserved
  5. ;;
  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.
  11. ;;
  12. ;; -----------------------------------------------------------------------
  13.  
  14. ;;
  15. ;; cmdline.inc
  16. ;;
  17. ;; Common routine to assemble [null-terminated] command line into
  18. ;; real_mode_seg:cmd_line_here.
  19. ;; Not used by plain kernel due to BOOT_IMAGE= etc.
  20. ;;
  21.  
  22. ;
  23. ; Assumes DS == CS
  24. make_plain_cmdline:
  25.         push es
  26.         ; ui.inc has already copied the actual command line
  27.         mov ax,real_mode_seg
  28.         mov es,ax
  29.  
  30.         mov si,[CmdOptPtr]
  31.         mov di,[CmdLinePtr]
  32.         
  33. .loop:        lodsb
  34.         stosb
  35.         and al,al
  36.         jnz .loop
  37.  
  38.         dec di
  39.         mov [CmdLinePtr],di
  40.  
  41.         pop es
  42.         ret
  43.  
  44.  
  45.