What I understand to be a boring bar is a thickish bar, centered at both ends, that you set up between the centres of the lathe. There is a tool tip protruding from the bar (usually in the centre (lengthwise)). It is used for boring long cylinders, the work being mounted on the cross slide. The spindle turns the boring bar which passes through he cylinder and cuts the inside surface. The tool tip needs alteration after every pass.
I cannot see how you can do other than just bore cylinders with that, because the cross - slide is clamped in the X direction, and only moves in the Z direction.You cannot use the x-axis because the tool will foul the opposite wall of the cut cylinder. G Code is simple - cut to one end, wait for tool tip to be altered, cut to other end, wait etc etc,
If you are meaning a simple boring tool - i.e.held at one end in the tool post, which can bore out say an axle hole in a wheel, then yes - this is just another tool. You can use the offsets in the tool table (but remember they are the opposite (i.e. x is +)). You set it up as you would a normal cutting tool - end of work is Z0 and X0 is the lathe centre.