home *** CD-ROM | disk | FTP | other *** search
- ;
- ; *** Listing 9-2 ***
- ;
- ; An example of initializing multiple memory variables
- ; to the same value by making the value an immediate
- ; operand to each instruction. Immediate operands
- ; increase instruction size by 1 to 2 bytes, and preclude
- ; use of the accumulator-specific direct-addressing
- ; form of MOV.
- ;
- jmp Skip
- ;
- MemVar1 dw ?
- MemVar2 dw ?
- MemVar3 dw ?
- ;
- Skip:
- call ZTimerOn
- rept 1000
- mov [MemVar1],0ffffh ;store 0ffffh to each memory
- mov [MemVar2],0ffffh ; variable as an immediate
- mov [MemVar3],0ffffh ; operand
- endm
- call ZTimerOff