Function 47 - output of qword (64-bites) number
git-svn-id: svn://kolibrios.org@655 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -2198,12 +2198,13 @@ dd 638
|
||||
* eax = 47 - <20><><EFBFBD><EFBFBD><EFBFBD> <20>㭪樨
|
||||
* ebx = <20><>ࠬ<EFBFBD><E0A0AC><EFBFBD><EFBFBD> <20>८<EFBFBD>ࠧ<EFBFBD><E0A0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20> ⥪<><E2A5AA>:
|
||||
* bl = 0 - ecx ᮤ<>ন<EFBFBD> <20><>
|
||||
* bl = 1 - ecx ᮤ<>ন<EFBFBD> 㪠<><E3AAA0>⥫<EFBFBD> <20><> dword-<2D><>
|
||||
* bl = 1 - ecx ᮤ<>ন<EFBFBD> 㪠<><E3AAA0>⥫<EFBFBD> <20><> dword-<2D><>, <20><><EFBFBD><EFBFBD> qword-<2D><>
|
||||
* bh = 0 - <20>⮡ࠦ<E2AEA1><E0A0A6><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>筮<EFBFBD> <20><><EFBFBD>⥬<EFBFBD> <20><><EFBFBD><EFBFBD><E1ABA5><EFBFBD>
|
||||
* bh = 1 - <20>⮡ࠦ<E2AEA1><E0A0A6><EFBFBD> <20> <20><><EFBFBD>⭠<EFBFBD><E2ADA0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>筮<EFBFBD> <20><><EFBFBD>⥬<EFBFBD>
|
||||
* bh = 2 - <20>⮡ࠦ<E2AEA1><E0A0A6><EFBFBD> <20> <20><><EFBFBD><EFBFBD>筮<EFBFBD> <20><><EFBFBD>⥬<EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD> 16-21 = <>쪮 <20><><EFBFBD><EFBFBD> <20>⮡ࠦ<E2AEA1><E0A0A6><EFBFBD>
|
||||
* <20><><EFBFBD><EFBFBD> 22-30 <20><>१<EFBFBD>ࢨ<E0A2A8><E0AEA2><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> 0
|
||||
* <20><><EFBFBD><EFBFBD> 22-29 <20><>१<EFBFBD>ࢨ<E0A2A8><E0AEA2><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> 0
|
||||
* <20><><EFBFBD> 30 - <20><>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD> <20> 1, <20> <20>ॡ<EFBFBD><E0A5A1><EFBFBD><EFBFBD><EFBFBD> <20>뢮<EFBFBD> qword (64-<2D><>⭮<EFBFBD><E2ADAE>) <20><>
|
||||
* <20><><EFBFBD> 31 - <20><>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD> <20> 1, <20> <20>ॡ<EFBFBD><E0A5A1><EFBFBD><EFBFBD><EFBFBD> <20>뢮<EFBFBD> <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>㫥<EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ࠧ<>鸞<EFBFBD>
|
||||
* ecx = <20><> (<28><><EFBFBD> bl=0) <20><><EFBFBD> 㪠<><E3AAA0>⥫<EFBFBD> (<28><><EFBFBD> bl=1)
|
||||
* edx = [<5B><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> x]*65536 + [<5B><><EFBFBD>न<EFBFBD><E0A4A8><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> y]
|
||||
|
@@ -2169,12 +2169,13 @@ Parameters:
|
||||
* eax = 47 - function number
|
||||
* ebx = parameters of conversion number to text:
|
||||
* bl = 0 - ecx contains number
|
||||
* bl = 1 - ecx contains pointer to dword-number
|
||||
* bl = 1 - ecx contains pointer to dword-number, or qword-number
|
||||
* bh = 0 - display in decimal number system
|
||||
* bh = 1 - display in hexadecimal system
|
||||
* bh = 2 - display in binary system
|
||||
* bits 16-21 = how many digits to display
|
||||
* bits 22-30 reserved and must be set to 0
|
||||
* bits 22-29 reserved and must be set to 0
|
||||
* bit 30 - set in 1, if the output of qword (64-bites) number
|
||||
* bit 31 - set in 1, if the output of number without empty zero in high bits is required
|
||||
* ecx = number (if bl=0) or pointer (if bl=1)
|
||||
* edx = [coordinate on axis x]*65536 + [coordinate on axis y]
|
||||
|
@@ -1326,35 +1326,38 @@ display_number:
|
||||
; ebx = number or pointer
|
||||
; ecx = x shl 16 + y
|
||||
; edx = color
|
||||
xor edi, edi
|
||||
xor edi, edi
|
||||
display_number_force:
|
||||
push eax
|
||||
and eax,0x7fffffff
|
||||
cmp eax,0xffff ; length > 0 ?
|
||||
pop eax
|
||||
and eax,0x3fffffff
|
||||
cmp eax,0xffff ; length > 0 ?
|
||||
pop eax
|
||||
jge cont_displ
|
||||
ret
|
||||
cont_displ:
|
||||
push eax
|
||||
and eax,0x7fffffff
|
||||
cmp eax,61*0x10000 ; length <= 60 ?
|
||||
pop eax
|
||||
and eax,0x3fffffff
|
||||
cmp eax,61*0x10000 ; length <= 60 ?
|
||||
pop eax
|
||||
jb cont_displ2
|
||||
ret
|
||||
cont_displ2:
|
||||
|
||||
pushad
|
||||
|
||||
cmp al,1 ; ecx is a pointer ?
|
||||
cmp al,1 ; ecx is a pointer ?
|
||||
jne displnl1
|
||||
mov ebp,ebx
|
||||
add ebp,4
|
||||
mov ebp,[ebp+std_application_base_address]
|
||||
mov ebx,[ebx+std_application_base_address]
|
||||
displnl1:
|
||||
sub esp,64
|
||||
|
||||
cmp ah,0 ; DECIMAL
|
||||
cmp ah,0 ; DECIMAL
|
||||
jne no_display_desnum
|
||||
shr eax,16
|
||||
and eax,0x803f
|
||||
and eax,0xC03f
|
||||
; and eax,0x3f
|
||||
push eax
|
||||
and eax,0x3f
|
||||
@@ -1365,6 +1368,7 @@ display_number_force:
|
||||
mov ebx,10
|
||||
d_desnum:
|
||||
xor edx,edx
|
||||
call division_64_bits
|
||||
div ebx
|
||||
add dl,48
|
||||
mov [edi],dl
|
||||
@@ -1378,10 +1382,10 @@ display_number_force:
|
||||
ret
|
||||
no_display_desnum:
|
||||
|
||||
cmp ah,0x01 ; HEXADECIMAL
|
||||
cmp ah,0x01 ; HEXADECIMAL
|
||||
jne no_display_hexnum
|
||||
shr eax,16
|
||||
and eax,0x803f
|
||||
and eax,0xC03f
|
||||
; and eax,0x3f
|
||||
push eax
|
||||
and eax,0x3f
|
||||
@@ -1392,6 +1396,7 @@ display_number_force:
|
||||
mov ebx,16
|
||||
d_hexnum:
|
||||
xor edx,edx
|
||||
call division_64_bits
|
||||
div ebx
|
||||
add edx,hexletters
|
||||
mov dl,[edx]
|
||||
@@ -1406,10 +1411,10 @@ display_number_force:
|
||||
ret
|
||||
no_display_hexnum:
|
||||
|
||||
cmp ah,0x02 ; BINARY
|
||||
cmp ah,0x02 ; BINARY
|
||||
jne no_display_binnum
|
||||
shr eax,16
|
||||
and eax,0x803f
|
||||
and eax,0xC03f
|
||||
; and eax,0x3f
|
||||
push eax
|
||||
and eax,0x3f
|
||||
@@ -1420,6 +1425,7 @@ display_number_force:
|
||||
mov ebx,2
|
||||
d_binnum:
|
||||
xor edx,edx
|
||||
call division_64_bits
|
||||
div ebx
|
||||
add dl,48
|
||||
mov [edi],dl
|
||||
@@ -1453,7 +1459,16 @@ normalize_number:
|
||||
and eax,0x3f
|
||||
ret
|
||||
|
||||
|
||||
division_64_bits:
|
||||
test [esp+1+4],byte 0x40
|
||||
jz .continue
|
||||
push eax
|
||||
mov eax,ebp
|
||||
div ebx
|
||||
mov ebp,eax
|
||||
pop eax
|
||||
.continue:
|
||||
ret
|
||||
|
||||
draw_num_text:
|
||||
|
||||
|
Reference in New Issue
Block a user