/* * Example4_1.asm * * Created: 04/14/2017 08:11:08 * Author: Naimi */ LDI R16, HIGH(RAMEND) OUT SPH, R16 LDI R16, LOW(RAMEND) OUT SPL, R16 LDI R16, 0xFF OUT DDRB, R16 OUT DDRC, R16 OUT DDRD, R16 LDI R16, 0x55 L3: OUT PORTB, R16 OUT PORTC, R16 OUT PORTD, R16 CALL QDELAY COM R16 RJMP L3 QDELAY: LDI R20, 16 D0: LDI R21, 200 D1: LDI R22, 250 D2: NOP NOP DEC R22 BRNE D2 DEC R21 BRNE D1 DEC R20 BRNE D0 RET