Read Floppy sector

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.
Kemp

Re:Read Floppy sector

Post by Kemp »

The entire computing world is made of sects. The eternal conflict between The Holy Order of VI and The Church of Emacs comes to mind ;)
DynatOS

Re:Read Floppy sector

Post by DynatOS »

Kemp wrote: The entire computing world is made of sects. The eternal conflict between The Holy Order of VI and The Church of Emacs comes to mind ;)
LOL. Yes, well... sect... dedicated believers in FASM... a government conspiracy. I don't really care what it is, I only care that examples like Dex4u/Ashley4's belief in what Tomasz said have ground to them, mainly because people spread information that other are willing to believe just as blindly and then it becomes a web of lies and misinformation (no pun intended).
Cjmovie

Re:Read Floppy sector

Post by Cjmovie »

Here is my GDT data:

Code: Select all

GdtUnreal:
   dw GdtUnreal_end - GdtUnreal_start - 1 ;Size of table
GdtUnreal_start:
        dw 0, 0, 0, 0   ;Null descriptor, 4 words all set to '0'
        dw 0FFFFh       ;Part of limit
   dw 0            ;Some flags
   db 0            ;Some flags
        db 92h          ;Present, ring 0, data, expand-up, writable
   db 0CFh      ;Page-granular, 32-bit
   db 0
GdtUnreal_end:
I feel like an idiot. I forgot to put:

Code: Select all

dd GdtUnreal_start
I tested, it seems to work.
DynatOS

Re:Read Floppy sector

Post by DynatOS »

Cjmovie wrote: Here is my GDT data:

Code: Select all

GdtUnreal:
   dw GdtUnreal_end - GdtUnreal_start - 1 ;Size of table
GdtUnreal_start:
        dw 0, 0, 0, 0   ;Null descriptor, 4 words all set to '0'
        dw 0FFFFh       ;Part of limit
   dw 0            ;Some flags
   db 0            ;Some flags
        db 92h          ;Present, ring 0, data, expand-up, writable
   db 0CFh      ;Page-granular, 32-bit
   db 0
GdtUnreal_end:
I feel like an idiot. I forgot to put:

Code: Select all

dd GdtUnreal_start
I tested, it seems to work.
I am glad you figured out what was wrong, it rarely is easy to step outside of the problem and step through your source to figure out what is wrong (mostly because things make sense in your head). For me it seems the more difficult thing is to accept when things do work :P
Cjmovie

Re:Read Floppy sector

Post by Cjmovie »

True. The hard part is that the error wasn't actually code, so I coulnd't step it :).
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Read Floppy sector

Post by Pype.Clicker »

Cjmovie wrote: Hmm...Out of curiosity, is it possible that BOCHS only auto-enables A20 while the PM bit is set in CR0? Meaning I would have to enable A20 myself anyways?
as seen on The FAQ:
Bochs enables A20Line in the BIOS
Your PC doesn't necessarily does so. Sometimes there's a BIOS option, sometimes there isn't. Check your code that enables A20Line and make sure it has no issues with faster hardware.
Dex4u

Re:Read Floppy sector

Post by Dex4u »

@DynatOS, You may of missed the point, he did not say that Bochs does not emulat unreal mode, but that it does not emulat it properly, this may or may not of shown up, in the problem in cjmovie code (as it happend it was not the problem).

I for one Do Not follow what other programmers say blindly, but just pointed to a comment i read, to try help cjmovie with his problem.
I do not use Bochs or unreal mode, so can only point people to possable courses.
But if i where to take anybodies word on this subject, Tomasz Grysztar
would be top of my list.
Cjmovie

Re:Read Floppy sector

Post by Cjmovie »

Pype.Clicker wrote:
Cjmovie wrote: Hmm...Out of curiosity, is it possible that BOCHS only auto-enables A20 while the PM bit is set in CR0? Meaning I would have to enable A20 myself anyways?
as seen on The FAQ:
Bochs enables A20Line in the BIOS
Your PC doesn't necessarily does so. Sometimes there's a BIOS option, sometimes there isn't. Check your code that enables A20Line and make sure it has no issues with faster hardware.
As a note from my BIOS, I qoute:

Option "A20" -> "Let a pin on the keyboard controller control the A20 line, or let the SuperIO Chip auto-enable A20."
Post Reply