Code Monkey home page Code Monkey logo

elephantos's Introduction

bin/bochs -f bochsrc.disk;在bochs目录下管理员身份运行,进入bochs后输入c开始 nasm -o A.bin A.s dd if=./mbr.bin of=./bochs/hd60M.img bs=512 count=1 conv=notrunc sudo dd if=./loader.bin of=./bochs/hd60M.img bs=512 count=2 seek=2 conv=notrunc

先在bochs的配置文件中加入一句话”magic_break: enabled=1”,这句话的作用就是bochs启动时开启魔术断点调试功能,然后在程序开始处添加一句xchg bx,bx。当执行到xchg bx,bx指令时就会自动断到Bochsdbg里。

Ctrl+C中断图形化 xp 查看内存

应该将c程序编写为32位的.o文件: -m32

elephantos's People

Contributors

ahz-r3v avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.