MOV AX, 0x0000 doesn't work.
Re: MOV AX, 0x0000 doesn't work.
Why don't you use the Bochs debugger and step through everything starting at 0:0x500?
- RGOS
- Member
- Posts: 38
- Joined: Sat Feb 13, 2010 10:52 am
- Location: Buurmalsen, The Netherlands
- Contact:
Re: MOV AX, 0x0000 doesn't work.
Hello,
Yeah I'm gonna try it soon, Ive just installed Bochs with debugger.
I'll let you know what, if anything, I found.
Thanks.
Yeah I'm gonna try it soon, Ive just installed Bochs with debugger.
I'll let you know what, if anything, I found.
Thanks.
Program development: Think, think more and think again, then find the solution and code it.
OS development: Don't think, think less and don't think again, then the solution will come, else you're screwed.
Most of the time at OSDev you're screwed.
OS development: Don't think, think less and don't think again, then the solution will come, else you're screwed.
Most of the time at OSDev you're screwed.
- RGOS
- Member
- Posts: 38
- Joined: Sat Feb 13, 2010 10:52 am
- Location: Buurmalsen, The Netherlands
- Contact:
Re: MOV AX, 0x0000 doesn't work.
Hello,
I've found nothing so far, only that some Enable A20 routines were skipped due to a typo .
I'll look tommorow if I can find something more.
Thanks.
I've found nothing so far, only that some Enable A20 routines were skipped due to a typo .
I'll look tommorow if I can find something more.
Thanks.
Program development: Think, think more and think again, then find the solution and code it.
OS development: Don't think, think less and don't think again, then the solution will come, else you're screwed.
Most of the time at OSDev you're screwed.
OS development: Don't think, think less and don't think again, then the solution will come, else you're screwed.
Most of the time at OSDev you're screwed.
Re: MOV AX, 0x0000 doesn't work.
you might look for an unbalanced stack
i have no experience with bochs, so i can't really follow the code very well
but it sounds like a RET instruction is not getting a valid return IP value off the stack
if it pops a value of -1, the next instruction would cause segment wrap
i have no experience with bochs, so i can't really follow the code very well
but it sounds like a RET instruction is not getting a valid return IP value off the stack
if it pops a value of -1, the next instruction would cause segment wrap
Re: MOV AX, 0x0000 doesn't work.
[offtopic]What's that supposed to mean? Unless suffering from a serious lack of education, no Dutch person should say that as an excuse. Moreover, your English seems fine, so it's false modesty.[/offtopic]RGOS wrote:PS. Sorry for my English, I'm Dutch.
JAL
- RGOS
- Member
- Posts: 38
- Joined: Sat Feb 13, 2010 10:52 am
- Location: Buurmalsen, The Netherlands
- Contact:
Re: MOV AX, 0x0000 doesn't work.
Hello,
@jal: I'm still going to school, in fact I'm just back home (I'm 14 now).
But, yes, you hav a point, every Dutch person has to speak English.
But I'm going to do something now, I'm going to check for an unbalanced stack later.
Thanks.
@jal: I'm still going to school, in fact I'm just back home (I'm 14 now).
But, yes, you hav a point, every Dutch person has to speak English.
But I'm going to do something now, I'm going to check for an unbalanced stack later.
Thanks.
Program development: Think, think more and think again, then find the solution and code it.
OS development: Don't think, think less and don't think again, then the solution will come, else you're screwed.
Most of the time at OSDev you're screwed.
OS development: Don't think, think less and don't think again, then the solution will come, else you're screwed.
Most of the time at OSDev you're screwed.
Re: MOV AX, 0x0000 doesn't work.
Ok, given your young age, apologies for ranting. It may have been better if you'd have stated your age instead of your nationality, knowing you're just 14 will make most people much more lenient in answering questions usually triggering an RTFM (although even when you're 14, reading the manual is always a good thing :)).RGOS wrote:I'm still going to school, in fact I'm just back home (I'm 14 now).
JAL
- RGOS
- Member
- Posts: 38
- Joined: Sat Feb 13, 2010 10:52 am
- Location: Buurmalsen, The Netherlands
- Contact:
Re: MOV AX, 0x0000 doesn't work.
Hello,
I've tried to figure uot why I get the error, but I don't find anything.
I also don't know how to watch the value of (E)IP in bochs, how (if) can you watch the value of (E)IP, or set a watch- or breakpoint on (E)IP?
Thanks.
I've tried to figure uot why I get the error, but I don't find anything.
I also don't know how to watch the value of (E)IP in bochs, how (if) can you watch the value of (E)IP, or set a watch- or breakpoint on (E)IP?
Thanks.
Program development: Think, think more and think again, then find the solution and code it.
OS development: Don't think, think less and don't think again, then the solution will come, else you're screwed.
Most of the time at OSDev you're screwed.
OS development: Don't think, think less and don't think again, then the solution will come, else you're screwed.
Most of the time at OSDev you're screwed.
Re: MOV AX, 0x0000 doesn't work.
To set a breakpoint, enter vb segment:offset. For example, vb 0:0x500. The command "cont" continues execution. Type "s" to step forward one instruction, and "n" to step over a call or int. To pause the program at the current instruction while it's running, press Ctrl+C. Every time the program is paused, Bochs shows the value of CS and EIP and disassembles the next instruction.
- RGOS
- Member
- Posts: 38
- Joined: Sat Feb 13, 2010 10:52 am
- Location: Buurmalsen, The Netherlands
- Contact:
Re: MOV AX, 0x0000 doesn't work.
Hello,
Thank you for that info, but is there maybe a way of setting a "breakpoint" over IP, so that if the value of IP changes to -1 that the breakpoint activates?
Thanks.
Thank you for that info, but is there maybe a way of setting a "breakpoint" over IP, so that if the value of IP changes to -1 that the breakpoint activates?
Thanks.
Program development: Think, think more and think again, then find the solution and code it.
OS development: Don't think, think less and don't think again, then the solution will come, else you're screwed.
Most of the time at OSDev you're screwed.
OS development: Don't think, think less and don't think again, then the solution will come, else you're screwed.
Most of the time at OSDev you're screwed.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: MOV AX, 0x0000 doesn't work.
While you can try to catch the case IP=0xFFFF, it will not tell you how it got there.RGOS wrote:so that if the value of IP changes to -1 that the breakpoint activates?
Also, I never saw you fix this problem:
Did you put in some code to stop the processor yet?I wrote:the crash occurs well outside where your code is supposed to be. Most interesting, there's nothing after your code, you just let it roam free into whatever is there in RAM.
Re: MOV AX, 0x0000 doesn't work.
The code doesn't seem to roam. It ends with:
call ebp
cli
hlt
Anyway, the only way to find out where the code goes wrong is to step through it with the "n" command.
call ebp
cli
hlt
Anyway, the only way to find out where the code goes wrong is to step through it with the "n" command.
- RGOS
- Member
- Posts: 38
- Joined: Sat Feb 13, 2010 10:52 am
- Location: Buurmalsen, The Netherlands
- Contact:
Re: MOV AX, 0x0000 doesn't work.
Hello,
I don't find anything, but i'm gonna try to set the CS-register to 0 in the called code, would this help I don't know, but I can allways give it a try .
Thanks.
I don't find anything, but i'm gonna try to set the CS-register to 0 in the called code, would this help I don't know, but I can allways give it a try .
Thanks.
Program development: Think, think more and think again, then find the solution and code it.
OS development: Don't think, think less and don't think again, then the solution will come, else you're screwed.
Most of the time at OSDev you're screwed.
OS development: Don't think, think less and don't think again, then the solution will come, else you're screwed.
Most of the time at OSDev you're screwed.
- RGOS
- Member
- Posts: 38
- Joined: Sat Feb 13, 2010 10:52 am
- Location: Buurmalsen, The Netherlands
- Contact:
Re: MOV AX, 0x0000 doesn't work.
Hello,
Okay that didn't work, but I've copy-pasted the "FindFile" code in the main KERNEL.ASM code, and still I get the error.
I relly don't know what to do. Do any of you have an idea? I really can't find a typo or any other miniscule thing .
Thanks.
Okay that didn't work, but I've copy-pasted the "FindFile" code in the main KERNEL.ASM code, and still I get the error.
I relly don't know what to do. Do any of you have an idea? I really can't find a typo or any other miniscule thing .
Thanks.
Program development: Think, think more and think again, then find the solution and code it.
OS development: Don't think, think less and don't think again, then the solution will come, else you're screwed.
Most of the time at OSDev you're screwed.
OS development: Don't think, think less and don't think again, then the solution will come, else you're screwed.
Most of the time at OSDev you're screwed.
Re: MOV AX, 0x0000 doesn't work.
simplify your code, remove functionality, use 'jmp $' as a part of debugging process, display something on the screen (as simple as 'mov word [ds:videomem], 0404h' ;a red diamond I think)