Google Answers Logo
View Question
 
Q: assembly language ( No Answer,   1 Comment )
Question  
Subject: assembly language
Category: Computers
Asked by: lallu-ga
List Price: $2.00
Posted: 16 Dec 2002 20:06 PST
Expires: 27 Dec 2002 22:05 PST
Question ID: 125780
"how to display the contents of the stack in assembly language"

Request for Question Clarification by hailstorm-ga on 16 Dec 2002 20:50 PST
What processor would this be for?  The solution varies if you're doing
this on a PC, a Mac, a Commodore 64, etc...

Clarification of Question by lallu-ga on 16 Dec 2002 21:23 PST
using on PC for MASM simulator

Clarification of Question by lallu-ga on 16 Dec 2002 21:24 PST
pentium II or above/ windows

Request for Question Clarification by joseleon-ga on 16 Dec 2002 23:47 PST
Hello:
  How do you want to display the stack value? Write to the console is
enough for you or do you want a messagebox?

Regards.

Clarification of Question by lallu-ga on 17 Dec 2002 05:24 PST
i did wrote a recursive procedure to calculate nth fibonacci number.so
i pushed few values values on to the stack.I need to print the
values(on the console), i pushed.this is a part of my class project
which is due tommorrow i.e., on wed by 12.30pm.here is copy of my
sub-prodedure
         INCLUDE PCMAC.INC
         .MODEL SMALL
         .586
         .DATA
S_Number  EQU    WORD PTR[bp+8]
S_Prev    EQU    WORD PTR[bp+6]
S_This    EQU    WORD PTR[bp+4]
Temp      DW     0
         .CODE
          EXTRN putdec : NEAR
          PUBLIC FiboHelp
FiboHelp  PROC
          push bp
          mov bp, sp
          mov ax, S_Number
          mov bx, S_Prev
          mov cx, S_This
          cmp ax, 0
          jne Check1
          mov bx, 0
          jmp Done
Check1:
          cmp ax, 1
          je Done
          ;mov bx,1
          ;jmp Done

;Checknum:
          dec ax
          mov Temp, bx
          mov bx,cx
          add cx,Temp
          push ax
          push bx
          push cx
          call FiboHelp

Done:
          mov sp,bp
          pop bp
          ;call putdec
          ret
FiboHelp  ENDP
          END
***********************************
this sub-procedure is called by main-procedure.
I need all the values i pushed to b printed on the console (but a
hexdecimal value using puthex.
thanx
Answer  
There is no answer at this time.

Comments  
Subject: Re: assembly language
From: shadedrongo-ga on 22 Dec 2002 17:25 PST
 
I don't understand what a problem...
int stack you keep word,word,word,bp,ip
so the distance beetween level's is ten bytes. Can't you go through
the stack??? Or You can symply display digits in FiboHelp !!!

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy