Rev 641 | Rev 653 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 641 | Rev 652 | ||
---|---|---|---|
Line 53... | Line 53... | ||
53 | ;; |
53 | ;; |
54 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
54 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 55... | Line 55... | ||
55 | 55 | ||
Line 56... | Line 56... | ||
56 | include 'macros.inc' |
56 | include 'macros.inc' |
Line 57... | Line 57... | ||
57 | 57 | ||
Line 58... | Line 58... | ||
58 | $Revision: 641 $ |
58 | $Revision: 652 $ |
Line 1323... | Line 1323... | ||
1323 | ; ebx = number or pointer |
1323 | ; ebx = number or pointer |
1324 | ; ecx = x shl 16 + y |
1324 | ; ecx = x shl 16 + y |
1325 | ; edx = color |
1325 | ; edx = color |
1326 | xor edi, edi |
1326 | xor edi, edi |
1327 | display_number_force: |
1327 | display_number_force: |
1328 | 1328 | push eax |
|
- | 1329 | and eax,0x7fffffff |
|
1329 | cmp eax,0xffff ; length > 0 ? |
1330 | cmp eax,0xffff ; length > 0 ? |
- | 1331 | pop eax |
|
1330 | jge cont_displ |
1332 | jge cont_displ |
1331 | ret |
1333 | ret |
1332 | cont_displ: |
1334 | cont_displ: |
1333 | 1335 | push eax |
|
- | 1336 | and eax,0x7fffffff |
|
1334 | cmp eax,61*0x10000 ; length <= 60 ? |
1337 | cmp eax,61*0x10000 ; length <= 60 ? |
- | 1338 | pop eax |
|
1335 | jb cont_displ2 |
1339 | jb cont_displ2 |
1336 | ret |
1340 | ret |
1337 | cont_displ2: |
1341 | cont_displ2: |
Line 1338... | Line 1342... | ||
1338 | 1342 | ||
Line 1345... | Line 1349... | ||
1345 | sub esp,64 |
1349 | sub esp,64 |
Line 1346... | Line 1350... | ||
1346 | 1350 | ||
1347 | cmp ah,0 ; DECIMAL |
1351 | cmp ah,0 ; DECIMAL |
1348 | jne no_display_desnum |
1352 | jne no_display_desnum |
- | 1353 | shr eax,16 |
|
1349 | shr eax,16 |
1354 | and eax,0x803f |
1350 | and eax,0x3f |
1355 | ; and eax,0x3f |
- | 1356 | push eax |
|
1351 | push eax |
1357 | and eax,0x3f |
1352 | mov edi,esp |
1358 | mov edi,esp |
1353 | add edi,4+64-1 |
1359 | add edi,4+64-1 |
1354 | mov ecx,eax |
1360 | mov ecx,eax |
1355 | mov eax,ebx |
1361 | mov eax,ebx |
Line 1360... | Line 1366... | ||
1360 | add dl,48 |
1366 | add dl,48 |
1361 | mov [edi],dl |
1367 | mov [edi],dl |
1362 | dec edi |
1368 | dec edi |
1363 | loop d_desnum |
1369 | loop d_desnum |
1364 | pop eax |
1370 | pop eax |
- | 1371 | call normalize_number |
|
1365 | call draw_num_text |
1372 | call draw_num_text |
1366 | add esp,64 |
1373 | add esp,64 |
1367 | popad |
1374 | popad |
1368 | ret |
1375 | ret |
1369 | no_display_desnum: |
1376 | no_display_desnum: |
Line 1370... | Line 1377... | ||
1370 | 1377 | ||
1371 | cmp ah,0x01 ; HEXADECIMAL |
1378 | cmp ah,0x01 ; HEXADECIMAL |
1372 | jne no_display_hexnum |
1379 | jne no_display_hexnum |
- | 1380 | shr eax,16 |
|
1373 | shr eax,16 |
1381 | and eax,0x803f |
1374 | and eax,0x3f |
1382 | ; and eax,0x3f |
- | 1383 | push eax |
|
1375 | push eax |
1384 | and eax,0x3f |
1376 | mov edi,esp |
1385 | mov edi,esp |
1377 | add edi,4+64-1 |
1386 | add edi,4+64-1 |
1378 | mov ecx,eax |
1387 | mov ecx,eax |
1379 | mov eax,ebx |
1388 | mov eax,ebx |
Line 1385... | Line 1394... | ||
1385 | mov dl,[edx] |
1394 | mov dl,[edx] |
1386 | mov [edi],dl |
1395 | mov [edi],dl |
1387 | dec edi |
1396 | dec edi |
1388 | loop d_hexnum |
1397 | loop d_hexnum |
1389 | pop eax |
1398 | pop eax |
- | 1399 | call normalize_number |
|
1390 | call draw_num_text |
1400 | call draw_num_text |
1391 | add esp,64 |
1401 | add esp,64 |
1392 | popad |
1402 | popad |
1393 | ret |
1403 | ret |
1394 | no_display_hexnum: |
1404 | no_display_hexnum: |
Line 1395... | Line 1405... | ||
1395 | 1405 | ||
1396 | cmp ah,0x02 ; BINARY |
1406 | cmp ah,0x02 ; BINARY |
1397 | jne no_display_binnum |
1407 | jne no_display_binnum |
- | 1408 | shr eax,16 |
|
1398 | shr eax,16 |
1409 | and eax,0x803f |
1399 | and eax,0x3f |
1410 | ; and eax,0x3f |
- | 1411 | push eax |
|
1400 | push eax |
1412 | and eax,0x3f |
1401 | mov edi,esp |
1413 | mov edi,esp |
1402 | add edi,4+64-1 |
1414 | add edi,4+64-1 |
1403 | mov ecx,eax |
1415 | mov ecx,eax |
1404 | mov eax,ebx |
1416 | mov eax,ebx |
Line 1409... | Line 1421... | ||
1409 | add dl,48 |
1421 | add dl,48 |
1410 | mov [edi],dl |
1422 | mov [edi],dl |
1411 | dec edi |
1423 | dec edi |
1412 | loop d_binnum |
1424 | loop d_binnum |
1413 | pop eax |
1425 | pop eax |
- | 1426 | call normalize_number |
|
1414 | call draw_num_text |
1427 | call draw_num_text |
1415 | add esp,64 |
1428 | add esp,64 |
1416 | popad |
1429 | popad |
1417 | ret |
1430 | ret |
1418 | no_display_binnum: |
1431 | no_display_binnum: |
Line 1419... | Line 1432... | ||
1419 | 1432 | ||
1420 | add esp,64 |
1433 | add esp,64 |
1421 | popad |
1434 | popad |
Line -... | Line 1435... | ||
- | 1435 | ret |
|
- | 1436 | ||
- | 1437 | normalize_number: |
|
- | 1438 | test ah,0x80 |
|
- | 1439 | jz .continue |
|
- | 1440 | mov ecx,48 |
|
- | 1441 | and eax,0x3f |
|
- | 1442 | @@: |
|
- | 1443 | inc edi |
|
- | 1444 | cmp [edi],cl |
|
- | 1445 | jne .continue |
|
- | 1446 | dec eax |
|
- | 1447 | cmp eax,1 |
|
- | 1448 | jne @r |
|
- | 1449 | .continue: |
|
- | 1450 | and eax,0x3f |
|
- | 1451 | ret |
|
Line 1422... | Line 1452... | ||
1422 | ret |
1452 | |
Line 1423... | Line 1453... | ||
1423 | 1453 | ||
1424 | 1454 |