~smartboyhw/wubi/bug-1080090-new

« back to all changes in this revision

Viewing changes to src/grubutil/loadbin/.svn/text-base/ldgrub.S.svn-base

  • Committer: Howard Chan
  • Date: 2012-11-20 10:16:05 UTC
  • Revision ID: smartboyhw@gmail.com-20121120101605-qfmjfsdynpzg9an9
Added images

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 *  GRUB Utilities --  Utilities for GRUB Legacy, GRUB2 and GRUB for DOS
3
 
 *  Copyright (C) 2007,2008 Bean (bean123ch@gmail.com)
4
 
 *
5
 
 *  This program is free software: you can redistribute it and/or modify
6
 
 *  it under the terms of the GNU General Public License as published by
7
 
 *  the Free Software Foundation, either version 3 of the License, or
8
 
 *  (at your option) any later version.
9
 
 *
10
 
 *  This program is distributed in the hope that it will be useful,
11
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
 *  GNU General Public License for more details.
14
 
 *
15
 
 *  You should have received a copy of the GNU General Public License
16
 
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
 
 */
18
 
 
19
 
        .file   "ldgrub.S"
20
 
 
21
 
#include <symbol.h>
22
 
 
23
 
#define DATA_ADDR       0x8000
24
 
 
25
 
        .text
26
 
 
27
 
        .code16
28
 
 
29
 
DEF_FUNC(main)
30
 
        movl    $DATA_ADDR, %edi
31
 
 
32
 
        call    EXT_FUNC(move_memory)
33
 
 
34
 
        pushw   %ss
35
 
        popw    %ds
36
 
 
37
 
        movsbl  %dh, %eax
38
 
 
39
 
        /* install_partition.  */
40
 
        movl    %eax, (DATA_ADDR + 0x208)
41
 
 
42
 
        ljmp    $((DATA_ADDR >> 4) + 0x20), $0