当前位置: 技术问答>linux和unix
ATT&&bochs环境13号中断bochs异常
来源: 互联网 发布时间:2017-01-07
本文导语: HI,各位大神,我用att写一个bootloader,需要读取软盘信息,用到int 13中断,核心代码如下: 157 push %bx 158 xor %bx,%bx 159 mov %ax,%bx 160 xor %ah,%ah 161 xor %dl...
HI,各位大神,我用att写一个bootloader,需要读取软盘信息,用到int 13中断,核心代码如下:
157 push %bx
158 xor %bx,%bx
159 mov %ax,%bx
160 xor %ah,%ah
161 xor %dl,%dl
162 int $0x13
163 mov %bx,%ax
164 xor %bx,%bx
165 mov BPB_SecPerTrk,%bl
166 div %bl
167 inc %ah
168 mov %ah,%cl
169 mov %al,%dh
170 and $1,%dh
171 mov $0,%dh
172 mov %al,%ch
173 shr $1,%ch
174 mov BS_DrvNum,%dl
175 .GoOnReading:
176 mov $2,%ah
177 mov $1,%al
178 int $0x13
179 jc .GoOnReading
180 pop %bx
这里如果把%dh设置为1则bochs会抛出下列异常,何解???麻烦各位给予帮助多谢。
00037253533e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
00037277565e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
00037301597e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
00037325629e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
00037349661e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
00037373693e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
00037397725e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
00037421757e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
00037445789e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
00037469821e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
00037493853e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
00037517885e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
157 push %bx
158 xor %bx,%bx
159 mov %ax,%bx
160 xor %ah,%ah
161 xor %dl,%dl
162 int $0x13
163 mov %bx,%ax
164 xor %bx,%bx
165 mov BPB_SecPerTrk,%bl
166 div %bl
167 inc %ah
168 mov %ah,%cl
169 mov %al,%dh
170 and $1,%dh
171 mov $0,%dh
172 mov %al,%ch
173 shr $1,%ch
174 mov BS_DrvNum,%dl
175 .GoOnReading:
176 mov $2,%ah
177 mov $1,%al
178 int $0x13
179 jc .GoOnReading
180 pop %bx
这里如果把%dh设置为1则bochs会抛出下列异常,何解???麻烦各位给予帮助多谢。
00037253533e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
00037277565e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
00037301597e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
00037325629e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
00037349661e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
00037373693e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
00037397725e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
00037421757e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
00037445789e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
00037469821e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
00037493853e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
00037517885e[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
|
打错了
是不正确,程序才有问题
编辑在哪里?
是不正确,程序才有问题
编辑在哪里?
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。