I'm learning asm through a tutorial, so at this point I'm clueless. The tutorial uses a Butterfly m169, but I'm writing for a tiny 2313 and I have run into a roadblock with "SPH". I understand that the 2313 does not have enough sram to use that, and simply commenting out the "OUT SPH" line allows the source to compile/assemble.
What I don't understand though, is all I have to do to solve the problem is simply comment out that line and all is well, or should I use other instructions to compensate for commented out the line.
<code>
.nolist
.include "tn2313adef.inc" ; Define device ATtiny2313A
.list
.DEF A = R16
.DEF I = R21
.DEF J = R22
.ORG $0000
START:
LDI A,LOW(RAMEND)
OUT SPL,A
LDI A,HIGH(RAMEND)
;OUT SPH,A ;comment out line and it assembles
LDI A,0b11111111
OUT DDRB,A
;MAIN ROUTINE
BEEP: CLR I
BLUPE:
SER A
OUT PORTB,A
RCALL PAUSE
CLR A
OUT PORTB,A
RCALL PAUSE
DEC I
BRNE BLUPE
LOOP: RJMP LOOP
PAUSE:
CLR J
PLUPE:
NOP
DEC J
BRNE PLUPE
RET
</code>