home *** CD-ROM | disk | FTP | other *** search
/ Graphics Programming Black Book (Special Edition) / BlackBook.bin / disk1 / zenasmlg / rtf / chapter11 / fig11.8.tif (.png) < prev    next >
Tagged Image File Format  |  1997-06-18  |  149KB  |  696x717  |  16-bit (18,616 colors)
Labels: book | box | bulletin board | cabinet | reckoner | shelf | slide projector
OCR: Memory 20000 20001 DF 2000 00 20003 10 9999 20004 02 20005 03 DS 2000 20006 2000 05 0007 20008 20009 The byte that will be read by lodsh FIGURE 11.8 When DF is 1 adjustments must bc made when switching between byte and word sized string instructions. Since the address of the next byte is not the same as the address of the next word, incorrect data will be read i adjustments are not made. as illustrated by Figure 11.7 This figure shows that the last bytes of memory block are read correctlv with the following code std lodsb dec lodsw (A) The last byte of the block will be read hy the ini- tial lodsb. (B) The word that lodsb leaves DS:SI pointing to is nor the word preceding the byte just read, but rather the last word of the block, which includes the hyre just read. (C The instruction dec si ...