Subfunction 20 : Play a module

AH = 82
AL = 20
DX:CX = Buffer with the following data
If the function is successful, AX will hold 5722h on return.

┌────────┬────────┬────────────────────────────────────────────────────────┐
│ Offset │ Length │ Description │
├────────┼────────┼────────────────────────────────────────────────────────┤
│ 00 │ Byte │ This byte must be set to 'M'. │
│ 01 │ Byte │ This byte must be set to 'P'. │
│ 02 │ Byte │ This byte represents the output device. The possible │
│ │ │ output devices can be determined from the device table │
│ │ │ returned in the test for residency (function 21). │
│ │ │ For older versions of MODRES which don't support this │
│ │ │ table, the following values can be assumed: │
│ │ │ 0 - PC Speaker │
│ │ │ 1 - D/A on LPT1 │
│ │ │ 2 - D/A on LPT2 │
│ │ │ 3 - D/A on 1&2 (Stereo) │
│ │ │ 4 - D/A on 1&2 (Mono) │
│ │ │ 5 - LPT1 on Video Card │
│ │ │ 6 - D/A @300/2 (Stereo) │
│ │ │ 7 - Sound Blaster (210) │
│ │ │ 8 - Sound Blaster (220) │
│ │ │ 9 - Sound Blaster (230) │
│ │ │ A - Sound Blaster (240) │
│ │ │ B - Sound Blaster (250) │
│ │ │ C - Sound Blaster (260) │
│ │ │ D - Mono D/A User Def │
│ │ │ E - Stereo D/A User Def │
│ 03 │ Word │ Segment of data area holding the first 5 sections of │
│ │ │ the MOD file structure. Note that the data area must │
│ │ │ be paragraph aligned since only the segment is given. │
│ 05 │ 62 │ The 31 segment addresses of the sample data for each │
│ │ │ of the 31 samples (the sample data is the data │
│ │ │ described in section 6 of the MOD file structure). │
│ │ │ Note that the data areas must be paragraph aligned │
│ │ │ since only the segment is given in each case. │
│ 67 │ Byte │ The pattern number at which to start playing. │
│ 68 │ Byte │ If this byte is set to 1 only the starting pattern │
│ │ │ will be played. If this is set to 0, the entire module │
│ │ │ will be played, starting at the specified pattern. │
├────────┼────────┼────────────────────────────────────────────────────────┤
│ 69 │ Byte │ This byte is used to specify the quality of sound │
│ │ │ output required. It can have a value in the range 0 to │
│ │ │ 6 - the lower the value, the better the quality. Note, │
│ │ │ however, that you will need a fast machinve to use the │
│ │ │ low values without crashing. A value of 1 is assumed │
│ │ │ if an out of range value is specified. │
│ 70 │ Byte │ If this is set to 80, then the mod contains samples │
│ │ │ with lengths greater then 64K. If anything else, then │
│ │ │ all samples must be less than 64K. │
└────────┴────────┴────────────────────────────────────────────────────────┛

Note that bytes 69 and 70 were not available in the old versions of MODRES.