Skill Basic Assembly Coding
Skill Basic Assembly Coding
- 2
Theory- (Explain 3 different instructions used program (syntax, function, memory, machine cycle and
flags affected if applicable)
Procedure:
Part A: write and simulate assembly language program
Enter the program in keil and observe the contents of A in step by step execution
org 0000h;
;mov B, R5;
; CLR A;
;inc R1;
; mov R2, A;
; end
;------------------------------
;mov @R1,A;
1
;NC R0;
;INC R1;
;inc R1;
;end
;------------------------------------------------
MOV P1,#0FFH
MOV A,P1
SJMP END1
MOV R1,A;
SJMP END1
END1:
END;
;----------------------------------------------
PART B
;Logic 1
;MOV A,#01H;
;MOV P1,#00H;
;nxt:
2
;MOV R0,A
;MOV P1,A
;ADD A,R0;
;SJMP nxt
;END
;logic2
;MOV P1,#00H;
;MOV A,#01H;
;nxt:MOV P1,A
; RLC A;
;SJMP nxt
;END
;----------------------------------
; MOV P1,#00H;
; MOV A, #03H;
; RL A
; RL A
; SJMP UP1
;mvi C, ff H
; DCR C
; jnz up1
; END
calculations / results
For LED flashing Logic 1
3
1) What are the contents of accumulator after 6 th step of execution: -------------.