Hi,
I'm with Michael here. I think your jump is successful, but you have garbage afterward, a wrong offset via the jump, or other.
Klakap wrote:
No, kernel isn`t start. Fail is with jump. Kernel hasn`t error. Please how I can start debug mode in bochs?
The Bochs debugger is a great tool. However, you have to have Bochs compiled with the debugger compiled in, usually called BOCHSDBG.EXE on windows. Couldn't tell you on Linux.
Then tell Bochs to use the debugger via your bochsrc.txt file:
Code:
#=======================================================================
# DISPLAY_LIBRARY
#
# The display library is the code that displays the Bochs VGA screen. Bochs
# has a selection of about 10 different display library implementations for
# different platforms. If you run configure with multiple --with-* options,
# the display_library command lets you choose which one you want to run with.
# If you do not write a display_library line, Bochs will choose a default for
# you.
#
# The choices are:
# x use X windows interface, cross platform
# win32 use native win32 libraries
# carbon use Carbon library (for MacOS X)
# macintosh use MacOS pre-10
# amigaos use native AmigaOS libraries
# sdl use SDL library, cross platform
# svga use SVGALIB library for Linux, allows graphics without X11
# term text only, uses curses/ncurses library, cross platform
# rfb provides an interface to AT&T's VNC viewer, cross platform
# wx use wxWidgets library, cross platform
# nogui no display at all
#
# NOTE: if you use the "wx" configuration interface, you must also use
# the "wx" display library.
#
# Specific options:
# Some display libraries now support specific option to control their
# behaviour. See the examples below for currently supported options.
#=======================================================================
#display_library: amigaos
#display_library: carbon
#display_library: macintosh
#display_library: nogui
#display_library: rfb, options="timeout=60" # time to wait for client
#display_library: sdl, options="fullscreen" # startup in fullscreen mode
#display_library: term
display_library: win32, options="gui_debug" # use Win32 debugger gui
#display_library: wx
#display_library: x, options="hideIPS" # disable IPS output in status bar
#display_library: x, options="gui_debug" # use GTK debugger gui
For Windows, I use the one above that is not commented. The one for 'win32'.
You can also tell the debugger to stop at the
Code:
xchg bx,bx
instruction. However, please note that it also depends on which mode you are in. If you are in pmode (32-bit register defaults), that instruction will not break. You must use
Code:
xchg ebx,ebx
At the same time, if you use the 'ebx' version in real mode (16-bit register defaults), it will not break. You need to use the form for the current mode you are in.
To get it to break at that instruction, use:
Code:
#=======================================================================
# MAGIC_BREAK:
# This enables the "magic breakpoint" feature when using the debugger.
# The useless cpu instruction XCHG BX, BX causes Bochs to enter the
# debugger mode. This might be useful for software development.
#
# Example:
# magic_break: enabled=1
#=======================================================================
magic_break: enabled=1
I remembered that I had a small tutorial on this and had to go find it. It is at
http://www.fysnet.net/bochsdbg/index.htmBen
-
http://www.fysnet.net/osdesign_book_series.htm