WORD Examples
Example 1:
|
|
|
|
|
|
| |||
|
|
|
|
|
|
|
|
|
|
In this example, it is better to use BYTE since the bytes must be reversed in order to write them in correct byte order format.
Example 2:
|
|
|
|
|
|
| |||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Move the address of TEMP's data area (TEMP+1) into DI.
- INT 12 returns number of 1k blocks of configured memory in AX (in INTEGER format).
- MOVe the integer value returned in AX to TEMP (pointed to by DI) with STOSW.
- MULTiply TEMP by "1024" placing the result in MEMORY.
Example 3:
|
|
|
|
|
|
| |||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Save contents of DS register.
- Load the AX register with next 2 bytes (0x40).
- Move the contents of AX into DS.
- Bitwise AND a byte value (the NOT value of 20H - 0xDF) into an address (0x17).
- Restore contents of DS register
![]() |