{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ch6-proc-recursive-passing

# ch6-proc-recursive-passing - Procedures Recursive procedure...

This preview shows pages 1–3. Sign up to view the full content.

Procedures Recursive procedure exercise Passing information to/from procedures EE 3750 Assume that CS = 2000H for all of the instructions below, that the offset of TAG2 is 124H, the offset of TAG3 is 3416H, and the offset of TAG4 is 3429H. Assume that SI holds 67H before starting this code sequence. TAG1: MOV COUNT, 5 MOV AL, 2 CALL NEAR PTR RECPROC TAG2: MOV BX, 3 ++++++++++++++ RECPROC PROC NEAR PUSH SI TAG3: CMP COUNT, 0 JE DONE DEC COUNT MOV SI, COUNT CALL NEAR PTR RECPROC TAG4: ADD SI, SI MOV BLACK[SI], SI DONE: POP SI RET RECPROC ENDP Exercise: Display contents of stack by a sequence of diagrams at three times: the first, second, and third times instruction TAG3 is executed.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Assume that CS = 2000H for all of the instructions below, that the offset of TAG2 is 124H, the offset of TAG3 is 3416H, and the offset of TAG4 is 3429H. Assume that SI holds 67H before starting this code sequence. TAG1: MOV COUNT, 5 MOV AL, 2 CALL NEAR PTR RECPROC TAG2: MOV BX, 3 ++++++++++++++ RECPROC PROC NEAR PUSH SI TAG3: CMP COUNT, 0 JE DONE DEC COUNT MOV SI, COUNT CALL NEAR PTR RECPROC TAG4:
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 5

ch6-proc-recursive-passing - Procedures Recursive procedure...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online