Mu EQU $00 Md EQU $01 Hu EQU $02 Hd EQU $03 Cont EQU $04 PortC EQU $06 Dir_C EQU $07 TOC1 EQU $16 OC1M EQU $0C ORG $0000 HORA FDB 00,00 CONTADOR FDB $0000 ORG $E000 INICIO LDX #$1000 LDAA #$FF STAA Dir_C,X LDS #$FF CLI BUCLE BRA BUCLE TimerInt LDY Cont INY STY Cont CPY #1200 BNE Refresca LDY #0 STY Cont LDAA Mu INCA STAA Mu CMPA #10 BNE Refresca LDAA #0 STAA Mu LDAA Md INCA STAA Md CMPA #6 BNE Refresca LDAA #0 STAA Md LDAA Hu INCA STAA Hu CMPA #10 BNE Refresca LDAA #0 STAA Hu LDAA Hd INCA STAA Hd CMPA #2 BNE Refresca STAA Hu CMPA #4 BNE Refresca LDAA #0 STAA Mu STAA Md STAA Hu STAA Hd Refresca LDAA Cont ANDA #$03 R0 CMPA #0 BNE R1 LDAA Mu ORA #$80 STAA PortC,X RTI R1 CMPA #1 BNE R2 LDAA Md ORA #$40 STAA PortC,X RTI R2 CMPA #2 BNE R3 LDAA Hu ORA #$20 STAA PortC,X RTI R3 LDAA Hd ORA #$10 STAA PortC,X RTI