Register Assignment (MOV)
16-10
With this knowledge of the MOV instruction, some simple memory assignment
tasks can be performed:
1) Clear the contents of Internal RAM address FF
H
:
MOV A,#00h
;Move the value 00h to the accumulator
;(accumulator=00h)
MOV R0,#0FFh ;Move the value FFh to R0 (R0=0FFh)
MOV @R0,A
;Move accumulator to @R0, thus clearing
;contents of FFh
2) Clear the contents of Internal RAM address FF
H
(more efficient):
MOV
R0,#0FFh
;Move the value FFh to R0 (R0=0FFh)
MOV
@R0,#00h
;Move 00h to @R0 (FFh), clearing contents of FFh
3) Clear the contents of all bit memory, internal RAM addresses 20
H
through
2F
H
(this example will later be improved upon to require less code):
MOV 20h,#00h ;Clear Internal RAM address 20h
MOV 21h,#00h ;Clear Internal RAM address 20h
MOV 22h,#00h ;Clear Internal RAM address 20h
MOV 23h,#00h ;Clear Internal RAM address 20h
MOV 24h,#00h ;Clear Internal RAM address 20h
MOV 25h,#00h ;Clear Internal RAM address 20h
MOV 26h,#00h ;Clear Internal RAM address 20h
MOV 27h,#00h ;Clear Internal RAM address 20h
MOV 28h,#00h ;Clear Internal RAM address 20h
MOV 29h,#00h ;Clear Internal RAM address 20h
MOV 2Ah,#00h ;Clear Internal RAM address 20h
MOV 2Bh,#00h ;Clear Internal RAM address 20h
MOV 2Ch,#00h ;Clear Internal RAM address 20h
MOV 2Dh,#00h ;Clear Internal RAM address 20h
MOV 2Eh,#00h ;Clear Internal RAM address 20h
MOV 2Fh,#00h ;Clear Internal RAM address 20h
Содержание MSC1210
Страница 1: ... December 2002 User s Guide SBAU077 ...
Страница 149: ...Digital Filter 12 13 Analog to Digital Converter Figure 12 5 Filter Frequency Responses ...
Страница 162: ...12 26 ...
Страница 234: ...Timers 17 6 Figure 17 4 Timer Counter 1 Mode 1 Figure 17 5 Interrupt System ...
Страница 273: ...Serial Port I O 17 45 Keil Simulator Figure 17 19 Clock Control Peripheral Figure 17 20 USART0 Preipheral ...
Страница 282: ...C 4 ...