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 - scrseg() return segment address of video adapter buffer http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 scrseg()            Return segment address of video adapter buffer
------------------------------------------------------------------------------
 Declaration
   screen.hdr

 Syntax
   func uint scrseg extern

 Arguments
   None.

 Return
   Segment address of video memory.

 Description
   This function returns the segment address of the currently active screen
   adapter buffer. With standard adapters, there are only two possible
   return values:

   0xB000 - monochrome
   0xB800 - color

 Example
   #define EXAMPLE_SCREEN
   #include example.hdr

   proc Test_scrseg
   if scrseg() == 0xb800
      ? "Color video"
   else
      ? "Monochrome video"
   endif
   @ row(), col() + 1 ?? "at", right( dechex( scrseg() ), 4 )
   endproc

   proc main
   Test_scrseg()
   endproc

See Also: vidaddr()

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