;Макросы ;----------------------------------------------------------------------- .macro pushf push r10 in r10,SREG push r10 .endm .macro popf pop r10 out SREG,r10 pop r10 .endm .macro pushr push r10 in r10,SREG push r10 push r16 push r17 push r18 push r19 push r20 push r21 push r22 push r23 push r25 push r26 push r27 push r28 push r29 .endm .macro popr pop r29 pop r28 pop r27 pop r26 pop r25 pop r23 pop r22 pop r21 pop r20 pop r19 pop r18 pop r17 pop r16 pop r10 out SREG,r10 pop r10 .endm .macro check push @0 lds @0,@1 sts UDR0,@0 check_loop: ldi @0,UCSR0A sbrs @0,TXC0 rjmp check_loop pop @0 rcall Delay .endm .macro check_kosv push @0 ld @0,@1 sts UDR0,@0 check_loop1: ldi @0,UCSR0A sbrs @0,TXC0 rjmp check_loop1 pop @0 rcall Delay .endm .macro check1 sts UDR0,@0 check_loop1: ldi @0,UCSR0A sbrs @0,TXC0 rjmp check_loop1 rcall Delay .endm .macro tabulate push r16 ldi r16,0x09 check1 r16 pop r16 .endm .macro newline push r16 ldi r16,0x0D check1 r16 ldi r16,0x0A check1 r16 pop r16 .endm