Board.KolibriOS.org

Official KolibriOS board
It is currently Wed May 22, 2019 10:24 pm

All times are UTC+03:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
 Post subject: SysFn47:DrawNumber
PostPosted: Wed Mar 07, 2018 10:24 pm 
Offline

Joined: Sun Oct 30, 2011 6:43 pm
Posts: 1499
Quote:
======================================================================
============= Function 47 - draw a number in the window. =============
======================================================================
Parameters:
* eax = 47 - function number
* ebx = parameters of conversion number to text:
............................................................................
* bh = 2 - display in binary system
............................................................................
* bit 30 set = display qword (64-bit) number (must be bl=1)
............................................................................
Remarks:
* The given length must not exceed 60.
............................................................................
В kernel.asm происходят такие проверки:
Code:
display_number:
............................................................................
display_number_force:
        push    eax
        and     eax, 0x3fffffff
        cmp     eax, 0xffff     ; length > 0 ?
        pop     eax
        jge     cont_displ
        ret
   cont_displ:
        push    eax
        and     eax, 0x3fffffff
        cmp     eax, 61*0x10000  ; length <= 60 ?
        pop     eax
        jb      cont_displ2
        ret
   cont_displ2:
............................................................................   
Но логика подсказывает, что двоичное представление числа, размером 64 бита, может быть больше, чем 60.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1 post ] 

All times are UTC+03:00


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited