How the fuck did anyone ever program in assembly

how the fuck did anyone ever program in assembly

Other urls found in this thread:

menuetos.net/
youtu.be/vsYhNfxpUD0
catb.org/jargon/html/story-of-mel.html
twitter.com/NSFWRedditVideo

Brainlet

they were mostly all people with maths degrees or other scientific backgrounds

It was all they had.

They are smart people who are familiar with technology. The opposite of Sup Forums basically.

a lot of comments

Software people were usually also hardware people back then, so they thought of programing very differently

They saw it as a means to make machine parts move, not as a way to make programs

I still use assembly for many old machines, as a hobby obviously.
I suck at general math but I'm good algebra and general logic, I find assembly real enjoyable.

writing some small thing like a fizzbuz or tip calculator program seems possible with enough effort for me

but how the fuck did people make large projects, let alone games with assembly?

Peoples used punch cards before that. You didn't even get the luxury of an assembler error.

By being lonely freaks.
My dad told me the early programmers where the most sad employees. Looked like shit and never talked to anyone. But they made good money.

write high level psuedocode first then code it in assembly afterwards one part at a time

They didn't. There had to be entire teams of people hauling ass together to make even basic CLI programs run properly. Compiled languages like C++/Java were eventually made from assembly to let developers or small teams of them write gaymes/software and then that was used to write interpreted languages like php/python for scripting/wannabe programmers.

Assembly today poses no real value other than dicking around. Even embedded code for sensitive equipment is written in C++/Java.

is this a real person or a screenshot from the sims?

assembly is nice but can be painful, everything makes sense. honestly learning
recursion, pointers and working with memory is best done in assembly, every
programmer should start with it.

you write abstractions and then build on top of them. Just as usual.

The hard part of assembly is remembering the opcodes, registers and figuring the clusterfuck that is AT&T syntax.

One guy wrote rollercoaster tycoon in assembly.

You're full of it.

So nothing changed?

He didn't have to and it's very inefficient with compiled languages around.

Just because you can doesn't mean you should. He could have also written the games in 0s and 1s and taken 100 times longer.

menuetos.net/
Brainlet

can i get through a computer science degree without touching this shit

thank god for modern languages

We have laptops with server-grade processing power from a decade ago (see R7 1700 laptop).

Again just because you can doesn't mean you should.

I barely know assembly, and after spending a long time not doing anything with it and basically forgetting how to use it in practice, I could get fizzbuzz up and running in about 10 minutes.

Do you usually spend 10 minutes programming something in javascript and then deciding that anything more than that is too much effort, and nobody could do larger projects?

Hush Timmy, go back to >>/mlp/ and let the big boys talk okay?

You say that as if it supposed to be much harder than "Normal" programming. It's still just functions with arguments, and you can make abstractions for things if you want.

lol

You're no different from those deranged manchildren especially when you seek to push your strange enthusiasm for things nobody likes. It's this mindset that allowed you to get bullied so much in school and then grow into a useless failed member of society, Timmy.

Hey that's not funny, my brother died that way.

WTF ITS HARD ?

I NEED TO LEARN THAT SHIT STILL DIDNT START I THOUGHT IT WAS EASY ?

IS IT EASIER THEN C?

Give an example of something that you think is hard to do in assembly.

Saying Assembly has no real value today is pretty harsh. Compilers still suck at making use of SIMD instructions and a portion of the operating system will always be written in assembly to make use of instructions written specifically to make kernels run faster. If you want to do reverse engineering you'll need to know some kind of assembly. And generally it's good to know how the code actually runs even if you never actually code in assembly. The days of expert programmers optimizing computers with assembly is definitely nearing it's end though. But there's always the job of maintaining unreadable legacy Assembly code.

even though assembly is as low level as it get's for a programmer, what is the actual assembler written in? The one that turns my assembly code into machine code for a given architecture

I share your sentiment, today's software does use excessive amounts of resources and can barely use more than 1-2 cpu threads efficiently. But that is due to poor programming skills in general. But with skilled programmers software written in assembly vs a compiled language doesn't give you significantly better performance.

But I do agree with assembly being crucial to kernel-level OS optimizations. An OS written entirely on a compiled language would raise hell.

>t. web developer

a convolutional neural network

Fuck you AT&T syntax is best

youtu.be/vsYhNfxpUD0

catb.org/jargon/html/story-of-mel.html

Also, if you can mentally flowchart the program, assembly isn't that different from C.

It's not hard, it's just tedious, especially to debug. The whole point of higher level languages was to make them more readable for humans. Seriously, don't be scared. It's all very logical, and most instructions you'll use are very simple.

good

This >Also, if you can mentally flowchart the program, assembly isn't that different from C.

Is also a good point. Once you get how to do certain idioms in assembly like loops, if/else, etc., it's pretty trivial to translate a C program to assembly.

They didn't you moron. Even the Z3 had Plankalkül. The first mainframe had a number of languages including KOMPILER.

The computing era really took off with Fortran though. A decade after Fortran you got BASIC, a decade after BASIC you got C.

>But with skilled programmers software written in assembly vs a compiled language doesn't give you significantly better performance.

There isn't even a guarantee that just doing something in assembly means that it will be faster.

Convolution is just a deeply nested loop. Even optimized version with im2col isn't that difficult to code.
I wrote an NN library for myself in C++, and it doesn't seem too hard to translate the main algorithms onto assembly.

this is why NT (slightly) blows. only the HAL is machine-specific, everything else, including the kernel is written in C, and early NT builds suffered from lack of performance as a result
>first preview build (March 1993): 3.1.404, or as I like to call it, "404: Speed Not Found" - the web was less than two years old at the time

You break up the program in to a bunch of smaller programs and rigorously define what each one does and how it interacts with the other parts.

>He didn't have to
No of course not. The laws of physics did not require that this program be made. There was no one holding a gun to his head. He could have just waved his hands and said this can't run on current hardware and have been done with it. He could have done like modern numale programmers and just said screw making this use less CPU cycles and less RAM. The user can just go out and buy a faster CPU and more RAM if he wants to run my program :^).

It was a different time then. A time when men saw a problem and fixed it, came home, drank a beer, and put a kid in the wife. Now we just see a problem, import a library, come home and help refugees put a kid in our wife. Some may call this brainlet but this is what peak efficiency looks like.

No.

Good joke.

Intel
sub eax, [edx + ecx*4 - 20H]
; eax = eax - [edx + ecx*4 - 20h]


AT&T
subl -0x20(%edx,%ecx,4),%eax

>embedded code in java
Hello world uses more RAM than an arduino has, unless by embedded you mean bloat like windows "embedded" version running on GBs of RAM and multi core setups. C++ sucks too, but mostly for executable size. C is the only way for embedded.

The very first assemblers had to be done in machine code. You can turn assembly in to machine code by hand. Now days the assemblers are likely written in a high level language. Assemblers aren't really a problem that gains a lot from being solved in assembly language.

I unironically prefer the one on the bottom.

This guy gets it

>C is the only way for embedded.
I've heard Forth is nice for embedded development as well.

patience. a lot of it
god i miss my sparc, nothing was off limits back then

Natalie Mars.

Why.

It's fun.
Also macros, labels, comments, not sure if they did back then but indenting helps a bit.

>how the fuck did anyone ever program in assembly
The alternative was programming in binary.

assembly is still the best way to get the most performance out of a machine.

In fact most encryption programs have their cipher implementation in assembly.

C is more difficult actually.

Some dude on youtube into retro made a real time strategy game for the commodore64 in assembly, he wrote it in a couple of months.

If he did in C, he would take even less time.
Except it would not run on C64 at all.

Zsnes is written in X86 assembly. It used to be the best snes emulator.

Is it worth it to learn Assembly? I want to learn LISP, Assembly, and another language that I have yet to decide. Will this get me jobs or do I have to learn something like Python or Javascript? Serious question.

>Is it worth it to learn Assembly?
Really only if the goal is to satisfy your curiosity. It is really limited what you can use it for.

yeah if you want to hack old microcontrollers

If you studdy electrical engineering/elctronics in university there's probably some point when you'll learn a bit of assembly, to be able to program chips without any interface but I/O.

that's about that nowadays.

Honestly, not really. They're good languages for improving yourself as a programmer but you're probably not going to get a job using them. There are still cool things you can do with assembly. You could also learn Clojure or another modern modern version of Lisp, or Haskell if you just want to do functional programming.

see
fucking mongs, just because shitty programmers exist doesn't mean we need to redo everything in assembly

Assembler is for things that runs millions of times per second.
Using it for shit that only gets run 60 times per second or so will only make the code harder to maintain.

Assembly is necessary for writing the lowest levels of an operating system. You can't fire an interrupt, manipulate registers or switch between process contexts without assembly. You also need assembly at some point to interface with peripherals, whether you do it by hand or by way of a high level toolkit provided by the OS a la IOKit.

I'd also argue that basic knowledge of assembly can make you a better programmer. Doesn't mean you have to use it, but you should at least know what it is, how it works and when it's useful.

Nothing wrong with assembler, coding back in the olden days with full access to the hardware with no OS getting in the way was great.

68000 > x86 real mode

imo it's not that hard once you start. if you're a newb, try 6502 assembly, it's easier than x86

Name of game? Or link

Every program is a machine when you really think about it, even if your environment tries to hide it from you.

t. electrical engineer that loves programming

Oldfag here, wrote hundred thousand line programs in assembly back in the day. The answer is that you do it the same way you do nowadays, you sit and type and think about what your program needs to do at that point and you sit and type some more. Its still a programming language. You learn the language, and start programming little diddly shit in it, then bigger stuff, and and some point you realise that you think and the code just comes out. Yeah its verbose but so is java and that never seemed to stop people. You develop a nice library of functions and macros after awhile which helps. Also its not like you have to bum every clock cycle out of your code, you only do thst if its important, code bumming hurts maintainability in assembler just like it does in C or haskell or whatever your language of choice happens to be, most code is written simply and clearly, some code is tricksey as fuck.
One advantage of assembly is its really very simple, you dont have to worry about what the optimiser is doing or which overload is being called, what you see is mostly what you get (optimising assemblers and linkers mess up this mental model a bit), and some projects use a shitton of macros which can get a bit much, but thats true in any language with heavy duty macros.

>Assemblers
You're a mean fucker arent you.

My uni requires you to program shit in ARM assembly

It's still very necessary for reverse engineering. I learned MIPS assembly at uni and x86_64 on my own. Its fun but x86 is just too convoluted.

>Assembly today poses no real value
"Although C language (*not* C--/Java) may be sufficient for most applications, learning assembly language is a must to understand the inner working principles of the microcontroller."
Quote straight out of a book on microcontrollers published this year. Fuck off you stupid web developer.

How should one implement the airtight hatchway between userland/kernelland syscalls where you have to save the stack and registers for the context switch, Terry?

How do you want to get the most efficiency when implementing the inner loop of x264, Fiora?

How do you want to use the AES-NI instructions in the inner loop of your message encryption algo?

>But that is due to poor programming skills in general.
A performance boost from filtering out shitty programmers is still a performance boost.

>C--
What did they mean by this

>Assembly today poses no real value other than dicking around
Fucking webdev. Assembly is still needed in kernels and maybe program entry points (I mean _start, not main).
How do you propose I implement my context switching in C or C++, huh?

C++ is garbage, but the parenthetical comment was mine, so I'm sorry for doing a shitty job quoting.

>My uni requires you to program shit in ARM assembly
So?
Mine used Motorola 68000 and x86

Very slowly

It isn't now?

Nope.
Higan is almost perfectly accurate and snes9x is just as accurate and fast and with the added bonus of being more portable (since it's not written in x86 assembly).
Zsnes is deprecated.

Depends on the system.
If the system only use memory mapped devices, you can pretty much just use pointers to the devices and bob's your uncle, but it's not the case with the PC obviously.

And on your argument of basic knowledge of asm is correct, but there's more to it, because if you know what the CPU can actually do, you can shape your high level code to closely match what the asm can do optimally.

ARM assembly is a cakewalk.
Fuckton of registers, very clear and concise opcodes, no paged memory bullshit and you're generally swimming in a large pool of ram.

snes9x is actually quite more accurate than zsnes, but it's not as fast.
But that only matters if you're using a pentium/pentium II CPU.

Slowly and methodically.
Yeah, a short comment on nearly every line is a common ASM style.

if assembly doesn't interest you then you shouldn't be doing cs

>the absolute state of Sup Forums

but senpais its easy.
Fuck, i haven't eaven learned it yet and it makes sense

How to add 2 numbers:
add r3, r1, r2

It makes so much fucking sense, looking at it alone is like reading normal english.
If you mean designing software from this? Get on my level brainlet i made a fucking IDE with this shit.

>How to add 2 numbers
>Use 3 numbers out of order

t. pajeet doesn't understand computer architecture

I haven't used Assembly since my days at the university and programing that disgusting shit made me have a whole other degree of respect for the coders of yonder and people who code stuff directly for micro-controllers.

>Brainlet
>Website not even HTTPS secure
Ok.

Literally the same way as C, with slightly different function declaration and calling syntax.

add r3, r1, r2
add r5, r4, r3