I'm currently learning how to program an Arduino MEGA2560 in assembler using Atmel Studio. When I try to use PORTL (same with PORTK, PORTH, PORTJ) for output, it gives me this error when using PORTL:
Operand 1 out of range: 0x10b
Why is that? All of the other ports work fine except for those.
Part of my code that uses PORTL:
; setup display ------------------ init: rcall wait cbi portG ,2 cbi portG ,1 ldi mp, 0b0011_1000 ; output port L 8 bit, 2 line, font 5*7 out portL, mp sbi portG ,0 ;Set Enable nop cbi portG ,0 ;Clear Enable