Page 1 of 1

Real Mode Example not assembling? What?

Posted: Fri Jan 09, 2009 7:22 pm
by thegamefreak0134
I'm using the example on this page: http://wiki.osdev.org/Real_Mode

Now, this is the first time I've attempted to use this code, and it's possible that I'm doing something wrong, but It just doesn't seem to be right. First off, the assembler is complaining that "jump" isn't an instruction, and I want to say it's right, shouldn't it be "jmp"? Second, it doesn't know what DATASEL16 is, and I can't figure out what it's supposed to be.

I'm trying to use this code (and the reverse effect of it) to jump into real mode, run an interrupt to set up the video mode, and jump back into protected mode for my OS to continue on its merry way. Could someone either show me what I'm failing to see in the example, or post an example of their own? I'm no x86 assembly expert (working on it, but this is a strange architecture) and I tend to learn best by example. Ideally, I want this to blossom into something (however slow) that I can call from a function in my C code, but at this point I'd be happy with something I can run before C code ever starts.

Thanks!

Re: Real Mode Example not assembling? What?

Posted: Fri Jan 09, 2009 8:31 pm
by Dex
The example is incomplete, eg: jump like you sad is wrong and it turn int on without setting them up :(.
I would say its more per do code, as such should not be used unmodifyed.
I have written a demo to do what you want, its full fasm code.
http://www.dex4u.com/demos/VesaDemo.zip
Hope this helps.

Re: Real Mode Example not assembling? What?

Posted: Fri Jan 09, 2009 10:21 pm
by thegamefreak0134
WOW. Yes, this will definitely help. We (this is a project I'm working on with a good friend) will definitely look through this and figure out what to do. Thanks a bunch, I'll come back and post results once we've got something up and running.

To quote my partner: *happy squeak* :D

-Nicholas

Re: Real Mode Example not assembling? What?

Posted: Sat Jan 10, 2009 2:33 am
by VolTeK
i hope you learned assembly before you read that article :shock: , if not, you will not under stand that somethings need defined like bootprog, you have to edit the parameters for you floppy disk you are using within the bpb (bios parameter block). yes assembly is very different, but if you dont learn all of the basics, you will end up like me and bootprog wondering why it would not work untill i looked at the code #-o