.TITLE Lib_Peek ;++ ; ; Author: Jonathan Welch ; ; Functional Description: ; Returns the value of the byte at the specified memory location. ; ; Calling Sequence: ; ; Value = Lib_Peek(Address) ; ; Formal Arguments: ; ; Address ; VMS Usage : address ; type : longword (unsigned) ; access : read only ; mechanism : by reference ; ; Address of memory location to examine. ; ; Implicit Inputs: ; ; none ; ; Implicit Outputs: ; ; none ; ; Routine Value: ; ; Value of the byte at the specified memory location. ; ;-- ; Argument list offsets: addr = 4 .PSECT _LIB_PEEK,EXE,NOWRT,LONG .ENTRY LIB_PEEK,^M<> MOVL @addr(AP), R0 ; R0 <- address of place to peek. MOVL (R0), R0 ; R0 <- longword value of peeked place. BICL2 #^X0FFFFFF00, R0 ; zero out 3 highest bytes in R0. RET .END