Real Mode Example not assembling? What?

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.
Post Reply
thegamefreak0134
Posts: 14
Joined: Thu Jan 08, 2009 1:54 am

Real Mode Example not assembling? What?

Post 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!
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Re: Real Mode Example not assembling? What?

Post 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.
thegamefreak0134
Posts: 14
Joined: Thu Jan 08, 2009 1:54 am

Re: Real Mode Example not assembling? What?

Post 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
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

Re: Real Mode Example not assembling? What?

Post 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
Post Reply