likely because in proc03 you are passing value of "a" for the "b" variable and vice versa. See the difference in the signature of test01 in proc01 and proc03 ("a" and "b" are in different order). So in proc3 you are actually feeding the result of "b + d" into the local "a" variable, but into the program's "b" variable, program's "a" variable is not modified. So change the signature of test01 to
procedure test01(var a:integer, b: integer)
to make it work as expected.
In general, I would not recommend to use exact same names here for program's and procedures's variables to prevent similar errors.
Alex