Hello and welcome to the forums nevi,
This code looks like it is for a 4x20 character LCD module based on a Hitachi HD44780 controller.
Therefore cmd_reg would be the 8-bit port which connects to the data port of the LCD module.
They are using reads of the busy flag in between initialisation writes instead of delays and it is unclear how the modules R/W input is being controlled.
Also you have not shown us the putc2lcd function.
It is a good idea to use a code box (the SRC button) to display example code as it will look neater.