Very important please
Write a program to sort a list of numbers for microprossecer 8051, The numbers will be stored in memory starting at data memory address 0x40. The list will be no more than 5 bytes long. The “end of list” byte will be 0xFF, and that value will not occur in the list of data.
What i did is that:
CSEG AT 20
CJNE A, #255, NOTEQUAL
NOTEQUAL: INC R3
CJNE A, #255, NOTEQUAL2
NOTEQUAL2: INC R3
CJNE A, #255, NOTEQUAL3
NOTEQUAL3: INC R3
CJNE A, #255, NOTEQUAL4
NOTEQUAL4: INC R3
CJNE A, #255, NOTEQUAL5
NOTEQUAL5: INC R3
Final: mov R0,#0x40
mov 0x60, a
mov a, @R0
LOOP: ljmp loop
can you fixed it and where I make my mestake
Re: Very important please
It can make it a lot easier if we know what kind of problem we're looking for.
Did the code assemble without warnings and errors? If not, what were they?
What does the program do wrong?
What input values did you give (i.e. what values did you place at 0x40)?
What was the result of running the code - was it partially sorted, not sorted at all, sorted in the wrong order, or did the program get stuck in an infinite loop or crash, or do something else weird?
Can you identify which line of code the program started going wrong?
Did you try dry running the code, executing the instructions one by one yourself as if you were the processor, keeping track of register and memory values with pen(cil) and paper?
|All times are GMT +5.5. The time now is 12:59.|