ich vermute Dein Problem mal hier:

ldi XH,HIGH(RAMEND)
ldi XH,LOW(RAMEND)

greetz Rajko