what to learn?
what to learn?
hey,
im new here (and to OS development)
I was wondering what I should do to start making my own operating system. I have been working on a bootstrap in x86 asm but its weird
any thoughts?
[edit]i forgot to mention, i would like to do this all in x86 asm.
im new here (and to OS development)
I was wondering what I should do to start making my own operating system. I have been working on a bootstrap in x86 asm but its weird
any thoughts?
[edit]i forgot to mention, i would like to do this all in x86 asm.
Last edited by njkt on Mon Oct 25, 2004 11:00 pm, edited 1 time in total.
Re: what to learn?
I do my simple OS project in x86 asm and i think it's good language to OS programming, but you can try do sth in C/C++
-
- Posts: 1
- Joined: Mon Oct 25, 2004 11:00 pm
Re: what to learn?
i like to us C, it seems more reilable, and plus alot of people avoid C++, ASM is great for bootloaders, and some small parts of the kernel, for added functionality but most of the kernel i use C, but asm is fine if you don't mind writing a alittle more code
The meaning of life 101101
Re: what to learn?
yeah, this is a floppy disk sized OS. the only thing is im a bit confused on what to do for this whole thing (may be in over my head lol)
-
- Posts: 2
- Joined: Tue Oct 26, 2004 11:00 pm
- Location: Germany / NRW / Coesfeld
Re: what to learn?
I prefer Sphinx C-- for os development. Because its very lowlevel, you can directly add ASM with Intel-Syntax ( i hate AT&T syntax ). There are 2 ways to do that.
Or
You can easyily create interrupts in 16 / V86 mode.
Its just easy to create binary files !
Use C-- yourfile.c to create a .COM file or C-- /B32 yourfile.c
to create a 32bit binary file.
Theres ES/DS/FS/GS BYTE/WORD/INT/LONG/DWORD/FLOAT for memory access.
You can check the flags with:
You can use fastcall, inline, pascal, stdcall .. . for functions.
the int x = 5; means that you declare this var on the stack.
Ah i could write a long story about Sphinx C--, its the best you read the doc. I like C-- very much !
Heres the link http://c--sphinx.narod.ru/indexe.htm
Bye.
Code: Select all
asm {
mov ah,0x0E
mov al,1
mov bx,0x0007
int 0x10
}
Code: Select all
void main() {
$mov ah,0x0E
$mov al,1
$mov bx,0x0007
$int 0x10
}
or
void main() {
AH = 0x0E;
AL = 1;
BX = 0x0007
$int 0x10
}
Code: Select all
interrupt _int_0x20 {
}
SETINTVECT( ..... )
Use C-- yourfile.c to create a .COM file or C-- /B32 yourfile.c
to create a 32bit binary file.
Theres ES/DS/FS/GS BYTE/WORD/INT/LONG/DWORD/FLOAT for memory access.
Code: Select all
ES = 0;
ESBYTE[0x7C00] = 0x05;
ESWORD[0x5500] = 0x10FF;
ESINT....
ESDWORD...
Code: Select all
CARRYFLAG
NOTCARRYFLAG
OVERFLOW
NOTOVERFLOW
ZEROFLAG
NOTZEROFLAG
MINUSFLAG
PLUSFLAG
if(CARRYFLAG) { ..... }
Code: Select all
fastcall void Test(AX)
int x = 5;
{
int y = 0;
$POP y
}
Ah i could write a long story about Sphinx C--, its the best you read the doc. I like C-- very much !
Heres the link http://c--sphinx.narod.ru/indexe.htm
Bye.
Re: what to learn?
Nice code Probably this code can help somebody
Re: what to learn?
hey,
im not really wanting to use C much (if any)
im not really wanting to use C much (if any)
Re: what to learn?
It mustn't help you. I mean can help somebody. I using just asm but code is nice
Re: what to learn?
Note that it is also possible to use and generate the Intel syntax with GCC and GAS. You can even change the AT&T syntax by removing the %before the registers. See -masm (gcc), .intel_syntax (gas), google...I prefer Sphinx C-- for os development. Because its very lowlevel, you can directly add ASM with Intel-Syntax ( i hate AT&T syntax ).
I love gas
Last edited by neil on Tue Mar 08, 2005 12:00 am, edited 1 time in total.
Re: what to learn?
I found, that nasm is the best assembler dialect (near to intel!) and wrote an OS using this language. A lot of things You could desire are done already! Look at my homepage
www.rcfriz.de
contact me, using
[email protected]
frizzz
www.rcfriz.de
contact me, using
[email protected]
frizzz