Re: 何時要宣告記憶體為far?

作者 Edison_yu 於 2017年01月04日 08:25:17
MPLAB® C18 C COMPILER USER’S GUIDE

2.4.1 near/far Data Memory Objects
The far qualifier is used to denote that a variable that is located in data memory lives
in a memory bank and that a bank switching instruction is required prior to accessing
this variable. The near qualifier is used to denote that a variable located in data
memory lives in access RAM.
2.4.2 near/far Program Memory Objects
The far qualifier is used to denote that a variable that is located in program memory
can be found anywhere in program memory, or, if a pointer, that it can access up to and
beyond 64K of program memory space. The near qualifier is used to denote that a
variable located in program memory is found at an address less than 64K, or, if a
pointer, that it can access only up to 64K of program memory space.

來自: http://www.microchip.com.tw/newbb/viewtopic.php?forum=7&topic_id=20042&post_id=73872