Hi,
My initial thought, since you're saying that it does work if you paste the content of the dat subroutine inplace of each GOSUB to TO the dat subroutine, was/is that it's a timing issue. I don't know anything about the timing requirements of a CF card but using that GOSUB does introduce a couple of extra instruction cycles for the jump to and from the routine.

Then, when looking closer at the actual code for the dat subroutine:
Code:
dat:
   i = 0           'pulse RD low 65535 times
REPEAT
   rd[i] = 1      '<----What is the purpose of this line?
   i = i + 1
   pulsout rd, 4   '44.1KHz Playback
UNTIL i = 65535
RETURN
I'm wondering what you're trying to achieve with the rd[i]=1, specifically the [i] part, when you have rd is aliased to PortA.4?

Out of curiosity, I don't see you're actually reading the data that the card outputs. Are you "playing" it directly to a DAC or something like that?

/Henrik.