• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
:::


Browsing this Thread:   1 Anonymous Users






Re: 關於組合語言的小問題
#4
資深會員
資深會員


查看用戶資訊
mcu 不同,架構完全不一樣

pic16 系列,一般有 八層 stack,也就是說,你可以連續call 8次,call 第九次就會掛掉

中斷本身也算是 call 的一種,所以發生中斷也會佔用一層 stack

所以,如果你在中斷中也做了 call 的動作,那你的一般程序中,最多只能call 6 次,

否則就有可能發生 stack overflow,不定時造成系統掛掉


二、pic16 有page 限制,call 不同page 的程式,要先切換 page 才能 call

三、pic10 12 or 16 有些只有兩層stack, 被call 的 funtion 會被限制在 0~0x00ff 在這範圍之外的 subroutine 是不能被 call




發表於: 2008/7/3 12:01
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 關於組合語言的小問題
#3
高級會員
高級會員


查看用戶資訊
非常謝謝您! 我看了一下W100 的講義 他上面寫說 使用者只可使用七層堆疊, 請問這是真的嗎?
我記得以前寫8051, 會有個DPTR, 是堆疊的指標,可以自己把它重新指向其他位址. 是否Pic 也可以.

剛剛看錯了 實際是8層堆疊, 是否代表我只能連續call 4次呢!?

發表於: 2008/7/3 9:19
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 關於組合語言的小問題
#2
資深會員
資深會員


查看用戶資訊
一、注意 call 與 被call 的 function 的位置

二、注意 被call 的程式位置

三、注意 stack

發表於: 2008/7/3 9:08
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


關於組合語言的小問題
#1
高級會員
高級會員


查看用戶資訊
想請問一下,在組合語言裡面 假設我call TestA了,在TestA
裡面能再call 一次 別的function嗎!? 如果想這麼做,是否需要
什麼步驟!?

例如這樣

call TestA

TestA :
call TestB
return

TestB:
return

發表於: 2008/7/2 18:24
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------