Subversion Repositories Kolibri OS

Rev

Rev 485 | Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  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. test bl, bl
  23. jz cnnn1
  24.  
  25. rr:
  26. mov byte [brand], bl ;
  27. Text 60,250,0x00000000,abrand00, abrand00len-abrand00
  28. ret
  29. ;jmp comppp
  30.  
  31. cnnn1:
  32.  
  33. mov     eax, 0x80000001               ; CPUID ext. function 0x80000001
  34. cpuid
  35.  
  36. test ebx, ebx
  37. je Bi00
  38. mov [brand], ebx ;
  39.  
  40. comppp:
  41. cmp  byte [brand+1], 4
  42. jb   res1
  43. jz   res2
  44. ja   res3
  45.  
  46.  
  47. res1:
  48. Text 60,250,0x00000000,abrand0, abrand0len-abrand0
  49. ret
  50.  
  51. res2:
  52. Text 60,250,0x00000000,abrand1, abrand1len-abrand1
  53. ret
  54.  
  55. res3:
  56. Text 60,250,0x00000000,abrand2, abrand2len-abrand2
  57. ret
  58.              ;;;;;;;;;;;;;;;;;;;;; intel brand
  59. intel_br:
  60.       xor eax,eax
  61.       inc eax
  62.       cpuid
  63.       movzx ebx, bl
  64.       mov [brand], ebx
  65. cmp0:
  66. test ebx, ebx
  67. je Bi00
  68.  
  69. cmp1:
  70. dec ebx
  71. je Bi01
  72.  
  73. cmp2:
  74. dec ebx
  75. je Bi02
  76.  
  77. cmp3:
  78. dec ebx
  79. je Bi03
  80.  
  81. cmp4:
  82. dec ebx
  83. je Bi04
  84.  
  85. cmp6:
  86. dec ebx
  87. dec ebx
  88. je Bi06
  89.  
  90. cmp7:
  91. dec ebx
  92. je Bi07
  93.  
  94. cmp8:
  95. dec ebx
  96. je Bi08
  97.  
  98. cmp9:
  99. dec ebx
  100. je Bi09
  101.  
  102. cmpA:
  103. dec ebx
  104. je Bi0A
  105.  
  106. cmpB:
  107. dec ebx
  108. je Bi0B
  109.  
  110. cmpC:
  111. dec ebx
  112. je Bi0C
  113.  
  114. cmpE:
  115. dec ebx
  116. dec ebx
  117. je Bi0E
  118.  
  119. cmpF:
  120. dec ebx
  121. je Bi0F
  122.  
  123. cmp11:
  124. dec ebx
  125. dec ebx
  126. je Bi11
  127.  
  128. cmp12:
  129. dec ebx
  130. je Bi12
  131.  
  132. cmp13:
  133. dec ebx
  134. je Bi13
  135.  
  136. cmp14:
  137. dec ebx
  138. je Bi14
  139.  
  140. cmp15:
  141. dec ebx
  142. je Bi15
  143.  
  144. cmp16:
  145. dec ebx
  146. je Bi16
  147.  
  148. cmp17:
  149. dec ebx
  150. je Bi17
  151.  
  152. ;------------------
  153. Bi00:
  154. Text 60,250,0x00000000,brand0, brand0len-brand0
  155. ;Number 270,180,1*256,2,dword [brand],0x000000     was in v. 1.11
  156. ret
  157.  
  158. Bi01:
  159. Text 60,250,0x00000000,brand01, brand01len-brand01
  160. ret
  161.  
  162. Bi02:
  163. Text 60,250,0x00000000,brand02, brand02len-brand02
  164. ret
  165.  
  166. Bi03:
  167.  
  168. cmp [m], 8
  169. je E3
  170. Text 60,250,0x00000000,brand03, brand03len-brand03
  171. ret
  172. E3:
  173. Text 60,250,0x00000000,brand03d, brand03dlen-brand03d
  174. ret
  175.  
  176. Bi04:
  177. Text 60,250,0x00000000,brand04, brand04len-brand04
  178. ret
  179.  
  180. Bi06:
  181. Text 60,250,0x00000000,brand06, brand06len-brand06
  182. ret
  183.  
  184. Bi07:
  185. Text 60,250,0x00000000,brand07, brand07len-brand07
  186. ret
  187.  
  188. Bi08:
  189. Text 60,250,0x00000000,brand08, brand08len-brand08
  190. ret
  191.  
  192. Bi09:
  193. Text 60,250,0x00000000,brand09, brand09len-brand09
  194. ret
  195.  
  196. Bi0A:
  197. Text 60,250,0x00000000,brand0A, brand0Alen-brand0A
  198. ret
  199.  
  200. Bi0B:
  201.  
  202. cmp [m], 13
  203. jl Eb
  204. Text 60,250,0x00000000,brand0B, brand0Blen-brand0B
  205. ret
  206. Eb:
  207. Text 60,250,0x00000000,brand0Bd, brand0Bdlen-brand0Bd
  208. ret
  209.  
  210. Bi0C:
  211. Text 60,250,0x00000000,brand0C, brand0Clen-brand0C
  212. ret
  213.  
  214. Bi0E:
  215.  
  216. cmp [m], 13
  217. jl Ed
  218. Text 60,250,0x00000000,brand0E, brand0Elen-brand0E
  219. ret
  220. Ed:
  221. Text 60,250,0x00000000,brand0Ed, brand0Edlen-brand0Ed
  222. ret
  223.  
  224. Bi0F:
  225. Text 60,250,0x00000000,brand0F, brand0Flen-brand0F
  226. ret
  227.  
  228. Bi11:
  229. Text 60,250,0x00000000,brand11, brand11len-brand11
  230. ret
  231.  
  232. Bi12:
  233. Text 60,250,0x00000000,brand12, brand12len-brand12
  234. ret
  235.  
  236. Bi13:
  237. Text 60,250,0x00000000,brand13, brand13len-brand13
  238. ret
  239.  
  240. Bi14:
  241. Text 60,250,0x00000000,brand14, brand14len-brand14
  242. ret
  243.  
  244. Bi15:
  245. Text 60,250,0x00000000,brand15, brand15len-brand15
  246. ret
  247.  
  248. Bi16:
  249. Text 60,250,0x00000000,brand16, brand16len-brand16
  250. ret
  251.  
  252. Bi17:
  253. Text 60,250,0x00000000,brand17, brand17len-brand17
  254. ret
  255.