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 processor byte register value array http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 __bregs             Processor byte register value array
------------------------------------------------------------------------------
 Declaration
   system.hdr

 Syntax
   _BREGS __bregs based __regs

 Default
   All members initialized to zero.

 Description
   The __bregs system variable stores byte register values for using in
   conjunction with the getregs(), setregs() and intx86() functions.

 Example
   #define EXAMPLE_SYSTEM
   #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: __regs getregs() intx86() setregs()

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