ParsX.com
پذیرش پروژه از دانشجویی ... تا سازمانی 09376225339
View previous topic :: View next topic
Author
Message
michaelqwerty مهمون يكي دو روزه Joined: 10 Mar 2007 Posts: 18
Posted: Fri Jul 06, 2007 6:45 pm Post subject: کاربرد پشته چیست؟
من می خواستم بدونم 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
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
s
Powered by phpBB © 2001, 2010 phpBB Group
آمار