Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
485 | heavyiron | 1 | ;////////////////////////////////////////////// |
2 | ;Decoding Brand ID for Intel |
||
3 | |||
4 | |||
5 | |||
6 | decodebrand: |
||
7 | |||
8 | |||
9 | cmp dword[smallvendor], 'cAMD' |
||
10 | jz amd_br |
||
11 | cmp dword[smallvendor], 'ntel' |
||
12 | jz intel_br |
||
13 | jmp Bi00 ; if not AMD or Intel |
||
14 | |||
15 | amd_br: ;;;;;;;;;;;;;;;;;;;;; amd brand |
||
16 | |||
17 | xor eax,eax |
||
18 | inc eax |
||
19 | cpuid |
||
20 | |||
21 | cnnn0: |
||
22 | cmp bl, 00h |
||
23 | ja rr |
||
24 | je cnnn1 |
||
25 | |||
26 | rr: |
||
27 | mov byte [brand], bl ; |
||
28 | Text 60,250,0x00000000,abrand00, abrand00len-abrand00 |
||
29 | jmp B000 |
||
30 | ;jmp comppp |
||
31 | |||
32 | cnnn1: |
||
33 | |||
34 | mov eax, 0x80000001 ; CPUID ext. function 0x80000001 |
||
35 | cpuid |
||
36 | |||
37 | cmp ebx, 0 |
||
38 | je Bi00 |
||
39 | mov word [brand], bx ; |
||
40 | |||
41 | comppp: |
||
42 | cmp [brand], 400h |
||
43 | jl res1 |
||
44 | cmp [brand], 500h |
||
45 | jl res2 |
||
46 | jae res3 |
||
47 | |||
48 | |||
49 | res1: |
||
50 | Text 60,250,0x00000000,abrand0, abrand0len-abrand0 |
||
51 | jmp B000 |
||
52 | |||
53 | res2: |
||
54 | Text 60,250,0x00000000,abrand1, abrand1len-abrand1 |
||
55 | jmp B000 |
||
56 | |||
57 | res3: |
||
58 | Text 60,250,0x00000000,abrand2, abrand2len-abrand2 |
||
59 | jmp B000 |
||
60 | ;;;;;;;;;;;;;;;;;;;;; intel brand |
||
61 | intel_br: |
||
62 | xor eax,eax |
||
63 | inc eax |
||
64 | cpuid |
||
65 | cmp0: |
||
66 | cmp bl, 00h |
||
67 | je Bi00 |
||
68 | |||
69 | cmp1: |
||
70 | cmp bl, 01h |
||
71 | je Bi01 |
||
72 | |||
73 | cmp2: |
||
74 | cmp bl, 02h |
||
75 | je Bi02 |
||
76 | |||
77 | cmp3: |
||
78 | cmp bl, 03h |
||
79 | je Bi03 |
||
80 | |||
81 | cmp4: |
||
82 | cmp bl, 04h |
||
83 | je Bi04 |
||
84 | |||
85 | cmp6: |
||
86 | cmp bl, 06h |
||
87 | je Bi06 |
||
88 | |||
89 | cmp7: |
||
90 | cmp bl, 07h |
||
91 | je Bi07 |
||
92 | |||
93 | cmp8: |
||
94 | cmp bl, 08h |
||
95 | je Bi08 |
||
96 | |||
97 | cmp9: |
||
98 | cmp bl, 09h |
||
99 | je Bi09 |
||
100 | |||
101 | cmpA: |
||
102 | cmp bl, 0Ah |
||
103 | je Bi0A |
||
104 | |||
105 | cmpB: |
||
106 | cmp bl, 0Bh |
||
107 | je Bi0B |
||
108 | |||
109 | cmpC: |
||
110 | cmp bl, 0Ch |
||
111 | je Bi0C |
||
112 | |||
113 | cmpE: |
||
114 | cmp bl, 0Eh |
||
115 | je Bi0E |
||
116 | |||
117 | cmpF: |
||
118 | cmp bl, 0Fh |
||
119 | je Bi0F |
||
120 | |||
121 | cmp11: |
||
122 | cmp bl, 11h |
||
123 | je Bi11 |
||
124 | |||
125 | cmp12: |
||
126 | cmp bl, 12h |
||
127 | je Bi12 |
||
128 | |||
129 | cmp13: |
||
130 | cmp bl, 13h |
||
131 | je Bi13 |
||
132 | |||
133 | cmp14: |
||
134 | cmp bl, 14h |
||
135 | je Bi14 |
||
136 | |||
137 | cmp15: |
||
138 | cmp bl, 15h |
||
139 | je Bi15 |
||
140 | |||
141 | cmp16: |
||
142 | cmp bl, 16h |
||
143 | je Bi16 |
||
144 | |||
145 | cmp17: |
||
146 | cmp bl, 17h |
||
147 | je Bi17 |
||
148 | |||
149 | jne Bi00 |
||
150 | |||
151 | ;------------------ |
||
152 | Bi00: |
||
153 | mov byte [brand], bl ;00h |
||
154 | Text 60,250,0x00000000,brand0, brand0len-brand0 |
||
155 | ;Number 270,180,1*256,2,dword [brand],0x000000 was in v. 1.11 |
||
156 | jmp B000 |
||
157 | |||
158 | Bi01: |
||
159 | mov [brand], 01h |
||
160 | Text 60,250,0x00000000,brand01, brand01len-brand01 |
||
161 | jmp B000 |
||
162 | |||
163 | Bi02: |
||
164 | mov [brand], 02h |
||
165 | Text 60,250,0x00000000,brand02, brand02len-brand02 |
||
166 | jmp B000 |
||
167 | |||
168 | Bi03: |
||
169 | mov [brand], 03h |
||
170 | |||
171 | cmp [m], 8 |
||
172 | je E3 |
||
173 | Text 60,250,0x00000000,brand03, brand03len-brand03 |
||
174 | jmp B000 |
||
175 | E3: |
||
176 | Text 60,250,0x00000000,brand03d, brand03dlen-brand03d |
||
177 | jmp B000 |
||
178 | |||
179 | Bi04: |
||
180 | mov [brand], 04h |
||
181 | Text 60,250,0x00000000,brand04, brand04len-brand04 |
||
182 | jmp B000 |
||
183 | |||
184 | Bi06: |
||
185 | mov [brand], 06h |
||
186 | Text 60,250,0x00000000,brand06, brand06len-brand06 |
||
187 | jmp B000 |
||
188 | |||
189 | Bi07: |
||
190 | mov [brand], 07h |
||
191 | Text 60,250,0x00000000,brand07, brand07len-brand07 |
||
192 | jmp B000 |
||
193 | |||
194 | Bi08: |
||
195 | mov [brand], 08h |
||
196 | Text 60,250,0x00000000,brand08, brand08len-brand08 |
||
197 | jmp B000 |
||
198 | |||
199 | Bi09: |
||
200 | mov [brand], 09h |
||
201 | Text 60,250,0x00000000,brand09, brand09len-brand09 |
||
202 | jmp B000 |
||
203 | |||
204 | Bi0A: |
||
205 | mov [brand], 0Ah |
||
206 | Text 60,250,0x00000000,brand0A, brand0Alen-brand0A |
||
207 | jmp B000 |
||
208 | |||
209 | Bi0B: |
||
210 | mov [brand], 0Bh |
||
211 | |||
212 | cmp [m], 13 |
||
213 | jl Eb |
||
214 | Text 60,250,0x00000000,brand0B, brand0Blen-brand0B |
||
215 | jmp B000 |
||
216 | Eb: |
||
217 | Text 60,250,0x00000000,brand0Bd, brand0Bdlen-brand0Bd |
||
218 | jmp B000 |
||
219 | |||
220 | Bi0C: |
||
221 | mov [brand], 0Ch |
||
222 | Text 60,250,0x00000000,brand0C, brand0Clen-brand0C |
||
223 | jmp B000 |
||
224 | |||
225 | Bi0E: |
||
226 | mov [brand], 0Eh |
||
227 | |||
228 | cmp [m], 13 |
||
229 | jl Ed |
||
230 | Text 60,250,0x00000000,brand0E, brand0Elen-brand0E |
||
231 | jmp B000 |
||
232 | Ed: |
||
233 | Text 60,250,0x00000000,brand0Ed, brand0Edlen-brand0Ed |
||
234 | jmp B000 |
||
235 | |||
236 | Bi0F: |
||
237 | mov [brand], 0Fh |
||
238 | Text 60,250,0x00000000,brand0F, brand0Flen-brand0F |
||
239 | jmp B000 |
||
240 | |||
241 | Bi11: |
||
242 | mov [brand], 11h |
||
243 | Text 60,250,0x00000000,brand11, brand11len-brand11 |
||
244 | jmp B000 |
||
245 | |||
246 | Bi12: |
||
247 | mov [brand], 12h |
||
248 | Text 60,250,0x00000000,brand12, brand12len-brand12 |
||
249 | jmp B000 |
||
250 | |||
251 | Bi13: |
||
252 | mov [brand], 13h |
||
253 | Text 60,250,0x00000000,brand13, brand13len-brand13 |
||
254 | jmp B000 |
||
255 | |||
256 | Bi14: |
||
257 | mov [brand], 14h |
||
258 | Text 60,250,0x00000000,brand14, brand14len-brand14 |
||
259 | jmp B000 |
||
260 | |||
261 | Bi15: |
||
262 | mov [brand], 15h |
||
263 | Text 60,250,0x00000000,brand15, brand15len-brand15 |
||
264 | jmp B000 |
||
265 | |||
266 | Bi16: |
||
267 | mov [brand], 16h |
||
268 | Text 60,250,0x00000000,brand16, brand16len-brand16 |
||
269 | jmp B000 |
||
270 | |||
271 | Bi17: |
||
272 | mov [brand], 17h |
||
273 | Text 60,250,0x00000000,brand17, brand17len-brand17 |
||
274 | jmp B000 |
||
275 | |||
276 | B000: |
||
277 | |||
278 | ret |