gcode to move the printhead up for maintenance
Yes, on machines which will execute "standard" gcode, this will do what you request. Some good resources are http://reprap.org/wiki/G-code and https://en.wikipedia.org/wiki/G-code