Function 55, subfunction 55 - begin to play data on built-in speaker.
Parameters:
- eax = 55 - function number
- ebx = 55 - subfunction number
- esi = pointer to data
Returned value:
- eax = 0 - success
- eax = 55 - error (speaker is off or busy)
Data is an array of items with variable length.
Format of each item is defined by first byte:
- 0 = end of data
- 1..0x80 = sets sound duration on 1/100 of second; sound note
is defined by immediate value of frequency
- following word (2 bytes) contains frequency divider;
frequency is defined as 1193180/divider
- 0x81 = invalid
- 0x82..0xFF = note is defined by octave and number:
- duration in 1/100 of second = (first byte)-0x81
- there is one more byte;
- (second byte)=0xFF - delay
- otherwise it looks like a*0x10+b, where b=number of the note in
an octave from 1 to 12, a=number of octave (beginning from 0)
Remarks:
- Speaker play can be disabled/enabled by
subfunction 8 of function 18.
- Function returns control, having informed the system
an information on request. Play itself goes independently from
the program.
- The data must be kept in the memory at least up to the end
of play.