Look at the datasheets for both 16f628 and 16f877, at the table titled "Registers associated with PWM and TIMER2". The registers seem to be at the same locations, but the 16f877 has more registers. Presumably this means that as long as code uses the subset of registers that 16f628 has, the code will work with either. And also, that the relevant f877_* declarations in jlib.jal will work for 628 as well.
Also see the general mid-range family reference (v1997 p216) for example PWM initialization code