A very simple cnc milling program example which shows how a simple slot can be machined.
Another such program example which mills a pocket the same way but in a taper is here CNC Milling Machine Programming Example for Beginners.
Slot Milling Program Example
N10 G00 G90 X70 Y25 Z1 S800 M3 N20 Z-5 N30 G01 X20 F150 N40 G00 Z100 N50 X-25 Y50 N60 M30
N10 Spindle on clockwise rotation at 800 rev/min, tool rapid traverse to P01.
N20 Infeed in Z.
N30 Tool traverse P01 to P02, feedrate 150 mm/min.
N40/N50 Rapid traverse retraction.
N60 End of program.