Maybe I am missing something but... code does not match schematic.
Code:
symbol l9= porta.1

symbol l10= porta.2

symbol l11= porta.3

symbol l12= porta.4
Drawing has:
A1 going to l10
A2 going to l11
and so on...Maybe I am the one confused

As far as you posting goes contact Darrel for help.