If the work is short, just mount in vertically in the vice, preferably near to centre of the jaws.
A Vee block will help endure that it is vertical; of impossible use a square.
Set the depth / length of flat that you require.
Mill one side of the work to produce a flat ( Calculate how much material needs to be removed to produce the desired flat on one side of the workpiece. Set the table stop
Move to the other side of the workpiece and do the same again.
You should now have two flats, with the required A/F dimension.
Now move to the front of the workpiece and mill away the same amount of material. Note the dial reading, not forgetting to take out any backlash.
Move to the rear of the work piece, and repeat.
You should now have a square of the required A/F and length dimensions on the end of the round workpiece.
Howard