QuickBASIC on DOS
This solution assumes a DOS system with a VGA-compatible graphics adapter. The requested screen mode number 12 provides a resolution of 640 vertical and 480 horizontal pixels with a CGA 16 color palette, where color number 14 is yellow.
It was tested with DOSBox in fullscreen mode (fullscreen=true in section [sdl] of the configuration) on GNU/Linux and Windows 10.
REM RECTANGL.BAS - Draw a yellow rectangle. SCREEN 12 COLOR 14 LINE (10, 20)-(100, 75), , BF