flat assembler
Message board for the users of flat assembler.
![]() Goto page 1, 2 Next |
Author |
|
ManOfSteel 11 Nov 2016, 21:37
... and one of the many problems I can think of that assembly languages can't solve is self-delusion.
![]() |
|||
![]() |
|
UniverseIsASimulation 11 Nov 2016, 21:46
ManOfSteel wrote: ... and one of the many problems I can think of that assembly languages can't solve is self-delusion. Well said! Many people say that Boolean algebra helps with reasoning, and it doesn't. The world we live in is just a bunch of contradictory and contrary information. That's exactly what I would expect in a buggy computer simulation, not in the reality. Boolean algebra doesn't help here. Last edited by UniverseIsASimulation on 12 Nov 2016, 12:21; edited 1 time in total |
|||
![]() |
|
revolution 11 Nov 2016, 22:17
It is sad that UniverseIsASimulation is wrong. There are many things you can do in assembly that cannot be done in an HLL. C compilers do not give the programmer access to all of the CPU native instructions, so in some cases you are forced to use assembly when you need those instructions. As for that being specific to drivers (or anything else for that matter), well it depends upon what you are doing, as usual. Blanket statements that claim all drivers can be written in C are plain wrong. But the opposite is true, all programs (for anything) can be written in assembly. It might not be the best option, or the fastest option, but it is always an option.
|
|||
![]() |
|
neville 12 Nov 2016, 02:32
@UiAS: your OP reads reads as if it was inspired by a programmer with some disdain for assembly language, most likely a C programmer
![]() But now you are hearing from some A programmers "in real life", and surprise, we have a different view ![]() So don't get disappointed, but dedicate lots more time to learning assembly and become a proficient A programmer too. Or alternatively, just be happy being a C programmer, and accept your limitations ![]() _________________ FAMOS - the first memory operating system |
|||
![]() |
|
Furs 12 Nov 2016, 12:36
UniverseIsASimulation wrote: So, to people like me: I think that you can escape the reality using the computers, but that assembly language won't help you any more than, for example, C will. You might have more luck searching for Voodoo/Mystic or Alien CPUs. ![]() |
|||
![]() |
|
system error 12 Nov 2016, 15:37
Only an idiot talks like that on a board full of seasoned C programmers, compiler writers and OS developers.
|
|||
![]() |
|
TmX 12 Nov 2016, 16:03
Is there any open source OS writtein 100% in HLL (C,Pascal, etc) without assembly involved?
I just randomly checked the latest Linux kernel code, and well there are some assembly codes here and there. ![]() |
|||
![]() |
|
rugxulo 12 Nov 2016, 21:29
TmX wrote: Is there any open source OS writtein 100% in HLL (C,Pascal, etc) without assembly involved? I haven't personally checked the sources, but Project Oberon 2013 is supposedly pure Oberon (albeit using SYSTEM, which is where the non-portable, system-specific stuff goes). I'm pretty sure Wirth said he didn't need assembly, but when you have certain primitives already defined for such low-level purposes, then you shouldn't need much else. |
|||
![]() |
|
UniverseIsASimulation 13 Nov 2016, 08:20
Quote: C compilers do not give the programmer access to all of the CPU native instructions, so in some cases you are forced to use assembly when you need those instructions. 1. A lot of those instructions, if not most of them, do little more than just crashing your program (causing Bus error or Segmentation fault). For example, HLT, calling BIOS interrupts… Except if you work in DOS or maybe some other old operating system, which you probably don't. 2. Every modern OS has an API for writing drivers in an HLL. Quote: Assembly language is the language of the CPU. Exactly. But I don't think that newcomers expect that. Introduction to the book about Assembly Language I've read says that it's basically a language used with drivers and high-performance computer games which gives you access to all of the capabilities of your computer. |
|||
![]() |
|
revolution 13 Nov 2016, 21:53
UniverseIsASimulation wrote: 2. Every modern OS has an API for writing drivers in an HLL. |
|||
![]() |
|
bitRAKE 16 Nov 2016, 19:12
No language solves problems - the programmer solves the problem and translates it into languages they understand. In some languages a problem can be solved with a single line of code, but that doesn't say anything about the problem. If you work in a group then often a language understood by the whole team needs to be used.
Where does assembly language fit in? Some might say it's a way of thinking about problems - how to break them down into parts. Some might say it's a way of thinking about the machine - letting one code better in any language. Some might say it allows them to do what can't be done in any other language. I think it's all these things and none of them. It's possible to avoid assembly language and still be a good programmer, but that's not what any of us should be here for. |
|||
![]() |
|
avcaballero 18 Nov 2016, 11:26
I think that the question isn't "Why use assembly?" but "Why don't use assembly?", which has been despised many times
|
|||
![]() |
|
TheRaven 19 Nov 2016, 19:48
ManOfSteel wrote: ... and one of the many problems I can think of that assembly languages can't solve is self-delusion. Agreed. We do realize that compilers utilize a procedure similar to assembler and linkers are dead give away to the fact. Also, C/C++ as well as Pascal (freePascal) provide access to registers and stack. Assembler directly bypasses compiler design (proprietary) allowing un-interrupted access to various components at the hardware level including DMA if the developer wishes. ASM is limited only by the developer's understanding and not the compiler developer's interpretation of what is important. There is no escape from the fundamental importance and existence of assembler else I would have never bothered throwing 10 years into its study. OOA, OOD and OOP are all possible in assembler as hardware is modular or object based - Von Neuman Architecture 101. Access methods and classes are all possible and enforceable in assembler as well --whether anyone believes it or naught, all languages were designed on top of assembler to simplify development; the CPU can only understand its native op codes and that is assembler --assembler is only as important as having a CPU. All arguments to the contrary are foolish and those whom carry that fools gold are thus. ![]() _________________ Nothing so sought and avoided more than the truth. I'm not insane, I know the voices in my head aren't real! |
|||
![]() |
|
petelomax 26 Nov 2016, 02:27
Assembly in general and specifically FASM is a wonderful thing and an invaluable learning tool.
The option to write what you need in low-level code is easily justifiable, and any language designer that says, of such, anything remotely like "you don't need that" should be taken out and shot, or at the very least neutered. I am really glad that someone took the time to write FASM in FASM and make it self-hosting, but at the same time, I can accept the view that writing anything more than a few test programs in nothing-but-assembly is just plain foolish. My world, however, would be a much sader place without hundreds of FASM examples. For me, in all the languages I have ever used, the most important factor is time(bug->fix). Sadly, that is where FASM falters - no more than C/C++, but for all their other (nasty) flaws, PHP/Python/Java can teach them a few tricks. Pete (Author of Phix, a simple self-hosted hll inspired by FASM, which should have a working Linux GUI rsn [currently that is Windows-only].) |
|||
![]() |
|
typedef 26 Nov 2016, 11:57
UniverseIsASimulation wrote: So, to people like me: I think that you can escape the reality using the computers, but that assembly language won't help you any more than, for example, C will. Maybe you just had different intentions for learning assembly. I for one thought I'd become God and maybe dethrone it with my newly found Assembly skills. But you know what? It is because of Assembly that I am able to understand computers from electrical, hardware, and software point of view. Assembly opened my eyes to the wonderful things of this world. Especially sweet ass FASM. I dumped NASM and MASM. ![]() |
|||
![]() |
|
El Tangas 28 Nov 2016, 12:55
I too, learned assembly in the hope of attaining supreme godlike power, and became disappointed. Still human
![]() But hey, on the bright side, I can use the C flag, something the C language can't do. Go figure. |
|||
![]() |
|
ford 29 Nov 2016, 01:40
There are two major things that I would suggest we look at seriously. First, Assembly language requires that one know what he/she is actually doing. By itself this is actually quite amazing. Crappy software is a very serious threat for the modern world, and it needs more recognition. Second, Assembly does allow for more optimization than most other languages, but assembly takes more time to write. This means that you have to be conscious of the trade off: programmer time or computer time.
|
|||
![]() |
|
revolution 29 Nov 2016, 08:24
ford wrote: ... assembly takes more time to write. |
|||
![]() |
|
Furs 29 Nov 2016, 15:45
When I first learned of assembly it dramatically improved my C language skills. Prior to that I used to think of pointers as abstract arrows, which was a pain to visualize. Now they are nothing more than an index into memory for me. Obviously I had no idea how memory indexing/addressing actually worked before.
In my opinion HLLs are quite bad for beginners and I know from experience. It's fine to abstract things when you don't want to bother with details, but it's not a good way to learn and form a real understanding of what you're doing. No wonder so much software is full of stupid bugs these days and people even think they are doing good while relying on a "garbage collector"... because they were never taught the difference. |
|||
![]() |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.