That depends upon your machine and control/options. Some only have XY comp available.
G00
G17G43H1Z1. (FOR THE TOOL HOLDER LENGTH)
G19G43H10X.1(FOR THE HORIZONTAL TOO LENGTH, TIP TO SPINDLE CENTERLINE)
G01X0F10.
G41D20Y0Z0(COMP LEFT OF PROFILE)
G02Y-.5Z0R.25 or G02Y-.5Z0J-.25K0
G01G40Y0Z1.
etc...
makes a semicircle on the left right of a block, Radius .25. Always picture the geometry in the G19 plane as if looking at it from the X positive side of the machine.