There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

SpaceNoodle ,

Mebly I do, and mebly I don’t.

sag OP ,

I have Dyslexia ¯_(ツ)_/¯ Sorry.

lord_ryvan ,

You dropped this \

Short explanation: Type ¯\_(ツ)_/¯ to see ¯_(ツ)_/¯.

Long expanation: Lemmy supports formatting, like italic becomes italic. To stop this from happening, you can put a \ before it like _; the \ isn’t shown. This is why ¯_(ツ)/¯ becomes ¯(ツ)/¯. To show a \ you need an additional \ like so: \, and to make sure _ is shown and not turned into italic, it too needs . This is why ¯\_(ツ)_/¯ becomes ¯_(ツ)

ulterno ,
@ulterno@lemmy.kde.social avatar

Alternatively, you can just use the `` enclosure, used for single line code.
That is a “grave accent” or a “backtick”, the key you will find on the left of the ‘1’ key and under the ‘Esc’ key on a standard (ISO, maybe) 104/105 key qwerty keyboard.

¯_(ツ)_/¯

AnUnusualRelic ,
@AnUnusualRelic@lemmy.world avatar

The backslash is known as an escape character in this context, because it removes (escapes) the special meaning of the following character.

It’s also used that way in most Unix shells.

jaybone ,

Assembly used to be a required course for CS undergrads in the 90s. Is that no longer the case?

Also we had to take something called Computer Architecture, which was like an EE class designing circuits with gates and shit.

CanadaPlus ,

Which target did you use? Having to learn even a fraction of modern x86 would be ridiculous, but SPARC or something could be good to know, just to reduce the “magic box” effect.

jaybone ,

This was a long time ago. I’m pretty sure it was 8086.

LodeMike ,

Its still a thing

davel ,
@davel@lemmy.ml avatar

Assembly code is for writing C compilers, and C compilers are for writing Lisp interpreters.

henfredemars ,

I saw a Scheme interpreter written in assembly running a C compiler written in Scheme.

davel ,
@davel@lemmy.ml avatar
wewbull ,

Only the most very basic compilers. C compilers are in C mainly.

davel ,
@davel@lemmy.ml avatar

Not the first C compiler obviously. According to this Stack Overflow post, BCPL* begat B, which begat C. Language self-hosting is pretty fascinating.

*Perhaps BCPL was originally written in assembly; I’m not certain: github.com/SergeGris/BCPL-compiler

ulterno ,
@ulterno@lemmy.kde.social avatar

Talking about bootstrap here?

RestrictedAccount ,

Back in High School in the 80’s me and a buddy wrote a Z-80 editor assembler in TRS-DOS BASIC.

It was not rocket science.

davel ,
@davel@lemmy.ml avatar

I never did get very far with the TRS-80 Editor Assembler, but that was my first exposure to such things.

I also remember the BASIC code for the Dancing Daemon which was replete with PEEKs and POKEs, such that much of it was written in machine code.

nobleshift ,
@nobleshift@lemmy.world avatar
nobleshift ,
@nobleshift@lemmy.world avatar

NASM FTW

skullgiver ,
@skullgiver@popplesburger.hilciferous.nl avatar

Assembly isn’t that hard. It’s the same imperative programming, but more verbose, more work, and more random names and patterns to remember. If you can understand “x += 3 is the same as x = x + 3”, you can understand how the add instruction works.

I wouldn’t be able to write Rollercoaster Tycoon in assembly because keeping track of all that code in assembly files must be hell, but people pretending like you need to be some kind of wizard to write assembly code are exaggerating.

These days, you won’t be able to beat the compiler even if you wrote your code in assembly, maybe with the exception of bespoke SIMD algorithms. Writing assembly is something only kernel developers and microcontroller developers may need to do in their day to day life.

Reading assembly is still a valuable skill, though, especially if you come anywhere near native code. What you think you wrote and what the CPU is actually trying to do may not be the same, and a small bit of manual debugging work can help you get started resolving crashes that make no sense whatsoever. No need to remember thousands of instructions either, 99% of assembly code is just variations of copying memory, checking equality and jumping anyway. Look up the weird assembly instructions your disassembler spits out, they’re documented very well.

leisesprecher ,

Assembly is hard, because you need to understand your problem on multiple levels and get absolute zero guidance by compilers.

Even C guides you a tiny bit and takes away some of the low level details, so you have more mental capacity to actually solve your problem.

Oh, and you have a standard library. Assembly seems to involve solving everything yourself. No simple function call to truncate a string or turn a char array to uppercase.

gens ,

Missing “;” on line 148.

CanadaPlus ,

I wouldn’t be able to write Rollercoaster Tycoon in assembly because keeping track of all that code in assembly files must be hell, but people pretending like you need to be some kind of wizard to write assembly code are exaggerating.

Well, they’ve got a point for the bigger machine codes. Just the barebones specification for x86 is a doorstopper IIRC.

From what I’ve heard, writing big stuff in assembly comes down to play-acting the compiler yourself on paper, essentially.

NauticalNoodle ,

I’ve been studying Arm Aarch32 lately. I have a software development academic background but I have always been interested in Architecture.

darklamer ,
@darklamer@lemmy.dbzer0.com avatar

It’s now been 18 years since the last time an employer paid me to write assembly, but it’s only been a year or so since the last time I had to read assembly at work (in order to verify what the compiler really was doing).

AFKBRBChocolate ,

I had an assembly class in college. I didn’t love of at all. Got my first job after graduating and it was writing space shuttle engine control software, which was in assembly. I was kind of surprised at how fast it became natural after dealing with it full time. Still, it felt luxurious when we upgraded the controller and could do the software in C.

leisesprecher ,

“oh no, I had to do literal rocket science”

JoMiran ,
@JoMiran@lemmy.ml avatar

In college back in 1991. Also had to do PASCAL and FORTRAN but thankfully those two were in a single course.

expatriado ,

I also took PASCAL in the 90s, but it is considered a high level language, and writes similarly to other high lvl languages, assembly has a very different syntax

JoMiran ,
@JoMiran@lemmy.ml avatar

Oh, I know. I meant that we had to take courses on older languages as part of the curriculum. That was a funky little college program. The oddest experience for me was taking Python back in the day as the “new thing” then not seeing it again until it absolutely exploded ~10 years ago. That program is also why I ended up playing with Linux so early on. The professors truly seemed to have a passion for emerging technologies while not wanting anyone to forget what came before. Thankfully, no punch cards.

thejml ,

We used turbo pascal in school in the early 90’s. And it had assembly blocks… which I used copious amounts of because it was the only way to make the IBM PS/1’s do useful graphics.

JoYo ,
@JoYo@lemmy.ml avatar

I get the feeling that all of these assembly jokes are justifications to avoid learning assembly.

You can still make syscalls in assembly. Assembly isnt magic. It isn’t starting from the creation of matter and energy, it’s just very specific code.

NocturnalMorning ,

It’s just a joke friend.

MadhuGururajan ,

A very bad one if it requires switching off a large portion of your brain to find it funny.

Arsecroft ,
@Arsecroft@lemmy.sdf.org avatar
JoYo ,
@JoYo@lemmy.ml avatar

I said so in my comment, try to keep up.

TunaCowboy ,

Syscalls are sitting right there, and you can always just link libc…

r00ty Admin ,
r00ty avatar

I used to write z80 asm without an assembler back when I was a LOT younger. The ZX spectrum manual I had, had the full instruction list with the byte values.

I think it was oddly easier than some higher level languages for some tasks.

But, making changes was an utter nightmare.

leo85811nardo ,

From my understanding, one of the actual use case of assembly is for cyber security engineers to dump assembly instructions from a compiled program, so they can check for any potential vulnerability. I’ve also seen assembly included in an embedded codebase (the overall project is in C), which I assume is for more optimized performance and deterministic behavior

Cysioland ,
@Cysioland@lemmygrad.ml avatar

Assembly was easier to me than C/C++.

NocturnalMorning ,

I learned assembly for a few weeks when I first started a new job once (didn’t even have anything to do with my job), and I always felt like my brain was tired after trying to write in assembly. Just took so much more mental concentration than writing in c for example.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines