Board.KolibriOS.org
http://board.kolibrios.org/

SysFn47:DrawNumber
http://board.kolibrios.org/viewtopic.php?f=2&t=3680
Page 1 of 1

Author:  0CodErr [ Wed Mar 07, 2018 10:24 pm ]
Post subject:  SysFn47:DrawNumber

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.

Page 1 of 1 All times are UTC+03:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/