Professional Documents
Culture Documents
Messalaoui Abdelaziz ESE14
Messalaoui Abdelaziz ESE14
Département d’Électronique
MASTER 1
Td :ESE14
Présenté par :
1/Messalaoui Abdelaziz
Année Universitaire :
2019-2020
Ex03:
1. Adressage immédiat (Littéral) :
C’est le type d’@ qui contient la donnée a traiter dans l’instruction.
Exemple :
Movlw 0x20 ;
Movlw 0x40 ;
2. Adressage Direct :
C’est le type d’@ qui défini l’@ des données dans l’instruction,et la
donée est contenue dans un register ou une @ mémoire.
Exemple :
Movf 0x20 ,w;
Mov 0x3b ,0 ;
3. Adressage indirect:
C’est le type d’@ intermédiaire entre les rigesters (fsr et indf) ,on utilisé
ce type pour lire ou écrire dans la case mémoire .
Exemple :
Movlw 0x40 ;
Movwf m ;
Movlw m ;
Movwf sfr;
Movl indf,w;
Exo04:
1. What does the word "literal" mean?
MOVLW 4Ch;
3. Write the instruction to move 4Ch from W to file 1B:
MOVWF 1Bh;
4. Write the instruction to move 4Ch from file 1B to W:
MOVF 1Bh, 0;
5. Write the instruction to clear the value 4Ch in file 1B:
CLRF 1Bh;
6. Write the instruction to move 4Ch from file 1A to file 1B:
no instruction exists;
7. Write the instruction to decrement file 1B:
DECFSZ 1B, 1;
DECF 1B, 1;
8. After the instruction: BCF 06,3 the file will contain:
1111 1000;
9. The TRIS file is loaded with 0011 1011. Name the output line(s) created by this value
10. A LED is connected to the 3rd lowest output. Write the instruction to activate the LED:
BSF 06, 3;
11. File 1B holds the value 0000 1100. After the following instruction: BSF 1B,6 the file will
contain:
0010 1100;
13. For any file, what is the maximum hex value it can contain?
FF;
14. Write the instructions to make bit 3 of the input/output file HIGH:
BSF 06, 3;
15. What value will be contained in file 1B after the instruction: BSF 1B,4:
0000 1000;
16. Write the two instructions to carry out the following: Put 8E into file 1C
17. A file containing 0000 1001 is AND with 1100 1010. The result is:
0000 1000;
18. Write the "bit set file" instruction for bit 5 of file 06:
BSF 06, 5;
19. A file containing 0110 1001 is XORed with 1100 1001. The result is:
1010 0000;