[go: up one dir, main page]

Menu

[r813]: / src / lib / coco / sound.c  Maximize  Restore  History

Download this file

15 lines (11 with data), 328 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#include "_coco.h"
// Same arguments as Color Basic's SOUND command.
//
void sound(byte tone, byte duration)
{
asm("PSHS", "U"); // protect U from Color Basic code
* (byte*) 0x8C = tone;
* (word*) 0x8D = ((word) duration) << 2;
asm("JSR", "$A956");
asm("PULS", "U");
}