home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Graphics Programming Black Book (Special Edition)
/
BlackBook.bin
/
disk1
/
zoa
/
zen_list.exe
/
LST10-18.ASM
< prev
next >
Wrap
Assembly Source File
|
1990-02-15
|
559b
|
26 lines
;
; *** Listing 10-18 ***
;
; Reads a single byte stored in a far segment by
; using a segment override prefix. Loads ES just
; once and then leaves ES set to point to the far
; segment at all times.
;
jmp Skip
;
FarSeg segment para
MemVar db 0 ;this variable resides in a
; far segment
FarSeg ends
;
Skip:
call ZTimerOn
mov si,seg MemVar
mov es,si ;point ES to the far segment for
; the remainder of the test
rept 100
mov si,offset MemVar ;point ES:SI to MemVar
lods byte ptr es:[si] ;read MemVar
endm
call ZTimerOff