Last change
on this file since 80238 was 76553, checked in by vboxsync, 6 years ago |
scm --update-copyright-year
|
-
Property svn:eol-style
set to
LF
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
3.1 KB
|
Line | |
---|
1 | # $Id: biosorg_check.sed 76553 2019-01-01 01:45:53Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # For converting biosorg_check_<addr> lines in a wlink mapfile
|
---|
4 | # to kmk_expr checks.
|
---|
5 | #
|
---|
6 |
|
---|
7 | #
|
---|
8 | # Copyright (C) 2012-2019 Oracle Corporation
|
---|
9 | #
|
---|
10 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
11 | # available from http://www.virtualbox.org. This file is free software;
|
---|
12 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
13 | # General Public License (GPL) as published by the Free Software
|
---|
14 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
15 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
16 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
17 | #
|
---|
18 |
|
---|
19 |
|
---|
20 | /biosorg_check_at_/b check_at
|
---|
21 | /biosorg_check_before_or_at_/b check_before_or_at
|
---|
22 | b end
|
---|
23 |
|
---|
24 | :check_at
|
---|
25 | #p # --debug
|
---|
26 | s/\(.*\)/\L\1/g
|
---|
27 | s/....:\(....\). *biosorg_check_at_0\(\1\)h *//
|
---|
28 | /^$/b end
|
---|
29 | q 1
|
---|
30 | b end
|
---|
31 |
|
---|
32 | # after or equal.
|
---|
33 | :check_before_or_at
|
---|
34 | #p # --debug
|
---|
35 | s/\(.*\)/\L\1/g
|
---|
36 |
|
---|
37 | h
|
---|
38 | s/^....:\(....\). *biosorg_check_before_or_at_0\(....\)h */\2/
|
---|
39 | x
|
---|
40 | s/^....:\(....\)/\1 /
|
---|
41 |
|
---|
42 |
|
---|
43 | # Loop for comparing the two addresses. The one in the pattern buffer (left) must be
|
---|
44 | # smaller or equal to the one in in the pattern buffer (BIOSORG address).
|
---|
45 | :compare_loop
|
---|
46 | /^f/b match_f_or_greater
|
---|
47 | /^e/b match_e_or_greater
|
---|
48 | /^d/b match_d_or_greater
|
---|
49 | /^c/b match_c_or_greater
|
---|
50 | /^b/b match_b_or_greater
|
---|
51 | /^a/b match_a_or_greater
|
---|
52 | /^9/b match_9_or_greater
|
---|
53 | /^8/b match_8_or_greater
|
---|
54 | /^7/b match_7_or_greater
|
---|
55 | /^6/b match_6_or_greater
|
---|
56 | /^5/b match_5_or_greater
|
---|
57 | /^4/b match_4_or_greater
|
---|
58 | /^3/b match_3_or_greater
|
---|
59 | /^2/b match_2_or_greater
|
---|
60 | /^1/b match_1_or_greater
|
---|
61 | /^0/b match_0_or_greater
|
---|
62 | :bad
|
---|
63 | p
|
---|
64 | x
|
---|
65 | p
|
---|
66 | q 1
|
---|
67 | b end
|
---|
68 |
|
---|
69 | :bad_other
|
---|
70 | x
|
---|
71 | b bad
|
---|
72 |
|
---|
73 |
|
---|
74 | :match_f_or_greater
|
---|
75 | x
|
---|
76 | /^f/b next_compare
|
---|
77 | b bad_other
|
---|
78 |
|
---|
79 | :match_e_or_greater
|
---|
80 | x
|
---|
81 | /^f/b end
|
---|
82 | /^e/b next_compare
|
---|
83 | b bad_other
|
---|
84 |
|
---|
85 | :match_d_or_greater
|
---|
86 | x
|
---|
87 | /^[e-f]/b end
|
---|
88 | /^d/b next_compare
|
---|
89 | b bad_other
|
---|
90 |
|
---|
91 | :match_c_or_greater
|
---|
92 | x
|
---|
93 | /^[d-f]/b end
|
---|
94 | /^c/b next_compare
|
---|
95 | b bad_other
|
---|
96 |
|
---|
97 | :match_b_or_greater
|
---|
98 | x
|
---|
99 | /^[c-f]/b end
|
---|
100 | /^b/b next_compare
|
---|
101 | b bad_other
|
---|
102 |
|
---|
103 | :match_a_or_greater
|
---|
104 | x
|
---|
105 | /^[b-f]/b end
|
---|
106 | /^a/b next_compare
|
---|
107 | b bad_other
|
---|
108 |
|
---|
109 | :match_9_or_greater
|
---|
110 | x
|
---|
111 | /^[a-f]/b end
|
---|
112 | /^9/b next_compare
|
---|
113 | b bad_other
|
---|
114 |
|
---|
115 | :match_8_or_greater
|
---|
116 | x
|
---|
117 | /^[9a-f]/b end
|
---|
118 | /^8/b next_compare
|
---|
119 | b bad_other
|
---|
120 |
|
---|
121 | :match_7_or_greater
|
---|
122 | x
|
---|
123 | /^[8-9a-f]/b end
|
---|
124 | /^7/b next_compare
|
---|
125 | b bad_other
|
---|
126 |
|
---|
127 | :match_6_or_greater
|
---|
128 | x
|
---|
129 | /^[7-9a-f]/b end
|
---|
130 | /^6/b next_compare
|
---|
131 | b bad_other
|
---|
132 |
|
---|
133 | :match_5_or_greater
|
---|
134 | x
|
---|
135 | /^[6-9a-f]/b end
|
---|
136 | /^5/b next_compare
|
---|
137 | b bad_other
|
---|
138 |
|
---|
139 | :match_4_or_greater
|
---|
140 | x
|
---|
141 | /^[5-9a-f]/b end
|
---|
142 | /^4/b next_compare
|
---|
143 | b bad_other
|
---|
144 |
|
---|
145 | :match_3_or_greater
|
---|
146 | x
|
---|
147 | /^[4-9a-f]/b end
|
---|
148 | /^3/b next_compare
|
---|
149 | b bad_other
|
---|
150 |
|
---|
151 | :match_2_or_greater
|
---|
152 | x
|
---|
153 | /^[3-9a-f]/b end
|
---|
154 | /^2/b next_compare
|
---|
155 | b bad_other
|
---|
156 |
|
---|
157 | :match_1_or_greater
|
---|
158 | x
|
---|
159 | /^[2-9a-f]/b end
|
---|
160 | /^1/b next_compare
|
---|
161 | b bad_other
|
---|
162 |
|
---|
163 | :match_0_or_greater
|
---|
164 | x
|
---|
165 | /^[1-9a-f]/b end
|
---|
166 | /^0/b next_compare
|
---|
167 | b bad_other
|
---|
168 |
|
---|
169 |
|
---|
170 | # Next round of the loop.
|
---|
171 | # 1. Drop the leading digit of the max address (BIOSORG).
|
---|
172 | # 2. Check if we've reached end of the address. If so, check that we've reached the space in the actual address.
|
---|
173 | # 3. Switch buffers so the actual address in the pattern space.
|
---|
174 | # 4. Drop the leading digit of the actual address.
|
---|
175 | # 5. Repeat.
|
---|
176 | :next_compare
|
---|
177 | s/^.//
|
---|
178 | /^$/b end_of_compare
|
---|
179 | x
|
---|
180 | s/^.//
|
---|
181 | b compare_loop
|
---|
182 |
|
---|
183 | :end_of_compare
|
---|
184 | x
|
---|
185 | /^. /b end
|
---|
186 | b bad
|
---|
187 |
|
---|
188 | :end
|
---|
189 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.