[Coco] SS.Tone

Robert Gault robert.gault at att.net
Thu Dec 24 10:18:34 EST 2015


K. Pruitt wrote:
> I'm setting up the registers okay and using the proper system call ($98) but I
> am not getting a tone. And when I check I see that I am generating an error 208
> when calling this particular system call. I get the same thing in both assembly
> and Basic09. I'm perplexed.
>
> Anybody have a code snippet showing how to properly use this call?
>

Hard to tell what you did wrong since you did not post your code. Most likely 
you have a value set wrong.
First, don't confuse Setsta with the call you want to use. Second, make sure 
that regX and regY have acceptable values.
regX	duration of call; LSB=ticks
regY	frequency; 0=low 4095=high

The manual does not make sense for regX LSB so just experiment. Here is an 
example that works.

TYPE registers=cc,a,b,dp:BYTE; x,y,u:INTEGER
DIM regs:registers
DIM callcode,path:BYTE
regs.a=1
regs.b=$98
regs.x=$1464
regs.y=$0CD0
callcode=$8E
RUN syscall(callcode,regs)

Robert



More information about the Coco mailing list