Rev 214 | Rev 227 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 214 | Rev 221 | ||
---|---|---|---|
Line 1051... | Line 1051... | ||
1051 | pushfd |
1051 | pushfd |
1052 | pop eax |
1052 | pop eax |
1053 | xor eax, ecx |
1053 | xor eax, ecx |
1054 | mov [cpu_type], CPU_386 |
1054 | mov [cpu_type], CPU_386 |
1055 | jz .end_cpu |
1055 | jz .end_cpuid |
1056 | push ecx |
1056 | push ecx |
1057 | popfd |
1057 | popfd |
1058 | 1058 | ||
Line 1059... | Line 1059... | ||
1059 | mov [cpu_type], CPU_486 |
1059 | mov [cpu_type], CPU_486 |
1060 | mov eax, ecx |
1060 | mov eax, ecx |
Line 1063... | Line 1063... | ||
1063 | popfd |
1063 | popfd |
1064 | pushfd |
1064 | pushfd |
1065 | pop eax |
1065 | pop eax |
1066 | xor eax, ecx |
1066 | xor eax, ecx |
1067 | je .end_cpu |
1067 | je .end_cpuid |
1068 | mov [cpu_id], 1 |
1068 | mov [cpu_id], 1 |
1069 | 1069 | ||
Line 1070... | Line 1070... | ||
1070 | xor eax, eax |
1070 | xor eax, eax |
1071 | cpuid |
1071 | cpuid |
1072 | mov [cpu_vendor], ebx |
1072 | mov [cpu_vendor], ebx |
Line 1089... | Line 1089... | ||
1089 | mov [cpu_caps+4],ecx |
1089 | mov [cpu_caps+4],ecx |
1090 | 1090 | ||
Line 1091... | Line 1091... | ||
1091 | shr eax, 8 |
1091 | shr eax, 8 |
1092 | and eax, 0x0f |
1092 | and eax, 0x0f |
1093 | mov [cpu_type], eax |
- | |
1094 | ret |
1093 | ret |
1095 | - | ||
1096 | .end_cpuid: |
1094 | .end_cpuid: |
1097 | mov eax, [cpu_type] |
1095 | mov eax, [cpu_type] |
1098 | ret |
1096 | ret |
Line 1099... | Line 1097... | ||
1099 | 1097 | ||
1100 | .check_AMD: |
1098 | .check_AMD: |
1101 | cmp ebx, dword [AMD_str] |
1099 | cmp ebx, dword [AMD_str] |
1102 | jne .end_cpu |
1100 | jne .unknown |
1103 | cmp edx, dword [AMD_str+4] |
1101 | cmp edx, dword [AMD_str+4] |
1104 | jne .end_cpu |
1102 | jne .unknown |
1105 | cmp ecx, dword [AMD_str+8] |
1103 | cmp ecx, dword [AMD_str+8] |
1106 | jne .end_cpu |
1104 | jne .unknown |
1107 | mov [cpu_AMD], 1 |
1105 | mov [cpu_AMD], 1 |
1108 | cmp eax, 1 |
1106 | cmp eax, 1 |
- | 1107 | jl .unknown |
|
- | 1108 | mov eax, 1 |
|
- | 1109 | cpuid |
|
- | 1110 | mov [cpu_sign], eax |
|
- | 1111 | mov [cpu_info], ebx |
|
- | 1112 | mov [cpu_caps], edx |
|
- | 1113 | mov [cpu_caps+4],ecx |
|
- | 1114 | shr eax, 8 |
|
- | 1115 | and eax, 0x0f |
|
- | 1116 | ret |
|
1109 | jl .end_cpuid |
1117 | .unknown: |
1110 | mov eax, 1 |
1118 | mov eax, 1 |
1111 | cpuid |
1119 | cpuid |
1112 | mov [cpu_sign], eax |
1120 | mov [cpu_sign], eax |
1113 | mov [cpu_info], ebx |
1121 | mov [cpu_info], ebx |
1114 | mov [cpu_caps], edx |
1122 | mov [cpu_caps], edx |
1115 | mov [cpu_caps+4],ecx |
1123 | mov [cpu_caps+4],ecx |
1116 | shr eax, 8 |
1124 | shr eax, 8 |
1117 | and eax, 0x0f |
- | |
1118 | mov [cpu_type], eax |
- | |
1119 | .end_cpu: |
- | |
1120 | mov eax, [cpu_type] |
1125 | and eax, 0x0f |
1121 | ret |
1126 | ret |
Line 1122... | Line 1127... | ||
1122 | endp |
1127 | endp |
1123 | 1128 | ||
Line 1261... | Line 1266... | ||
1261 | cpu_vendor rd 3 |
1266 | cpu_vendor rd 3 |
1262 | cpu_sign rd 1 |
1267 | cpu_sign rd 1 |
1263 | cpu_info rd 1 |
1268 | cpu_info rd 1 |
Line -... | Line 1269... | ||
- | 1269 | ||
- | 1270 | ;;;;; cursors data |
|
- | 1271 | ||
- | 1272 | align 16 |
|
- | 1273 | cur_saved_data rb 4096 |
|
- | 1274 | ||
- | 1275 | cursors rb CURSOR_SIZE*64 |
|
- | 1276 | cursor_map rd 2 |
|
- | 1277 | cursor_start rd 1 |
|
- | 1278 | cursor_end rd 1 |
|
- | 1279 | ||
- | 1280 | def_cursor rd 1 |
|
- | 1281 | ||
- | 1282 | scr_width rd 1 |
|
- | 1283 | scr_height rd 1 |
|
- | 1284 | ||
- | 1285 | cur_def_interl rd 1 |
|
- | 1286 | cur_saved_base rd 1 |
|
- | 1287 | cur_saved_interl rd 1 |
|
- | 1288 | cur_saved_w rd 1 |
|
- | 1289 | cur_saved_h rd 1 |
|
1264 | 1290 | ||
Line 1265... | Line 1291... | ||
1265 | endg |
1291 | endg |
1266 | 1292 | ||
1267 | uglobal |
1293 | uglobal |