OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 9:33 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Is necessary develop currently in Assembly...?
PostPosted: Sat Nov 29, 2014 8:47 am 
Offline
Member
Member

Joined: Tue Nov 18, 2014 10:02 am
Posts: 50
...


Last edited by trident on Sun Dec 06, 2015 10:02 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Is necessary develop currently in Assembly...?
PostPosted: Sat Nov 29, 2014 9:15 am 
Offline
Member
Member
User avatar

Joined: Fri Oct 27, 2006 9:42 am
Posts: 1925
Location: Athens, GA, USA
I'm not certain if I am following you, quite, nor do I fully see the relevance of the digression about Kermit, but as far as OS dev is concerned, there are and probably always will be some parts of an operating system that will need to be written in assembly. The amount absolutely necessary is rather small, but it is there, especially if you choose to write your own boot loader. The majority of an OS can be written in a high-level language, however (for suitable values of 'high-level'; see the Languages page of the wiki for the requirements of a language applicable to OS dev).

OTOH, if you are talking about Mel Kaye style hex coding rather than using an assembler to do the heavy lifting... frankly, it is almost unheard of today, and for good reason. You can do it if you'd like, but don't be surprised if you end up in an asylum gibbering about Elder Gods and the stars aligning...

_________________
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.


Last edited by Schol-R-LEA on Sat Nov 29, 2014 9:22 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Is necessary develop currently in Assembly...?
PostPosted: Sat Nov 29, 2014 9:22 am 
Offline
Member
Member

Joined: Tue Nov 18, 2014 10:02 am
Posts: 50
...


Last edited by trident on Sun Dec 06, 2015 10:02 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Is necessary develop currently in Assembly...?
PostPosted: Sat Nov 29, 2014 9:23 am 
Offline
Member
Member
User avatar

Joined: Fri Oct 27, 2006 9:42 am
Posts: 1925
Location: Athens, GA, USA
trident wrote:
Schol-R-LEA wrote:
I'm not certain if I am following you, quite, nor do I fully see the relevance of the digression about Kermit, but as far as OS dev is concerned, there are and probably always will be some parts of an operating system that will need to be written in assembly. The amount absolutely necessary is rather small, but it is there, especially if you choose to write your own boot loader. The majority of an OS can be written in a high-level language, however (for suitable values of 'high-level'; see the Languages page of the wiki for the requirements of a language applicable to OS dev).


Schol-R-LEA, is necessary develop currently in hex code and the other encodings that I asked?

Almost never. Even most OS developers will never have to do it unless they choose to.

_________________
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.


Top
 Profile  
 
 Post subject: Re: Is necessary develop currently in Assembly...?
PostPosted: Sat Nov 29, 2014 9:33 am 
Offline
Member
Member

Joined: Tue Nov 18, 2014 10:02 am
Posts: 50
...


Last edited by trident on Sun Dec 06, 2015 10:03 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Is necessary develop currently in Assembly...?
PostPosted: Sat Nov 29, 2014 9:46 am 
Offline
Member
Member

Joined: Tue Nov 18, 2014 10:02 am
Posts: 50
...


Last edited by trident on Sun Dec 06, 2015 10:03 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Is necessary develop currently in Assembly...?
PostPosted: Sat Nov 29, 2014 10:24 am 
Offline
Member
Member
User avatar

Joined: Fri Oct 27, 2006 9:42 am
Posts: 1925
Location: Athens, GA, USA
I think understanding the binary coding can be very useful, sure, so lessons in it make a certain amount of sense. However, actually doing significant work in it generally is more effort than is justifiable for the results, and likely to lead to frustration (insanity isn't actually likely, though it might seem so after a few days of it).

As for an assembler not supporting some opcodes... well, it can happen, with very new versions of a processor or a very old assembler, I suppose, but I've never run into such a situation myself. OTOH, I'm in the process of writing my own assembler, so that does put a different spin on things for me.

_________________
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.


Top
 Profile  
 
 Post subject: Re: Is necessary develop currently in Assembly...?
PostPosted: Sat Nov 29, 2014 10:30 am 
Offline
Member
Member
User avatar

Joined: Fri Dec 15, 2006 5:26 pm
Posts: 437
Location: Church Stretton Uk
trident wrote:
Sorry, I forgot to ask you something.

I heard say that nobody writes in binary, the lowest you could go is hexadecimal. Most CPUs take hexcodes and turn them into binary directly, they've been doing that for decades. But everyone uses Assembly because writing in hexadecimal directly is insane.

Is truth that nobody writes in binary, the lowest you could go is hex code? :wink:


It is almost never the case that anybody codes directly in hex, and still less binary. The only very rare exception occurs if you want to do something the assembler won't. You usually encounter an example of that if you are using masm to write a second stage loader.

_________________
The continuous image of a connected set is connected.


Top
 Profile  
 
 Post subject: Re: Is necessary develop currently in Assembly...?
PostPosted: Sat Nov 29, 2014 10:50 am 
Offline
Member
Member
User avatar

Joined: Fri Oct 27, 2006 9:42 am
Posts: 1925
Location: Athens, GA, USA
trident wrote:
Sorry, I forgot to ask you something.

I heard say that nobody writes in binary, the lowest you could go is hexadecimal. Most CPUs take hexcodes and turn them into binary directly, they've been doing that for decades.


The CPUs don't, but the debuggers, disassemblers, loaders, and other software that access that level of programming directly generally will. It is possible to access the binary level, but... why would you?

_________________
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.


Top
 Profile  
 
 Post subject: Re: Is necessary develop currently in Assembly...?
PostPosted: Sat Nov 29, 2014 2:32 pm 
Offline
Member
Member

Joined: Tue Nov 18, 2014 10:02 am
Posts: 50
...


Last edited by trident on Sun Dec 06, 2015 10:03 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Is necessary develop currently in Assembly...?
PostPosted: Sat Nov 29, 2014 2:54 pm 
Offline
Member
Member
User avatar

Joined: Wed Jul 02, 2014 2:10 am
Posts: 27
I'm sorry if this is off topic but this guy really confuses me. He's everywhere, I've seen him on Phoronix forums, ReactOS forums, and the FreeBSD forums. Everywhere he goes he asks the same thing and gets the same answer. At first I thought he was a spambot.

To be on topic, as I said on the ReactOS forums, there are no practical reasons to use binary/hex, even assembly isn't very practical in most cases, but if you want to do it as a hobby sure, you can even wire up your own processor as a hobby if you want. Actually I was doing that in a program called Logisim. Hell, forge your own metals, silicon and porcelain and make your own computer, you can go as low-level as you want. But I think more importantly, what is it about this answer that you aren't satisfied with? Do you want to use hex/binary that badly? You can you know, nobody's stopping you. Hell, pick up a copy of Intel's x86 manual, that's an excellent start for that.

So OP, where are you going to ask this next? :roll:


Top
 Profile  
 
 Post subject: Is necessary develop currently in Assembly, ..., hex code?
PostPosted: Wed Dec 03, 2014 6:25 pm 
Offline
Member
Member

Joined: Tue Nov 18, 2014 10:02 am
Posts: 50
...


Last edited by trident on Sun Dec 06, 2015 10:04 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Is necessary develop currently in Assembly, ..., hex cod
PostPosted: Wed Dec 03, 2014 7:05 pm 
Offline
Member
Member
User avatar

Joined: Fri Dec 15, 2006 5:26 pm
Posts: 437
Location: Church Stretton Uk
Unfortunately, your English isn't all that it could be. But I will try my best:

a.) Microcode is a language which the processor uses internally. The only people who ever encounter it are programmers who work for processor manufacturers, such as Intel.

b.) Nobody, except perhaps one or two eccentrics, programs in hex or binary.

c.) Assembly language tends not to be very much used nowadays, although it cannot be completely avoided if you are writing an operating system.

d.) C tends to be the language of choice to operating system development.

_________________
The continuous image of a connected set is connected.


Top
 Profile  
 
 Post subject: Re: Is necessary develop currently in Assembly, ..., hex cod
PostPosted: Thu Dec 04, 2014 12:14 am 
Offline
Member
Member

Joined: Wed Oct 30, 2013 1:57 pm
Posts: 306
Location: Germany
mathematician wrote:
c.) Assembly language tends not to be very much used nowadays, although it cannot be completely avoided if you are writing an operating system.
Source? I'd say Assembly is used by many programmers. You need it for things like heavy code optimization, shellcoding and compilerDeving. That's not just a little part; it's a big one. Some c-only programmers don't need it, but still know it.

As soon as you start to program on a arch other than IA-32(e), you will run into trouble with your C compiler. For example, there's no good C compiler for Zilogs (ask the KnightOS guys if you don't believe what I'm saying).

_________________
managarm


Top
 Profile  
 
 Post subject: Re: Is necessary develop currently in Assembly, ..., hex cod
PostPosted: Thu Dec 04, 2014 2:51 am 
Offline
Member
Member

Joined: Sun Feb 01, 2009 6:11 am
Posts: 1070
Location: Germany
I think you're heavily overestimating the number of kernel and compiler developers. And even of those, only the platform-specific core code and the code generator actually require writing some lines of assembly. That's a rather small part of a complete OS or compiler, and still most of it isn't in assembly.

The truth is that C is already too low-level for most people who write some kind of code, and that I've met only few people whose code got better instead of worse when they "optimised" it by rewriting in assembly. Let's not even start talking about the maintainability and error-proneness of assembly code. For a good low-level C programmer, assembly is mostly read-only: Occasionally (not really hoften) reading the compiler output while debugging something.

With respect to other platforms: About any serious platform has a C compiler. Have a look at the arch/ directory of my Linux source tree (hint: it's written in C):
Code:
$ ls arch/
alpha  arm    avr32     c6x   frv      ia64     m32r  metag       mips     openrisc  powerpc  score  sparc  um         x86
arc    arm64  blackfin  cris  hexagon  Kconfig  m68k  microblaze  mn10300  parisc    s390     sh     tile   unicore32  xtensa

I see 28 non-x86 architectures there.

_________________
Developer of tyndur - community OS of Lowlevel (German)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 27 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group