ch6-proc-recursive-passing

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

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 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. 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...
View Full Document

This note was uploaded on 01/25/2012 for the course EE 3750 taught by Professor Desouza during the Fall '08 term at LSU.

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 Right Arrow Icon
Ask a homework question - tutors are online