![]() |
[x86]Need explanation
Have been reading an asm tutorial source file, where there is two lines I don't really understand. Would be great if you could help me by explaining them.
:
Palette db 768 dup(0):
mov es:[di],alThanks alot for your time! /Klarre |
dup means that the value of 0 will be duplicated in each element of the Palette array (collection of adjacent values) that is being defined here. This is an assembly-time action, not a run-time action.
The second results in the value of al being stored in the address represented by the contents of es, offset by the value of di. For example, if you leave es alone, but increment the value of di after each move, your values will be stored in successive locations. ES is like a pointer to an array (or the address of the beginning of the array). DI is then the index. ES [DI]. |
Thanks alot! Now the code make sense.
/Klarre |
| All times are GMT -5. The time now is 11:30 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC