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>㭪樨
|
* eax = 47 - <20><><EFBFBD><EFBFBD><EFBFBD> <20>㭪樨
|
||||||
* ebx = <20><>ࠬ<EFBFBD><E0A0AC><EFBFBD><EFBFBD> <20>८<EFBFBD>ࠧ<EFBFBD><E0A0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20> ⥪<><E2A5AA>:
|
* ebx = <20><>ࠬ<EFBFBD><E0A0AC><EFBFBD><EFBFBD> <20>८<EFBFBD>ࠧ<EFBFBD><E0A0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20> ⥪<><E2A5AA>:
|
||||||
* bl = 0 - ecx ᮤ<>ন<EFBFBD> <20><>
|
* 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 = 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 = 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>
|
* 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> 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>
|
* <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)
|
* 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]
|
* 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
|
* eax = 47 - function number
|
||||||
* ebx = parameters of conversion number to text:
|
* ebx = parameters of conversion number to text:
|
||||||
* bl = 0 - ecx contains number
|
* 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 = 0 - display in decimal number system
|
||||||
* bh = 1 - display in hexadecimal system
|
* bh = 1 - display in hexadecimal system
|
||||||
* bh = 2 - display in binary system
|
* bh = 2 - display in binary system
|
||||||
* bits 16-21 = how many digits to display
|
* 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
|
* 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)
|
* ecx = number (if bl=0) or pointer (if bl=1)
|
||||||
* edx = [coordinate on axis x]*65536 + [coordinate on axis y]
|
* edx = [coordinate on axis x]*65536 + [coordinate on axis y]
|
||||||
|
@@ -1329,14 +1329,14 @@ display_number:
|
|||||||
xor edi, edi
|
xor edi, edi
|
||||||
display_number_force:
|
display_number_force:
|
||||||
push eax
|
push eax
|
||||||
and eax,0x7fffffff
|
and eax,0x3fffffff
|
||||||
cmp eax,0xffff ; length > 0 ?
|
cmp eax,0xffff ; length > 0 ?
|
||||||
pop eax
|
pop eax
|
||||||
jge cont_displ
|
jge cont_displ
|
||||||
ret
|
ret
|
||||||
cont_displ:
|
cont_displ:
|
||||||
push eax
|
push eax
|
||||||
and eax,0x7fffffff
|
and eax,0x3fffffff
|
||||||
cmp eax,61*0x10000 ; length <= 60 ?
|
cmp eax,61*0x10000 ; length <= 60 ?
|
||||||
pop eax
|
pop eax
|
||||||
jb cont_displ2
|
jb cont_displ2
|
||||||
@@ -1347,6 +1347,9 @@ display_number_force:
|
|||||||
|
|
||||||
cmp al,1 ; ecx is a pointer ?
|
cmp al,1 ; ecx is a pointer ?
|
||||||
jne displnl1
|
jne displnl1
|
||||||
|
mov ebp,ebx
|
||||||
|
add ebp,4
|
||||||
|
mov ebp,[ebp+std_application_base_address]
|
||||||
mov ebx,[ebx+std_application_base_address]
|
mov ebx,[ebx+std_application_base_address]
|
||||||
displnl1:
|
displnl1:
|
||||||
sub esp,64
|
sub esp,64
|
||||||
@@ -1354,7 +1357,7 @@ display_number_force:
|
|||||||
cmp ah,0 ; DECIMAL
|
cmp ah,0 ; DECIMAL
|
||||||
jne no_display_desnum
|
jne no_display_desnum
|
||||||
shr eax,16
|
shr eax,16
|
||||||
and eax,0x803f
|
and eax,0xC03f
|
||||||
; and eax,0x3f
|
; and eax,0x3f
|
||||||
push eax
|
push eax
|
||||||
and eax,0x3f
|
and eax,0x3f
|
||||||
@@ -1365,6 +1368,7 @@ display_number_force:
|
|||||||
mov ebx,10
|
mov ebx,10
|
||||||
d_desnum:
|
d_desnum:
|
||||||
xor edx,edx
|
xor edx,edx
|
||||||
|
call division_64_bits
|
||||||
div ebx
|
div ebx
|
||||||
add dl,48
|
add dl,48
|
||||||
mov [edi],dl
|
mov [edi],dl
|
||||||
@@ -1381,7 +1385,7 @@ display_number_force:
|
|||||||
cmp ah,0x01 ; HEXADECIMAL
|
cmp ah,0x01 ; HEXADECIMAL
|
||||||
jne no_display_hexnum
|
jne no_display_hexnum
|
||||||
shr eax,16
|
shr eax,16
|
||||||
and eax,0x803f
|
and eax,0xC03f
|
||||||
; and eax,0x3f
|
; and eax,0x3f
|
||||||
push eax
|
push eax
|
||||||
and eax,0x3f
|
and eax,0x3f
|
||||||
@@ -1392,6 +1396,7 @@ display_number_force:
|
|||||||
mov ebx,16
|
mov ebx,16
|
||||||
d_hexnum:
|
d_hexnum:
|
||||||
xor edx,edx
|
xor edx,edx
|
||||||
|
call division_64_bits
|
||||||
div ebx
|
div ebx
|
||||||
add edx,hexletters
|
add edx,hexletters
|
||||||
mov dl,[edx]
|
mov dl,[edx]
|
||||||
@@ -1409,7 +1414,7 @@ display_number_force:
|
|||||||
cmp ah,0x02 ; BINARY
|
cmp ah,0x02 ; BINARY
|
||||||
jne no_display_binnum
|
jne no_display_binnum
|
||||||
shr eax,16
|
shr eax,16
|
||||||
and eax,0x803f
|
and eax,0xC03f
|
||||||
; and eax,0x3f
|
; and eax,0x3f
|
||||||
push eax
|
push eax
|
||||||
and eax,0x3f
|
and eax,0x3f
|
||||||
@@ -1420,6 +1425,7 @@ display_number_force:
|
|||||||
mov ebx,2
|
mov ebx,2
|
||||||
d_binnum:
|
d_binnum:
|
||||||
xor edx,edx
|
xor edx,edx
|
||||||
|
call division_64_bits
|
||||||
div ebx
|
div ebx
|
||||||
add dl,48
|
add dl,48
|
||||||
mov [edi],dl
|
mov [edi],dl
|
||||||
@@ -1453,7 +1459,16 @@ normalize_number:
|
|||||||
and eax,0x3f
|
and eax,0x3f
|
||||||
ret
|
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:
|
draw_num_text:
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user