Comments (4)
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.
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.
@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.
Simple and clear. Thanks @jlagarespo!
from os-tutorial.
Related Issues (20)
- Problem with example 14 on real machine HOT 1
- cross-compiler for M1 MacBook? HOT 10
- Difference in binary code between the book and my PC HOT 2
- PLEASE CONTINUE !!!!!
- Multiple definition of 'idt' and 'idt_reg' HOT 1
- 3 - jump opcode causes a problem
- File driver fat32 HOT 4
- To whom it may concern! HOT 1
- Result displayed on the terminal itself HOT 1
- 11-Cross Compiler: GCC not compiling HOT 1
- I have a question about 13 kernel bare bones HOT 2
- Share my Makefile to everyone(macOS 13.5) HOT 1
- 05-bootsector-functions-strings/boot_sect_print_hex.asm
- [Open letter] long-standing problems with this tutorial and its consequences due to good SEO HOT 8
- Linker Error! HOT 1
- Print function will print to random locations
- Tut
- An OS from scratch started with this tutorial HOT 1
- Error: unable to disambiguate: -no-PIE
- Not a issue just want to help people compiling on linux
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from os-tutorial.