看板 ASM 關於我們 聯絡資訊
網址: https://reurl.cc/2mxVn 這段文章主要在介紹如何減少ISR的overhead,在CPU selection的第二段講到8051的架構 使得它的ISR可以寫得非常簡短,原因是: 8051 allows one to allocate a register bank to a particular block of code--such as an ISR--and thus drastically reduce the number of registers that need to be stacked 因為小弟我碰過的架構不多,不太懂"allocate a register bank to a particular block of code"這段意思,想麻煩各位大大幫小弟解惑一下。 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 118.163.216.18 ※ 文章網址: https://www.ptt.cc/bbs/ASM/M.1548050613.A.2BD.html
TWkobe: isr中斷到回復需要保存很多東西 用regiser保存會更快 01/21 16:47
TWkobe: 而8051可以指定register bank 01/21 16:48
TWkobe: https://goo.gl/LGPqdW 01/21 16:49
TWkobe: https://goo.gl/b9wZiv 01/21 16:51
TWkobe: 忘了說 多個banks為什麼會快的另一個原因 例如你指定bank0 01/21 17:04
TWkobe: 給isr0 ,bank 1給isr1 所以越多的bank給予指定function 01/21 17:05
TWkobe: 你當然比只有單一個bank給多個isr競爭共用好 01/21 17:06
TWkobe: 不然每次都要重新copy或回復isr需要的code或data 01/21 17:07
dsplab: 因為8051內定堆疊的SP值為07h,如果沒有更改SP值的話, 01/22 08:15
dsplab: 在每次的Push或呼叫副程式時,SP值會增加,就會破壞Bank1~ 01/22 08:17
dsplab: Bank3的R0~R7的值,所以一般SP值會設定在67h或E7h 01/22 08:19
zzss2003: 謝謝兩位大大精闢ㄉ解說 01/30 09:43