diff options
Diffstat (limited to 'TASK3.asm')
-rw-r--r-- | TASK3.asm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/TASK3.asm b/TASK3.asm new file mode 100644 index 0000000..e7fea45 --- /dev/null +++ b/TASK3.asm @@ -0,0 +1,15 @@ +; CALL ACTS LIKE A FUNCTION CALL IN C, A SUBROUTINE +; CALL COUNT AND COUNT TO C FROM B +JMP START + +START: MVI B,00H ; COUNT FROM 0 + MVI C,05H ; COUNT TO 5 + MOV A,B ; COUNT FROM B + CALL CNT ; CALL COUNT SUBROUTINE + HLT ; HALT +CNT: CMP C ; COMPARE C TO A + RZ ; RETURN IF C==A + INR A ; A++ + JMP CNT ; LOOP + +
\ No newline at end of file |