This routine takes an 8 byte parameter block addressed by the X and Y registers. The 8 bytes of the parameter block may be considered as the four parameters used for the SOUND command in BASIC.
Parameter block
XY+ | Length | Content |
---|---|---|
0 | 2 | Channel |
2 | 2 | Amplitude |
4 | 2 | Pitch |
6 | 2 | Duration |
For example, to perform a
SOUND 1,-15,200,20then the contents of the table would be:
Parameter block
XY+ | Content | Sound Param | Value |
---|---|---|---|
0 | Channel | 1 | 0x01 |
1 | 0x00 | ||
2 | Amplitude | -15 | 0xF1 |
3 | 0xFF | ||
4 | Pitch | 200 | 0xC8 |
5 | 0x00 | ||
6 | Duration | 20 | 0x14 |
7 | 0x00 |