GithubHelp home page GithubHelp logo

Comments (4)

jlagarespo avatar jlagarespo commented on August 18, 2024 2

QEMU would just continue running whatever there is in memory after the bootsector. Which is zeros. Or garbage data. Once it has gone over all the zeroes of the bootsect it finds the magic number. Let's dissasemble the magic number. What does it do?

push bp
stosb

and so we push bp to the stack and issue the stosb instruction(which by having SI and DI undefined, we are not sure what is it doing). Then we continue running. Likely we find more zeroes. Or maybe BIOS code all over the place. The behaviour is undefined. Probably just running up in memory forever.
Why would any warning or error be issued by QEMU?
As you yourself said, QEMU is not a wizard that knows where the bootsector stops, so how could it know when(or why) to throw a warning?
It just runs what is in memory. Simple enough, that's how computers work.

Hope that awnsered your question :)

from os-tutorial.

Teln0 avatar Teln0 commented on August 18, 2024

Ive noticed that nasm reacts weirdly to errors, by just "loading the back up of the previous version". I dont know if thats true, just a feeling

from os-tutorial.

ljleb avatar ljleb commented on August 18, 2024

@Teln0 even if that would be the case, I don't know how qemu would find about a previous version. I would change the name of the boot sector file, and still get similar results.

from os-tutorial.

ljleb avatar ljleb commented on August 18, 2024

Simple and clear. Thanks @jlagarespo!

from os-tutorial.

Related Issues (20)

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.