Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

32bit pointers, GPFs and real mode (Developers)

posted by DOSferatu(R), minneapolis, mn usa, 27.08.2010, 00:57

hi gang.

I've got a real mode DOS app that I'm writing (x86 assembly) that needs to manipulate some data in 256k chunks. Since the data is larger than 64k segments, it's a bit of a pain to have to use normal ds/es segments and work on everything using 16 bit pointers.

So, I switched to setting gs=0 and addressing things with gs:[esi] which is significantly easier.

I'm not using memory above 1mb, and I don't really want to switch into unreal mode at the top of my program to be compatible on the most machines.

The machine I first developed this code on had absolutely no problems doing all the work it needed to do, so I thought I was done. I run the program on a different machine, and I get a general protection fault (GPF) every time I try and access any 32bit pointer.

I am admittedly *very* protected mode dumb, so my question are:
1) why does this work on some machines and not others? Are they already in unreal mode, left that way by the BIOS?
2) what is causing the GPF? I mean, is there a CPU register bit set or something in some GDT that is detecting this and causing it?
3) any other ways to do 32bit pointers? I don't want to use any libraries or extenders to do this work-the code is already 100% done, it just doesn't work the same on every platform.



Complete thread:

Back to the forum
Board view  Mix view
15317 Postings in 1383 Threads, 254 registered users, 32 users online (0 registered, 32 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum