Yes the programing is different, but you can see the idea, and write your software for the x51 procesor. See the file below, this is my project directory, the contain is the asm file for the PIC, schematic file in protel99 format, drawing of the mechanical parts and some documentation, but documentation and coment in asm file on the Bulgarian language. I hope that ths help you to create your projet.
p.s. The controler have two different regime for work. First this is control of the barrier, and second is control of the automatic doors and portal doors.