still exploring, hopefully i can get more out of this tool.iansjack wrote:The debugger is built in to SimNow and offers very comprehensive facilities for debugging.Brendan wrote:You'd want to obtain "SimNow debugger"
System resets if i initialize the stack segment in pmode
-
- Member
- Posts: 396
- Joined: Wed Nov 18, 2015 3:04 pm
- Location: San Jose San Francisco Bay Area
- Contact:
Re: System resets if i initialize the stack segment in pmode
key takeaway after spending yrs on sw industry: big issue small because everyone jumps on it and fixes it. small issue is big since everyone ignores and it causes catastrophy later. #devilisinthedetails
- 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: System resets if i initialize the stack segment in pmode
ggodw000 wrote:Secondly, whynot just tell me what i am missing then
Do you honestly believe that allows anybody to give you an exact answer? Not reading the manuals seems to extend to not reading the smart questions forum rule in this context.ggodw000 wrote:bochs (...) never worked.
And yes, I've seen your other thread. Have you seen the replies?
-
- Member
- Posts: 396
- Joined: Wed Nov 18, 2015 3:04 pm
- Location: San Jose San Francisco Bay Area
- Contact:
Re: System resets if i initialize the stack segment in pmode
Been away for sometime, hopefully will get back on this soon.
but last time, i decided to look at bit diff angle:
one thing i notice is that I did not setup SS during when I launch from DOS, so it must be using whatever stack DOS prepared before launching?
Anyways i did initialize stack segment:
Weird thing is if I did run the binary from DOS, stack segment values are as if it is not initialized at all. (it is not the value of the stack segment)
Now I run with GRDB debugger, than I see STACK segment is initialized with the STACK segment.
That is bizarre, it is as if, one line of code mov ss, ax is completely skipped, but if my memory recalls I think I have encountered this before.
I am working underway to make it directly bootable from disk, so that it wont depend on bios, i am guessing it involves probably at least writing some sort of video driver and some fat32 driver.
but last time, i decided to look at bit diff angle:
one thing i notice is that I did not setup SS during when I launch from DOS, so it must be using whatever stack DOS prepared before launching?
Anyways i did initialize stack segment:
Code: Select all
mov ax, STA
mov ss, ax
mov sp, 100h ( size of stack segment ).
Now I run with GRDB debugger, than I see STACK segment is initialized with the STACK segment.
That is bizarre, it is as if, one line of code mov ss, ax is completely skipped, but if my memory recalls I think I have encountered this before.
I am working underway to make it directly bootable from disk, so that it wont depend on bios, i am guessing it involves probably at least writing some sort of video driver and some fat32 driver.
Last edited by ggodw000 on Mon Jan 11, 2016 5:33 pm, edited 2 times in total.
key takeaway after spending yrs on sw industry: big issue small because everyone jumps on it and fixes it. small issue is big since everyone ignores and it causes catastrophy later. #devilisinthedetails
Re: System resets if i initialize the stack segment in pmode
So you move ax to the ss register, you then immediately move 100h to the ss register, and you ask why the mov ss, ax seems to be ignored.
-
- Member
- Posts: 396
- Joined: Wed Nov 18, 2015 3:04 pm
- Location: San Jose San Francisco Bay Area
- Contact:
Re: System resets if i initialize the stack segment in pmode
my bad, typo. Actual code doesnt have this type. Fixed the post too.iansjack wrote:So you move ax to the ss register, you then immediately move 100h to the ss register, and you ask why the mov ss, ax seems to be ignored.
Code: Select all
mov sp, 100h
key takeaway after spending yrs on sw industry: big issue small because everyone jumps on it and fixes it. small issue is big since everyone ignores and it causes catastrophy later. #devilisinthedetails
Re: System resets if i initialize the stack segment in pmode
Dos sets the stack pointer to the end of program's segment, to 0xFFFE. At least when executing com files.