Hi,
You still did NOT tell us what problem you are actually facing
Is your program running at all ? or running just once ? or doing alarm but not serial output ? or vice versa ?
You don't even bother to mention what your crystal freq is in either your ckt or your code
Or do you expect others to write that program down for you ?
If you are testing your code on trainer, note that 8051 trainers usually have ROM monitor, which in turn downloads & runs your program from RAM & also provide additional functions to you, like keypad, 7-segment display.
It's first & foremost rule of software developement to simplify problem at hand & here you are increasing it now by adding 7-segment & switches to set time while your program isn't functioning in the first place without it.
As I told you in previous post, divide your task & test them independently and once you got them working integrating them together is an easy task. Run each part in simulator independently, step through your code & see if it's working. Try changing few inputs such as clock, delay desired etc & see how this affects your code. Does it holds or breaks down ? This is how reusable blocks of code are written. Now burn your code into actual CPU, use few dummy/debug outputs to checkpoint your code. It is nice to have ICE like tools, but surely we can do without them. Once you're satisfied, go onto next task.
There is no main-line loop in your program. Since you want your code to run indefinitely until power is removed, your code should have a infinite loop. That's why asked you if this your first program or not !!!
Secondly, it seems you're pretty poor coder. Your comments aren't telling us anything other than what each statement line does. Purpose of commenting the code is not just telling 'what' but also 'how' & 'why'. Develop this skill early in your career or you will be always figihting with your code & collegues later. Remember there will be v2.0, and you will definitely wish to use code from v1.0.
Also, using assembly over HLL, require even more care, since it is now even less clear what code does just by looking at code.
There is nothing wrong with doing mistakes but unwillingness learn & to hardwork certainly is
regards,
sam_des