Page 1 of 1

How to do basic thing in pm

Posted: Thu Aug 04, 2005 11:00 pm
by codemastersnake
hi all!

my question is that how can one do some basic things like scrolling the screen up and moving cursor pos in text mode without access to bios interrupts...

Re: How to do basic thing in pm

Posted: Thu Aug 04, 2005 11:00 pm
by Osbios
Very simple: use the mem arrea at 0xB8000 for color- or 0xB0000 for monocrt.
nasm example(PMode; GS is a data segemt @0):

Code: Select all

scroll:
mov  eax,0xB8000

 .loop1
  mov ebx,[gs:eax+0xA0]
  mov [gs:eax],ebx
  add eax,4
 cmp eax,0xB8F00
 jne .loop1
 
 .loop2
  mov dword[gs:eax],0
  add eax,4
 cmp eax,0xB8FA0
 jne .loop2
ret

Re: How to do basic thing in pm

Posted: Thu Aug 04, 2005 11:00 pm
by Phibred
Take a look at my Operating System [done in NASM] http://individual.utoronto.ca/Phibred/LunarOS.htm that version is a little old however it is a great resource for some video tricks with no BIOS calls. Video.txt [in my current version it is Video.asm but I haven't gotten around to post that one yet]. I hope that helps.

Re: How to do basic thing in pm

Posted: Thu Aug 04, 2005 11:00 pm
by codemastersnake
Thanks for that but I know how to output using pointers....

OK Let me make me clear, I have searched net but wasn't able to find out solution to those in C/C++. I found only asm and .pas which I don't want/like.

can any one provide me some code in c or c++ for vesa... or a link

Re: How to do basic thing in pm

Posted: Thu Aug 04, 2005 11:00 pm
by Phibred
Wow, VESA is like a good year from where you seam to be right now. I recomend focusing on your Keyboard, Floppy, HDD, and CD-Rom drivers before you even think of VESA.

And don't worry about ASM to C translating. Most of the tutorials that I used were based in C and it does take a little more time, but I believe that you leard more that way.

You really could read my code and I think I actually have the C example for moving the text mode cursor.