Deleted Added
full compact
disk.s (64123) disk.s (64183)
1# Copyright (c) KATO Takenori, 1999, 2000.
2#
3# All rights reserved. Unpublished rights reserved under the copyright
4# laws of Japan.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:

--- 11 unchanged lines hidden (view full) ---

20# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27#
1# Copyright (c) KATO Takenori, 1999, 2000.
2#
3# All rights reserved. Unpublished rights reserved under the copyright
4# laws of Japan.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:

--- 11 unchanged lines hidden (view full) ---

20# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27#
28# $FreeBSD: head/sys/boot/pc98/boot0.5/disk.s 64123 2000-08-02 08:46:08Z kato $
28# $FreeBSD: head/sys/boot/pc98/boot0.5/disk.s 64183 2000-08-03 09:00:19Z kato $
29#
30
31 .code16
32 .text
33#
34# Check magic number at the end of the sector 0
35#
36check_magic:

--- 19 unchanged lines hidden (view full) ---

56 pop %es
57 movw curdevice, %bx
58 shlw %bx
59 movw maxpart(%bx), %cx # %cx = max num of partitions
60 movw partoff(%bx), %di
61 movw %di, %bx # %bx = offset to partition table
62 xorw %dx, %dx # %dx = partition number
63setup_partition_loop:
29#
30
31 .code16
32 .text
33#
34# Check magic number at the end of the sector 0
35#
36check_magic:

--- 19 unchanged lines hidden (view full) ---

56 pop %es
57 movw curdevice, %bx
58 shlw %bx
59 movw maxpart(%bx), %cx # %cx = max num of partitions
60 movw partoff(%bx), %di
61 movw %di, %bx # %bx = offset to partition table
62 xorw %dx, %dx # %dx = partition number
63setup_partition_loop:
64 push %cx
64 movw %dx, %si
65 movw %dx, %si
65 shlw %si
66 shlw %si
67 shlw %si
68 shlw %si
69 shlw %si
66 movb $5, %cl
67 shlw %cl, %si
70 addw %bx, %si
71 movb iplbuf(%si), %al
72 orb %al, %al
73 jz unused_partition
68 addw %bx, %si
69 movb iplbuf(%si), %al
70 orb %al, %al
71 jz unused_partition
72 addw $iplbuf, %si
74 movw npartition, %ax
75 movw %ax, %di
73 movw npartition, %ax
74 movw %ax, %di
76 shlw %di
77 shlw %di
78 shlw %di
79 shlw %di
80 shlw %di
75 movb $5, %cl
76 shlw %cl, %di
81 addw $parttable, %di
77 addw $parttable, %di
82 push %cx
83 movw $32, %cx
84 rep
85 movsb
78 movw $32, %cx
79 rep
80 movsb
86 pop %cx
87 movw %ax, %di
88 addw $partnum, %di
89 movb %dl, (%di)
90 incw npartition
91unused_partition:
92 incw %dx
81 movw %ax, %di
82 addw $partnum, %di
83 movb %dl, (%di)
84 incw npartition
85unused_partition:
86 incw %dx
87 pop %cx
93 loop setup_partition_loop
94 ret
95
96#
97# Read IPL and partition table in the current device.
98#
99 .global read_ipl
100read_ipl:

--- 185 unchanged lines hidden ---
88 loop setup_partition_loop
89 ret
90
91#
92# Read IPL and partition table in the current device.
93#
94 .global read_ipl
95read_ipl:

--- 185 unchanged lines hidden ---