Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - hibyte() return high byte of uint number http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 hibyte()            Return high byte of uint number
------------------------------------------------------------------------------
 Declaration
   math.hdr

 Syntax
   func byte hibyte extern
   param value uint uNum

 Arguments
   uNum is the number to process.

 Return
   High byte of passed number.

 Description
   The hibyte() function returns the high byte of an uint number.

 Example
   #define EXAMPLE_MATH
   #include example.hdr

   proc Test_hibyte
   ? hibyte(     0 )                // print    0
   ? hibyte(   255 )                // print    0
   ? hibyte(   256 )                // print    1
   ? hibyte( 32767 )                // print  127
   ? hibyte( 32768 )                // print -128
   ? hibyte( 65535 )                // print   -1
   ? dechex( hibyte( 0xffffaabb ) ) // print    0x000000AA
   endproc

   proc main
   Test_hibyte()
   endproc

See Also: lobyte()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson