Bug jumping from bootsect to kernel [SOLVED]

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
DavidCooper
Member
Member
Posts: 1150
Joined: Wed Oct 27, 2010 4:53 pm
Location: Scotland

Re: Bug jumping from bootsect to kernel

Post by DavidCooper »

Sorry - that was misinformation. It doesn't work! I ran the wrong version by mistake, the one that I'd modified.
Help the people of Laos by liking - https://www.facebook.com/TheSBInitiative/?ref=py_c

MSB-OS: http://www.magicschoolbook.com/computing/os-project - direct machine code programming
User avatar
DavidCooper
Member
Member
Posts: 1150
Joined: Wed Oct 27, 2010 4:53 pm
Location: Scotland

Re: Bug jumping from bootsect to kernel

Post by DavidCooper »

By the way, I meant to tell you that your clear_screen routine seems to cause the screen mode to change, resulting in a strange trail of dots along the top pixel-line of the screen instead of the name of your OS.

Bochs reports something about 640 x 480.

Don't understand that, because graphics screens appear at A0000h. Weird!
Last edited by DavidCooper on Wed Apr 27, 2011 3:23 pm, edited 2 times in total.
Help the people of Laos by liking - https://www.facebook.com/TheSBInitiative/?ref=py_c

MSB-OS: http://www.magicschoolbook.com/computing/os-project - direct machine code programming
User avatar
DavidCooper
Member
Member
Posts: 1150
Joined: Wed Oct 27, 2010 4:53 pm
Location: Scotland

Re: Bug jumping from bootsect to kernel

Post by DavidCooper »

The debug code (posting to the screen before the jump to the kernel) must be causing a crash due to ES not being set to 16.
Help the people of Laos by liking - https://www.facebook.com/TheSBInitiative/?ref=py_c

MSB-OS: http://www.magicschoolbook.com/computing/os-project - direct machine code programming
antoniovazquezblanco
Member
Member
Posts: 25
Joined: Sun Apr 24, 2011 1:37 pm

Re: Bug jumping from bootsect to kernel

Post by antoniovazquezblanco »

DavidCooper wrote:The debug code (posting to the screen before the jump to the kernel) must be causing a crash due to ES not being set to 16.
it isn' that....
User avatar
DavidCooper
Member
Member
Posts: 1150
Joined: Wed Oct 27, 2010 4:53 pm
Location: Scotland

Re: Bug jumping from bootsect to kernel

Post by DavidCooper »

Yes, I've just used nops to replace the code which posts to the screen before the jump to the kernel (using latest version of your disk image), and again it works perfectly.

Your kernel code is now correct.
Last edited by DavidCooper on Wed Apr 27, 2011 3:26 pm, edited 1 time in total.
Help the people of Laos by liking - https://www.facebook.com/TheSBInitiative/?ref=py_c

MSB-OS: http://www.magicschoolbook.com/computing/os-project - direct machine code programming
antoniovazquezblanco
Member
Member
Posts: 25
Joined: Sun Apr 24, 2011 1:37 pm

Re: Bug jumping from bootsect to kernel

Post by antoniovazquezblanco »

DavidCooper wrote:Yes, I've just replaced the code posting to the screen before the jump to the kernel with nops and it works perfectly.
Not for me ¬¬
User avatar
DavidCooper
Member
Member
Posts: 1150
Joined: Wed Oct 27, 2010 4:53 pm
Location: Scotland

Re: Bug jumping from bootsect to kernel

Post by DavidCooper »

antoniovazquezblanco wrote:
DavidCooper wrote:Yes, I've just replaced the code posting to the screen before the jump to the kernel with nops and it works perfectly.
Not for me ¬¬
Have you made another disk image available with that code removed? If so I'll check it. Have you tried it in Bochs or are you just using Qemu?
Help the people of Laos by liking - https://www.facebook.com/TheSBInitiative/?ref=py_c

MSB-OS: http://www.magicschoolbook.com/computing/os-project - direct machine code programming
User avatar
DavidCooper
Member
Member
Posts: 1150
Joined: Wed Oct 27, 2010 4:53 pm
Location: Scotland

Re: Bug jumping from bootsect to kernel

Post by DavidCooper »

Okay. That one's just crashed in Bochs. I'm about to explore it.
Help the people of Laos by liking - https://www.facebook.com/TheSBInitiative/?ref=py_c

MSB-OS: http://www.magicschoolbook.com/computing/os-project - direct machine code programming
User avatar
DavidCooper
Member
Member
Posts: 1150
Joined: Wed Oct 27, 2010 4:53 pm
Location: Scotland

Re: Bug jumping from bootsect to kernel

Post by DavidCooper »

¡Ya está allí! (I hope that means: "It's still there!") Get rid of the code between the two jumps!
Last edited by DavidCooper on Wed Apr 27, 2011 3:44 pm, edited 1 time in total.
Help the people of Laos by liking - https://www.facebook.com/TheSBInitiative/?ref=py_c

MSB-OS: http://www.magicschoolbook.com/computing/os-project - direct machine code programming
antoniovazquezblanco
Member
Member
Posts: 25
Joined: Sun Apr 24, 2011 1:37 pm

Re: Bug jumping from bootsect to kernel

Post by antoniovazquezblanco »

DavidCooper wrote:Ya esta alli! Get rid of the code between the two jumps!
I don't get it? What codee? :P
User avatar
DavidCooper
Member
Member
Posts: 1150
Joined: Wed Oct 27, 2010 4:53 pm
Location: Scotland

Re: Bug jumping from bootsect to kernel

Post by DavidCooper »

The debug code posting to the screen just before the call to the kernel is still there in the latest disk image. Unless the wrong one got loaded... Let me try it again...
Help the people of Laos by liking - https://www.facebook.com/TheSBInitiative/?ref=py_c

MSB-OS: http://www.magicschoolbook.com/computing/os-project - direct machine code programming
User avatar
DavidCooper
Member
Member
Posts: 1150
Joined: Wed Oct 27, 2010 4:53 pm
Location: Scotland

Re: Bug jumping from bootsect to kernel

Post by DavidCooper »

Here's what I'm looking at, and the bit in bold is the bit that you're supposed to have removed.
234 5 124 0 0 49 192 142 216 142 208 188 0 124 104 0 16 7 187 0

0 180 2 176 1 181 0 177 2 182 0 178 0 205 19 115 9 232 77 0

15 131 212 255 235 62 250 228 146 12 2 230 146 251 184 128 128 142 192 190

183 124 49 255 185 10 0 102 243 165 15 1 22 177 124 250 15 32 192 102

131 200 1 15 34 192 234 91 124 8 0 199 5 0 128 11 0 80 31 77

31
234 0 0 1 0 8 0 190 144 124 232 16 0 244 235 253 80 82 184

0 0 178 0 249 205 19 90 88 195 96 180 14 172 60 0 116 4 205 16

235 247 97 195 91 33 93 32 69 114 114 111 114 32 98 111 111 116 105 110

103 32 70 105 114 101 98 105 114 100 32 79 83 46 46 46 0 39 0 0

8 8 0 0 0 0 0 0 0 0 0 255 255 0 0 0 154 207 0 255

255 0 0 0 146 207 0 0 0 0 0 0 0 0 0 0 0 0 0 0
disk.dir
000 001
000 102
The 234 0 0 1 0 8 0 after it is the jump to the kernel.
The 234 91 124 8 0 before it is the jump to set CS. Didn't that have a prefix in front of it before? Let me check that...
Last edited by DavidCooper on Wed Apr 27, 2011 3:52 pm, edited 1 time in total.
Help the people of Laos by liking - https://www.facebook.com/TheSBInitiative/?ref=py_c

MSB-OS: http://www.magicschoolbook.com/computing/os-project - direct machine code programming
antoniovazquezblanco
Member
Member
Posts: 25
Joined: Sun Apr 24, 2011 1:37 pm

Re: Bug jumping from bootsect to kernel

Post by antoniovazquezblanco »

DavidCooper wrote:Here's what I'm looking at, and the bit in bold is the bit that you're supposed to have removed.
234 5 124 0 0 49 192 142 216 142 208 188 0 124 104 0 16 7 187 0

0 180 2 176 1 181 0 177 2 182 0 178 0 205 19 115 9 232 77 0

15 131 212 255 235 62 250 228 146 12 2 230 146 251 184 128 128 142 192 190

183 124 49 255 185 10 0 102 243 165 15 1 22 177 124 250 15 32 192 102

131 200 1 15 34 192 234 91 124 8 0 199 5 0 128 11 0 80 31 77

31
234 0 0 1 0 8 0 190 144 124 232 16 0 244 235 253 80 82 184

0 0 178 0 249 205 19 90 88 195 96 180 14 172 60 0 116 4 205 16

235 247 97 195 91 33 93 32 69 114 114 111 114 32 98 111 111 116 105 110

103 32 70 105 114 101 98 105 114 100 32 79 83 46 46 46 0 39 0 0

8 8 0 0 0 0 0 0 0 0 0 255 255 0 0 0 154 207 0 255

255 0 0 0 146 207 0 0 0 0 0 0 0 0 0 0 0 0 0 0
disk.dir Mach.Ed2
000 001 000 000
000 102 034 039
Are you shure you've downloaded the latest link? It doesn't appear for me!
User avatar
DavidCooper
Member
Member
Posts: 1150
Joined: Wed Oct 27, 2010 4:53 pm
Location: Scotland

Re: Bug jumping from bootsect to kernel

Post by DavidCooper »

antoniovazquezblanco wrote:Are you sure you've downloaded the latest link? It doesn't appear for me!
I've just downloaded it again from the same link and it has a different time stamped on it, so I'll try running it again. While I'm doing that, have a quick look up this page at my posts as I've edited some of them a few times to add information which you may have missed.
Help the people of Laos by liking - https://www.facebook.com/TheSBInitiative/?ref=py_c

MSB-OS: http://www.magicschoolbook.com/computing/os-project - direct machine code programming
Post Reply