I was disassembling an MS-DOS .com application and came across some port access which I don't understand. More precisely, via the IN instruction, values are read from the following ports.
40h
44h
46h
The documentation found here mentions ports 40h-47h belong to the 'Programmable Interval Timer', but the details elaborate only on ports 40h-43h.
From the disassembled context I would guess that the input is then used as pseudorandom numbers.
I also found this reference (in German) which does not mention the 4 other ports. Does anybody know the exact function of these ports, ideally with a reference?
Edit: To provide more context, the part of the disassembled application looks as follows.
in al, 46h
mov cl, 03h
div cl
mov bl, ah
in al, 44h
div cl
mov bh, ah
mov dx, 40h
in al, dx
div cl
The application is this tiny effect; the read values are used to set the VGA palette RGB values to be colorful at best, interesting at worst.