Hi I studied assembly language in college but its been a few years since ive seen it. Could anyone tell me if im on the right track, my syntax is wrong but i just want to know if i remember the principles correctly. The following code is intended to measure the duty cycle of three inputs from an accelerometer. I know its not going to be right but i just want to know if im starting from the very beginning. Thanks
START:
INPUT_1: CJNE P1.1, "1", INPUT_1;----------------//WAIT FOR LINE TO GO HIGH
SETB T1;-------------------------------//START TIMER
LOW: CJNE P1.1, 0, LOW--------------------- //WAIT FOR LINE TO GO LOW
MOV T1 @ R0----------------------- //MOVE VALUE ON TIMER TO ADDRESS
INC RO -----------------------------//INCREMENT R0 TO CHANGE ADDRESS
2: IF P1.2 = 1;---------------------------//SAME PROCESS FOR 2ND INPUT
EN T1
IF P1.2 = 1;
MOV T1 @ R0
INC RO
3: IF P1.3 = 1;-----------------------------//SAME PROCESS FOR 3RD INPUT
EN T1;
IF P1.3 = 1
MOV T1 @ R0
MOV RO, ?-------------------// RESET R0 TO POINT TO ORIGINAL ADDRESS