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

 Syntax
   typedef struct _REGS
      uint ax
      uint bx
      uint cx
      uint dx
      uint si
      uint di
      uint ds
      uint es
      uint bp
      uint flags
      uint ss
      uint sp
      uint cs
      uint ip
   enddef

 Members
   ax is the AX register's value.
   bx is the BX register's value.
   cx is the CX register's value.
   dx is the DX register's value.
   si is the SI register's value.
   di is the DI register's value.
   ds is the DS register's value.
   es is the ES register's value.
   bp is the BP register's value.
   flags is the flags register's value.
   ss is the SS register's value.
   sp is the SP register's value.
   cs is the CS register's value.
   ip is the IP register's value.

 Description
   The _REGS structure stores values for word registers. The
   __regs system variable is declared as of type _REGS, 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_REGS
   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_REGS()
   endproc

See Also: __regs

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