Documentos de Académico
Documentos de Profesional
Documentos de Cultura
score3: .byte 1
.org 0x00
RCALL BARRIDO_RET
LDI aux,255
otro_ret: POP ZL
RET RET
jugador1: jugador2:
IN tempo,SREG IN tempo,SREG
PUSH ZL PUSH ZL
POP ZL POP ZL
POP ZH POP ZH
RETI RETI
salir2: salir3:
CLI CLI
RET RET
jugador3: BIN_LED:
ldi tempo,0b11111111
out ddra,tempo
out ddrc,tempo
ldi tempo,0b00000000
out porta,tempo
barrido de teclado normal brcs salto5
RCALL HEX_7SEG
salto5:
.def tempo=r16 RCALL barrido
.def ante=r17 rjmp principal
.def tecla=r18
.def aux=r19
.def aux2=r20
.def control=r21 BARRER:
.def conta=r22 LDI tecla,16
.def tecla_control=r23 LDI tempo,0b11111110
.dseg OUT PORTA, tempo
SBIS PINA,4
tcontrol: .byte 1 LDI tecla,15
bcd0: .byte 1 SBIS PINA,5
bcd1: .byte 1 LDI tecla,0x00
bcd2: .byte 1 SBIS PINA,6
bcd3: .byte 1 LDI tecla,14
SBIS PINA, 7
dig0: .byte 1 LDI tecla,13
dig1: .byte 1 LDI tempo,0b11111101
dig2: .byte 1 OUT PORTA, tempo
dig3: .byte 1 SBIS PINA,4
dig4: .byte 1 LDI tecla,0x01
SBIS PINA,5
.cseg LDI tecla,0x02
.org 0x00 SBIS PINA,6
LDI tecla,0x03
LDI tempo,0b00001111 SBIS PINA, 7
OUT DDRA,tempo LDI tecla,12
LDI tempo,0x00 LDI tempo,0b11111011
OUT DDRC,tempo OUT PORTA, tempo
LDI tempo,0b01111111 SBIS PINA,4
OUT DDRB, tempo LDI tecla,0x04
OUT DDRD,tempo SBIS PINA,5
LDI tempo,0b11110000 LDI tecla,0x05
OUT PORTA, tempo SBIS PINA,6
LDI tempo,0b10000000 LDI tecla,6
OUT PORTB, tempo SBIS PINA, 7
OUT PORTD, tempo LDI tecla,11
LDI tempo,0xFF LDI tempo,0b11110111
OUT portC,tempo OUT PORTA, tempo
IN tempo, MCUCR SBIS PINA,4
ANDI tempo, 0b11101111 LDI tecla,7
OUT MCUCR, tempo SBIS PINA,5
;stack LDI tecla,8
LDI tempo, HIGH(RAMEND) SBIS PINA,6
OUT SPH,tempo LDI tecla,9
LDI tempo, LOW(RAMEND) SBIS PINA, 7
OUT SPL,tempo LDI tecla,10
clr conta
LDI ante, 16 CP tecla, ante
rcall inicial BREQ salir
MOV ante, tecla