首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 嵌入开发 > 汇编语言 >

有哪位高手碰到过这个异常 -- Fatal Error C1603

2012-03-24 
有谁碰到过这个错误 --Fatal Error C1603错误内容:fatalerrorC1603:inlineassemblybranchtargetoutofrange

有谁碰到过这个错误 -- Fatal Error C1603
错误内容:
   
        fatal   error   C1603:   inline   assembly   branch   target   out   of   range   by   11   bytes


MSDN上解释:

        Fatal   Error   C1603

        Error   Message  
        inline   assembly   branch   target   out   of   range   by   'number '   bytes

        The   computed   distance   between   a   JCXZ   or   JECXZ   instruction   and   its   specified   target   label   was   greater   than   128   bytes.   Update   your   code   so   that   the   label   is   closer   to   the   instruction.

        对这个解释不是很理解,请大虾帮忙~



[解决办法]
8086 的条件转移指令和 jcxz 指令的转移范围只是 [-128,127], 如果目标地址在超过了这个范围就是上面提及的错误了. 由于现在的 cpu 早已不是当初的 8086 了, 所以, 比较简单的做法就是使用 808386 级的指令, 对实模式它可以支持到 64K 范围的寻址:
.model small ; 可以
.386

热点排行