computer controlled universal remote control
IR remote controls use a carrier, that is a relatively high frequency signal, that gets modulated. The carrier frequency is usually about 38kHz. The modulation is always 0 or 100%, tha is you either send the carrier or nothing.
There are several types of encoding, the most popular of them being RC-5, developped by Philips. A bit is transmitted as a sequence of either 0-1 or 1-0, that is half the time the carrier is transmitted, half the time it is off. The on an off times are, if I remember correctly, 0.889ms.
For more info, look here
https://www.sbprojects.com/knowledge/ir/rc5.htm or do a search on RC-5.
So to answer your question, it's not as simple as sending characters out the serial port. You will need to somehow set the baud rate to something close to 38kHz, then send a few "characters", such as 0xAA or 0x55, for each active portion of the signal.
Perhaps you will have better luck with the parallel port, since you can toggle the lines any way you want, without having to go through the UART, which may not even accept your special baud rate.