Operating System Programming

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
flexs

Operating System Programming

Post by flexs »

I want programm new operating system with graphical interface an so on, i search throught internet, but i can't find anything good, maybe someone can me suggest some links, if any have some OS projec and want give me source then I will be thankfull, I can boot 16bit mode, but I want boot 32bit mode, I can set video 320x200x256, but I want 800x600x24bit, I want use mouse and floppy, CD drives, how can I do this, if someone have example or can help me then I will be thankfull for help, I hope someone will help me!
Adek336

RE:Operating System Programming

Post by Adek336 »

pmode is fun to explain. do you know the theory? if yes, try this asm prog, in NASM, and if you understand it i'll send more.

of course, you'll have to dig for theory.

this actually works:

[ORG 0x100]
[BITS 16]
start:cli

mov bx, gdtr
lgdt [ds:bx]

mov eax, cr0
or al, 1
mov cr0, eax

jmp 0x10:do_pm

[BITS 32]
do_pm:
mov ax, 0x18
mov ds, ax
mov ss, ax

mov ax, 8
mov es, ax

mov byte [es:dword 0xb8002], 'a'
jmp 0x20:do_pm16
[BITS 16]
do_pm16:
hang: jmp hang
gdtr:
  dw gdt_end - gdt0 - 1
  dd 0x40000 + gdt0

gdt0:
  dw 0
  dw 0
  db 0
  db 0
  db 0
  db 0
  
LINEAR_sel equ $-gdt0
gdt1:
  dw 0xffff
  dw 0
  db 0
  db 0x92
  db 0xcf
  db 0
  
CODE_sel equ $-gdt0
gdt2:
  dw 0xffff
  dw 0
  db 4
  db 0x9a
  db 0xcf
  db 0
  
DATA_sel equ $-gdt0
gdt3:
  dw 0xffff
  dw 0
  db 4
  db 0x92
  db 0xcf
  db 0
gdt4:
  dw 0xffff
  dw 0
  db 4
  db 0x9a
  db 0
  db 0
gdt5:
  dw 0xffff
  dw 0
  db 4
  db 0x92
  db 0
  db 0

gdt_end:
ka3r

RE:Operating System Programming

Post by ka3r »

Well this website has LOTS of OS projects. If you wanna check out GUI operating systems, try MenuetOS (written in 100% asm, a bit cryptic, VESA graphical user interface, TCP/IP support) or AtheOS (C code, partially POSIX compliant, very good GUI with freetype support, TCP/IP, native journalling filesystem, lots more)

MenuetOS can be reached at www.menuetos.org
AtheOS at www.atheos.cx

Remember that AtheOS is currently dead, so you may want to download its fork Syllable (syllable.sourceforge.net)

Bye
Post Reply