flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > Which language for OS dev: Assembly or C? Goto page 1, 2 Next |
Author |
|
DJ Mauretto 28 Sep 2011, 18:03
Hi
If you like the assemby , is very difficult to digest other languages , the assembly is not a language, are the instructions on the various processors. However, it is also important to know C, not to program, but to understand the high-level languages. many of these languages are based on C (Java, C + +,and so on) _________________ Nil Volentibus Arduum |
|||
28 Sep 2011, 18:03 |
|
cod3b453 28 Sep 2011, 18:31
It depends on your design and goals but unless you're really aiming to support architectures other than x86 it's mostly down to your preference. You also have the option of mixing asm and C, which for FASM I found quite easy to do (though I've not used it in an OS development context).
|
|||
28 Sep 2011, 18:31 |
|
f0dder 28 Sep 2011, 19:08
Personally I did assembly and (a subset of) C++ when I played with osdev.
What to choose depends on project goals as well as personal preference. You're not going to come up with the next linux, so choose what you feel is fun |
|||
28 Sep 2011, 19:08 |
|
adroit 28 Sep 2011, 22:47
Thanks for the replies!
DJ Mauretto DJ Mauretto wrote: If you like the assemby , is very difficult to digest other languages , the assembly is not a language, are the instructions on the various processors. I do like assembly, although it's difficult, it will have to work. I find assembly to be very versatile with the instructions, control, and manipulation. I think I will go with it. It is important. High-level languages (3G & 4G) are what most programmers are using today in software engineering because of the fast-paced production of applications, so that's understandable. cod3b453 cod3b453 wrote: It depends on your design and goals but unless you're really aiming to support architectures other than x86 it's mostly down to your preference. You also have the option of mixing asm and C Can FASM assembly syntax be used as the inline assembly syntax? f0dder f0dder wrote: Personally I did assembly and (a subset of) C++ when I played with osdev. How far did you expect or intend that you project would reach or go (respectively)? Were assembly and C++ used together? And that's true. It's not the next linux, of course lol. However, I hope to learn alot from this project--something maybe similar to DexOS. The project goals are to develop a general-purpose operating system and to learn about OS development. In addition, design and implement a small assembler. All just for fun! |
|||
28 Sep 2011, 22:47 |
|
typedef 28 Sep 2011, 23:44
Well,....You would use C as tools, the interpreter. and ASM as the interpreted overall language.
IE, Say MS Visual Studio is an OS IDE that creates ASM OS code. That simple... |
|||
28 Sep 2011, 23:44 |
|
cod3b453 29 Sep 2011, 07:11
adroit wrote: Thanks for the replies! I don't think there are any C compilers that support FASM syntax but you can create C-linkable objects from FASM and link that with your C code. |
|||
29 Sep 2011, 07:11 |
|
f0dder 29 Sep 2011, 16:34
adroit wrote: What to choose depends on project goals as well as personal preference. You're not going to come up with the next linux, so choose what you feel is fun How far did you expect or intend that you project would reach or go (respectively)?[/quote]I didn't have any plan with the kernel other than learning more about system-level x86. Iirc the last time I touched it was around 2002, where (as far as I recall) I had: 1) multi-stage bootloader, including being bootable via TFTP on bootrom from an intel NIC (that was mostly an issue of setting up 3rd party code, I didn't write all the tooling code ). 2) serial cable bootloader, written by myself - never got it entirely stable at high speeds, couldn't be arsed for after I got network boot setup 3) keyboard and timer IRQ handling, including scancode->charbuffer and rudimentary timer/task support. 4) rudimentary paging and memory allocation support. Mostly pretty trivial stuff, the most interesting thing about the kernel is probably that it started out as a raw image, requiring custom gnu linker scripts etc... but was later moved to a Visual Studio build environment producing PE .exe output. And then I kinda lost interest adroit wrote: Were assembly and C++ used together? _________________ - carpe noctem |
|||
29 Sep 2011, 16:34 |
|
smiddy 07 Oct 2011, 18:11
I think it is all up to you. In order to code an OS though, you have to learn an abundance of things. You're on your way, and once you feel comfortable, you'll know what to use when you start to code.
|
|||
07 Oct 2011, 18:11 |
|
adroit 10 Oct 2011, 23:06
Thanks guys.
I think I might do the OS mainly in assembly, since I'm trying to improve on in the assembly language. Another thing that deterred me is that I'll have to use linkers. I'd rather keep my learning process simple. @f0dder | smiddy - [Nice outline; I just might use it]. This is a lot to learn, indeed. Do you have a link to these sources, or do you just keep them as a personal code? I'd really like to understand keyboard and memory management much better. Although they are trivial, they are enormous to undertake for first-timers. - Currently, I am analysing, specifying, and designing the OS. I am learning about operating systems as much as possible before coding. I plan to keep notes of what I learnt for later, rather than relying on mental notation. MS-OneNote is really good for that. _________________ meshnix |
|||
10 Oct 2011, 23:06 |
|
bitshifter 10 Oct 2011, 23:48
ASM is a great language, but is not portable.
It will take 10 man years to make good OS but the x86 may disappear in this time? My advice, as my OS project follows: Use ASM only for whats needed, boot, setup, etc... Then pass control to a C kernel which can be portable. So if x86 dies (like 8080 did) the project is still viable. _________________ Coding a 3D game engine with fasm is like trying to eat an elephant, you just have to keep focused and take it one 'byte' at a time. |
|||
10 Oct 2011, 23:48 |
|
f0dder 11 Oct 2011, 18:31
androit wrote: [Nice outline; I just might use it]. This is a lot to learn, indeed. Do you have a link to these sources, or do you just keep them as a personal code? I'd really like to understand keyboard and memory management much better. Although they are trivial, they are enormous to undertake for first-timers. Keyboard handling is - mostly - trivial, but it does require building tables and thinking how you want to handle accents and stuff. Memory handling is not trivial, although you can cobble something that "works okayish" together in a couple of hours androit wrote: Currently, I am analysing, specifying, and designing the OS. I am learning about operating systems as much as possible before coding. I plan to keep notes of what I learnt for later, rather than relying on mental notation. MS-OneNote is really good for that. You can do osdev in a rather modular fashion, so you can do a fair amount of research on one piece of the system, play around with implementations of it, and refine the process while researching more, and sketching out other parts of the system. It's probably a good idea to start with a rough outline of what you want to achieve, though. |
|||
11 Oct 2011, 18:31 |
|
smiddy 14 Oct 2011, 17:31
There are quite a few references here: http://wiki.osdev.org/Main_Page to start with.
|
|||
14 Oct 2011, 17:31 |
|
adroit 15 Oct 2011, 21:07
@bitshifter
I might use C for this first project, and then assembly on a smaller OS project (i.e. an experiment). The x86 might since they are up to i786 now. (I don't know though). @f0dder My mistake in saying MM is trivial. Sad. I'll try searching the internet for some demos. Dex4u had some demos on his site, but it was taken down. I'll try not to. But I learnt that it's best to design efficiently, and implement bug-freely—or something like that. Thanks for the tip. I'll try that. @smiddy Thanks. Because the project was suppose to be done in assembly, I never thoroughly referred to OSDev.org. I also found another site before: www.brokenthorn.com. |
|||
15 Oct 2011, 21:07 |
|
addes3 15 Oct 2011, 22:01
I wouldn't use C just because you want to be compatible with different processors.
For large, commercial OS's this may be essential, but for a small hobby OS, who cares. I seriously doubt that the x86 is going to disappear anytime soon, so if you like Assembly, use Assembly. |
|||
15 Oct 2011, 22:01 |
|
adroit 30 Nov 2011, 13:27
Agreed. As this is an experiment, assembly language could be used.
My plan is to develop a research OS using assembly language to learn about the operating system at basic. Thank you guys. |
|||
30 Nov 2011, 13:27 |
|
neville 01 Dec 2011, 00:37
If you want to develop an OS for a particular CPU platform then pure assembly is the way to go because it gives you the maximum ability to control what the processor actually does while booting and running your OS.
_________________ FAMOS - the first memory operating system |
|||
01 Dec 2011, 00:37 |
|
Dex4u 01 Dec 2011, 17:48
Theres also a ARM ver of DexOS written with FasmArm, due out soon.
So ASM hobby OS's can be ported to other processors. |
|||
01 Dec 2011, 17:48 |
|
f0dder 01 Dec 2011, 18:12
Dex4u wrote: Theres also a ARM ver of DexOS written with FasmArm, due out soon. _________________ - carpe noctem |
|||
01 Dec 2011, 18:12 |
|
Dex4u 01 Dec 2011, 18:28
f0dder wrote:
Rewriting, but with the road map there and the knowledge from coding it the first time. It took 6 months, instead of 8 years the first time. I believe its better to rewrite anyway to take advantage of the new processor function. |
|||
01 Dec 2011, 18:28 |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.