ParsX.com
پذیرش پروژه از دانشجویی ... تا سازمانی 09376225339
 
   ProfileProfile   Log in to check your private messagesLog in to check your private messages  |  FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups Log inLog in   RegisterRegister 

کاربرد پشته چیست؟

 
Post new topic   Reply to topic    ParsX.com Forum Index -> ساختمان و زبان ماشين
View previous topic :: View next topic  
Author Message
michaelqwerty
مهمون يكي دو روزه


Joined: 10 Mar 2007
Posts: 18

PostPosted: Fri Jul 06, 2007 6:45 pm    Post subject: کاربرد پشته چیست؟ Reply with quote

من می خواستم بدونم stack یا همان پشته چه فایده ای دارد؟
در این برنامه ای که این پایین مشاهده می کنید
با حذف پشته تغییری در برنامه دیده نمی شود

sseg     segment  'stack'
         db  1  dup("stack--")
sseg     ends

dseg     segment
msg1     db       "Test program"
         db       " with procedure","$"
dseg     ends

cseg     segment   'code'
assume   cs:cseg,ss:sseg, ds:dseg
page
main     proc     far
         push     ds
         push     0
         mov      ax, dseg
         mov      ds, ax       
         call     cls
         call     move_cursor
         mov      dx, offset msg1
         call     disp_message
         ret
         main     endp
;******************************
;        clear the screen      *
;******************************

cls      proc     near
         mov      ah, 06h
         mov      al, 25
         mov      ch, 0
         mov      cl, 0
         mov      dh, 24
         mov      dl, 79
         mov      bh, 7
         int      10h
         ret
cls      endp
;*******************************
;        procedure move_cursor  *
;*******************************

move_cursor       proc  near
         mov      ah, 02h
         mov      dh, 12
         mov      dl, 30
         mov      bh, 0
         int      10h
         ret
move_cursor       endp
;*******************************
;        procedure print prompt *
;*******************************
disp_message      proc  near
       
         mov      ah, 09h
         int      21h
         ret
disp_message      endp

cseg     ends
         end      main
Back to top
Display posts from previous:   
Post new topic   Reply to topic    ParsX.com Forum Index -> ساختمان و زبان ماشين All times are GMT + 3.5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum