Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!adm!Leisner.Henr@Xerox.COM From: Leisner.Henr@Xerox.COM (Marty) Newsgroups: comp.lang.c Subject: how to peek Message-ID: <10278@brl-adm.ARPA> Date: Wed, 11-Nov-87 07:48:34 EST Article-I.D.: brl-adm.10278 Posted: Wed Nov 11 07:48:34 1987 Date-Received: Fri, 13-Nov-87 21:46:17 EST Sender: news@brl-adm.ARPA Lines: 34 Perhaps this will help end the debate of "how to peek ram on a PC". You can also use far pointers, although not all compilers support them. Poke and peekword is just a variation on the following: procdef peek,<, > push ds mov ax,segment mov ds,ax mov bx,offset mov al,ds:[bx] pop ds mov ah,0 pret procdef is a macro Aztec supplies to set up bp indexing off the stack. Pret becomoe pop bp at the end. Very handy way to program in assembler. To read 0xf000:0000, call peek(0, 0xf000). Hope this helps solve the debate. marty ARPA: leisner.henr@xerox.com GV: leisner.henr NS: martin leisner:henr801c:xerox UUCP: martyl@rocksvax.uucp