ret does crash!?!

Programming, for all ages and all languages.
User avatar
B.E
Member
Member
Posts: 275
Joined: Sat Oct 21, 2006 5:29 pm
Location: Brisbane Australia
Contact:

Post by B.E »

With the information you've provided so far, I would say it's a stack problem(i.e you havn't pop all the data that you pushed on to the stack, or you've popped to much). or it could be a interrupt not being handled(i.e timer) which causes a double fault which because that interrupt is implemented yet causes a tripple fault and restarts.

Can I see your bochsout file, also if I could see the implementation of the function that your calling that would be great,.
Image
Microsoft: "let everyone run after us. We'll just INNOV~1"
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

I would put my money on your A20 code does not work, try a differant one or try setting your stack to a differant address.

Or just try this:

Code: Select all

     push eax  ; Do this to shift the stack pointer
     push eax  ; and again
     call check  ;;;;This is the Function
     mov byte [es:0xB809E], "T" Print T
     chk01:
     jmp chk01
and see if you get the T
User avatar
mathematician
Member
Member
Posts: 437
Joined: Fri Dec 15, 2006 5:26 pm
Location: Church Stretton Uk

Post by mathematician »

So far as I can see the only possible explanation is faulty memory. Even if there was a memory mapped device at that address, it would need a hardware interrupt to wake it up. In any case, it is unlikely that the interrupt would always occur precisely between the two mov's.

Unless somebody else can see something I can't.
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

@mathematician, What if the A20 was not enabled, ( as most A20 code does not work on all PC ) odd megabytes are inaccessible, which the first and second print # may be go between odd and even ?.
Post Reply