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 - _bregs byte register structure http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _BREGS              Byte register structure
------------------------------------------------------------------------------
 Declaration
   system.hdr

 Syntax
   typedef struct _BREGS
      byte al
      byte ah
      byte bl
      byte bh
      byte cl
      byte ch
      byte dl
      byte dh
   enddef

 Members
   al is the AL register's value.
   ah is the AH register's value.
   bl is the BL register's value.
   bh is the BH register's value.
   cl is the CL register's value.
   ch is the CH register's value.
   dl is the DL register's value.
   dh is the DH register's value.

 Description
   The _BREGS structure stores values for byte registers. The
   __bregs system variable is declared as of type _BREGS, and is used
   in conjunction with various low level functions (like intx86() and
   getregs() to access the processor registers.

 Example
   #define EXAMPLE_TYPE
   #include example.hdr

   proc Test_BREGS
   clear
   cursor( .f. )
   @ 0, 0 ?? "Press Esc to exit"
   do while .not. inkey() == K_ESC          // loop until escape key pressed
      __regs.ax  := 0x2c00                  // get time function
      intx86( 0x21 )                        // call DOS interrupt
      @ 0, 65 ?? padl( istr( __bregs.ch  ), 2, '0' ) + ":" + ; // hours
                 padl( istr( __bregs.cl  ), 2, '0' ) + ":" + ; // mins
                 padl( istr( __bregs.dh  ), 2, '0' ) + ":" + ; // secs
                 padl( istr( __bregs.dl  ), 2, '0' )           // sec/100
   enddo
   endproc

   proc main
   Test_BREGS()
   endproc

See Also: __bregs

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