Re: RES設定的問題
|
||||
---|---|---|---|---|
版主
|
參照:
請問 ee位址 如何自動接續於 bb 之後? 這是你所要問的問題,而上一個又是另外一個問題,這是不一樣的解答。請問真正的問題是?
發表於: 2009/6/25 10:53
|
|||
|
Re: RES設定的問題
|
||||
---|---|---|---|---|
版主
|
參照:
這有點複雜,因為屬不同的兩個 asm 檔。一般是不會這樣宣告的,要被對方使用到或使用對方宣告的變數是可以使用 global & extern 來擴展變數的視野的。你應先崁解一下這兩個虛指令的用法。以妳的例子只能強制給位址: gpr1B UDATA 0xA2 ee REG 1 ff REG 1 .
發表於: 2009/6/25 9:44
|
|||
|
Re: RES設定的問題
|
||||
---|---|---|---|---|
版主
|
參照:
PIC16Fxxx 可以使用 udata_ovr 的宣告來共用 RAM,其說明如下:
myaoscn udata_ovr 0x40
1. Section name (節區名稱) 要一樣 : myaoscn,如果有指定位址其位址也要一樣 (範例中為 0x40) 2. 這樣組譯後的位址: u8a = 0x40 = u16a, u8b=u16b=0x41
myaoscn udata_ovr
不指定位址,原則上會從最前面的位址 0x20 開始排起。 這樣組譯後的位址: u8a = 0x20 = u16a, u8b=u16b=0x21
發表於: 2009/6/25 9:35
|
|||
|
Re: RES設定的問題
|
||||
---|---|---|---|---|
資深會員
|
請教版主
大字.比較容易閱讀
發表於: 2009/6/25 0:48
|
|||
少年不知愁滋味,老來方知路難行。
|
||||
|
Re: RES設定的問題
|
||||
---|---|---|---|---|
新會員
|
原來是如此,可以再請問例如我A已經使用RES分配一個位址了,那如果B要跟A共用同一個位址的話要如何設定呢?謝謝
發表於: 2009/6/24 21:02
|
|||
|
Re: RES設定的問題
|
||||
---|---|---|---|---|
版主
|
因為 RAM 0x70~0x7F 是屬於 Share Bank,所以不能用一般的 GP RAM 的方式去定義它,要使用 UDATA_SHR 的方式。參考底下的範例:
LIST p=16F723 ; list directive to define processor
發表於: 2009/6/24 18:39
|
|||
|
RES設定的問題
|
||||
---|---|---|---|---|
新會員
|
我使用PIC16F723,使用RES,定義"BANK0_20 iDATA 0x20" "BANK1_A0 IDATA 0xA2",用RES去設定RAM位址,但是在BANK0只要超過0x6F就會出現錯誤,BANK0不是可以定義到0x7F嗎?然後我定義"BANK0_70 IDATA 0x70"想再從0x70開始排RAM的位址,結果出現"Error - section 'BANK0_70' can not fit the absolute section. Section 'BANK0_70' start=0x00000070, length=0x0000000",請問要該如何解決?謝謝
發表於: 2009/6/24 16:44
|
|||
|