New answers tagged

2

Design first, code later. Plan everything out using logic, flow diagrams, state diagrams, etc. Your problems are with the logic, not the coding. Jonk has done 8051, I have not. I have done 6502 and 6800 assembly, these are similar. At first you might be tempted to have states based on physical position. But, an elevator really only has 3 states, going up, ...


0

You appear to be missing a jmp command after the setb noack decision. It falls into MOV P1,#00000001B MOV P0, #00000111B but then immediately falls into SBEX: MOV P1,#00000010B MOV P0, #01111111B and so you see the same thing regardless of whether it was ACK or NoACK. You need to put a JMP LABEL1 after MOV P0, #...


1

Your professor might like to have you think about the necessity of a linker. Since we don't know the stuff you already learned, it is hard to tell. If you divide the source code of a whole application into parts, these parts need to call functions (subroutines) in other parts or access variables of other parts. Since you will translate each part separately, ...


Top 50 recent answers are included