Blame view

ram.txt 807 Bytes
2997ffb9   Geoffrey PREUD'HOMME   Peut affecter des...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
  .equ PINA = 0x00 ; définition des adresses des ports

  .equ DDRA = 0x01

  .equ PORTA = 0x02

  .equ PINC = 0x06

  .equ DDRC = 0x07

  .equ PORTC = 0x08

  

  .equ TEST = 0x0200

  

  .equ RAMEND = 0x21FF

  .equ SPH = 0x3E ; initialisation de la pile

  .equ SPL = 0x3D

  

  .org  0x000

      ; Vecteur RESET

      jmp debut

  

  

  .org 0x0080

  

  

  debut:

      DDRA@IO <- 0xFF

      DDRC@IO <- 0xFF

      PORTC@IO <- 0x00

      PORTA@IO <- 0x00

      r11 <- 0x00

      r10 <- 0x00

  

  boucle:

  

      test[2] <- 0x22

      PORTA@IO <- test[2]

  

      jmp sl

      ; test <- 0x22

  

      LDI r16,0xAA

  

      LDI r26,0x02

      LDI r27,0x00

  

      ST X,r16

  

      LD r10,X

  

      ;PORTA@IO <- test[1]

  

  sl:

      sleep

      saut sl

  

  tempo:

      ldi r24,8

  tempoA:

      subi r22,1

      sbci r23,0

      sbci r24,0

      brcc tempoA

      ret