当前位置: 代码迷 >> 汇编语言 >> “fatal error L1103: attempt to access data outside segment bouds”这个异常是什么?该如何解决
  详细解决方案

“fatal error L1103: attempt to access data outside segment bouds”这个异常是什么?该如何解决

热度:9963   发布时间:2013-02-26 00:00:00.0
“fatal error L1103: attempt to access data outside segment bouds”这个错误是什么?该怎么解决?
LINK时 说我  
fatal error L1103: attempt to access data outside segment bouds
是怎么回事啊?? 这句话是什么意思啊? 
问题补充:还有一行少打了 pos:57 record type:8a


------解决方案--------------------------------------------------------
看字面意思是你访问的数据超出段了
------解决方案--------------------------------------------------------
把你代码贴出来看看呢
------解决方案--------------------------------------------------------
program segment ;define code segment
main proc far
assume cs:program
start: ;starting execution addr
;set up stack for return
push ds ;save old daata segment
sub ax,ax ;put zero in ax
push ax ;push zero on stack
;main part of program
mov ch,4 ;number of digits
rotate:
mov cl,4 ;set count to 4 bits
rol bx,cl ;left digit to right
mov al,bl ;move to al
and al,0fh ;mask of left digit
add al,30h ;convert hex to ASCII
cmp al,3ah ;is it >9?
jl printit ;jump of digit = 0 to 9
add al,7h ;digit is A to F
printit:
mov dl,al ;put ASCII char in DL
mov ah,2 ;display output funct
int 21h ;call DOS
dec ch ;done 4 digits?
jnz rotate ;not yet
ret ;end of main part of prog.
main endp ;eng of segment
program ends ;eng of segment
end start ;the entry of program is start
  相关解决方案