home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_100
/
163_01
/
peekc.c
< prev
next >
Wrap
Text File
|
1988-01-31
|
512b
|
16 lines
/*
** get a byte from a specified segment and offset
*/
peekc(seg, offset) int seg; char *offset; {
#asm
MOV BX,[BP]+6 ;get segment
MOV ES,BX
MOV BX,[BP]+4 ;get offset
MOV AL,ES:[BX] ;get the byte into the return code reg
CBW ;sign extend
MOV BX,DS
MOV ES,BX ;restore ES
#endasm
}