Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>peekb() examine byte at memory location (macro)</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 peekb()                 Examine Byte AT Memory Location (Macro)

 #include   <dos.h>

 char       peekb(segment,offset);
 unsigned   segment;                     Segment
 unsigned   offset;                      Offset

    peekb() examines a byte at the memory address specified by
    'segment:offset'. peekb() is treated as a macro if the header file
    <dos.h> is included. If the file is not included, or if #undef is
    used on it, peekb() is a function.

       Returns:     A byte--the value stored at the location specified by
                    'segment:offset'.

   Portability:     Unique to 8086 family of processors.

   -------------------------------- Example ---------------------------------


           #include <dos.h>     /* for peekb, getdta, FP_SEG, FP_OFF */

           main()
               {
               char far *dta, x;

               dta = getdta();
               x = peekb(FP_SEG(dta),FP_OFF(dta));
               }


See Also: peek() poke() pokeb()

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