2017

>2017
>not using assembly

Why you do this and use your bloatware tier languages?

Other urls found in this thread:

agner.org/optimize/instruction_tables.pdf
twitter.com/NSFWRedditImage

because I have more than 256MB of memory

>implying your shit asm is less bloated than what gcc produces

wanting to write something quick in c#?
>10 mins

wanting to write something quick in assembly?
>pfffthahaha

It's nice having your code run on other platforms.

fib:
mov edx, [esp+8]
cmp edx, 0
ja @f
mov eax, 0
ret

@@:
cmp edx, 2
ja @f
mov eax, 1
ret

@@:
push ebx
mov ebx, 1
mov ecx, 1

@@:
lea eax, [ebx+ecx]
cmp edx, 3
jbe @f
mov ebx, ecx
mov ecx, eax
dec edx
jmp @b

@@:
pop ebx
ret

pretty useful user

okay, you are obviously knowledgeable, do you have good resources on learning this shit?

What the fuck is going on here?

This language is fucking horrible, you need to be serious autist to code with this.

I've completed most of Human Resource Machine, am I an assembly programmer yet?

Seriously, from where should i learn assembly?

seriously you shouldn't

I use machine codes bro, step up

I heard that you can write pretty nice driver viruses and other interesting things with it. that's why I'm so curious...

>intel-style
lmao off urself
he's not
there aren't a ton of x86 resources, but you can try "programming from the ground up", it isn't perfect but it's alright
found the rust/java shitposters

...

C=DAT1 A
D1+5
A=DAT1 A
DAR1=C A
D1-5
DAT1=A A
A=DAT0 A
D0+5
PC=(A)

thats pretty shitty asm, ur wasting like 80% of CPU cycles because u arent aware of instruction execution granularity.

please memorize all this agner.org/optimize/instruction_tables.pdf , otherwise go back to writing high level trash shit :)

>implying

>Motorola 6800
>Not using MOS 6502

If you're going to post about assembly being superior, post a superior processor.

...

This is a shitpost.

>Not using a RISC processor

If you're going to fuck with assembly, you might as well do it right.

I once installed tis100 and tried to play. Minute after that i realized i don't have a job and don't know programming and deleted the game, fuck that shit, i better learn something in real life

wow, very quick... HOWEVER
fib = 0 : 1 : zipWith (+) fib (tail fib)

It's fun as a hobby. Years ago, I made a side-scrolling SHUMP game with multiple enemies, weapons, bosses, and stages for the TI-83 years ago. For serious work, however, I would rather not use assembly.

So I can be done programming with enough time left over to reply to your inane thread.

good game...

> Not manually sending electric current to your processor
Fucking plebeians. I thought Sup Forums was supposed to be good at computers

>assembly
Stop hacking others' program, Jamal.

>Years ago, I made a side-scrolling SHUMP game with multiple enemies, weapons, bosses, and stages for the TI-83 years ago.
Sounds interesting, do you still have it?

I did Motorola assembly in a uni course and had a blast with it. I'd love to work with it professionally but I'm sure the demand for that is somewhere around fuck all

:
xor %ebp,%ebp
mov %rdx,%r9
pop %rsi
mov %rsp,%rdx
and $0xfffffffffffffff0,%rsp
push %rax
push %rsp
mov $0x400b40,%r8
mov $0x400ad0,%rcx
mov $0x4008a6,%rdi
callq 400740
nopw 0x0(%rax,%rax,1)

but I do
BITS 64
CPU X64

org 0x00010000

Elf64_Ehdr:
db 0x7F, "ELF" ; e_ident[EI_MAG0 -> EI_MAG3]
_start:
add bl, 0x01
mov ecx, msg1
mov al, 4
jmp _mid1

dw 0x0002 ; e_type (executable)
dw 0x003E ; e_machine (x86_64)
_mid2:
mov al, 4 ; e_version ;modif, 4b
jmp _mid3

dq _start ; e_entry
dq Elf64_Phdr - $$ ; e_phoff
db 0x99 ;0x04
_mid1:
mov dl, len1
int 0x80
add cl, msg2 - msg1
mov dl, len2
jmp _mid2
dw Elf64_Ehdrsz ; e_ehsize
dw Elf64_Phdrsz ; e_phentsize
Elf64_Phdr:
dd 0x01 ; e_phnum, p_type
_mid3:
int 0x80 ; e_shentsize, p_flags ;; modifyable 4b
jmp _ex
dq 0x00 ; e_shnum, p_offset
dq $$ ; e_shstrndx, p_vaddr


Elf64_Ehdrsz equ $ - Elf64_Ehdr

msg1 equ $
db "Hello, W"
len1 equ $ - msg1
dq filesz ; p_filesz
dq filesz ; p_memsz
msg2 equ $
db "orld!", 0xA
len2 equ $ - msg2
_ex:
mov al, 1

Elf64_Phdrsz equ $ - Elf64_Phdr
int 0x80

filesz equ $ - $$

I used to be in freshman CS too

Literally mashing the keyboard will produce less bloated code than what gcc produces.

>write basic program in c for uc
>check what is being written in asm by compiler
>about 12 instructions to add two registers
>dozens of redundant instructions like moving things around registers needlessly, using idiotic combinations of AND, XOR etc to achieve fucking bit rotation and so on
>program exhibits weird bugs on specific actions
>notice the asm obliterates the stack when it doesn't even need more than 3 levels
>give up
>write in asm
>same code takes up a fraction of the space
>instead of some ridiculous 45 instructions for a fucking loop there are now 10-11

God damn it was just some pwm function for different LEDs.

>you think writing assembly on a modern CPU is what is actually executed
>tfw microcode

>C
>pwm function for different LEDs
>wew a nail gun is really bad for crocheting you guyse!
Congratulations, faggot. Now go build me a skyscraper with your number 4 needle.

>>check what is being written in asm by compiler
Which compiler do you use?

you are right
that program there - it will run on without any ammendmen on

linux (any linux)
windows
ios
android
it runs in every browser
it runs on all IOT platforms

assembly language is the future

It was a requirement for a class question. We're made to use c since it's the least bloated or lowest level language we can use across different scenarios.

If you didn't know asm what would you use? I used it everywhere I could but a lot of people didn't.

>inappropriate to use c for pwm
It worked until you tried too many options for different LEDs. I did my calculations, it was perfectly fine you know, although stupidly inefficient when you looked at the asm generated. The stack fuck ups ruined it really, which ironically had nothing to do with the speed.

mplab, the xc8 for using C, it was for a PIC uc.

because programmer time costs more than machine time

>not modding your cpu so you can inject microcode for direct execution
Enjoy your bloat pajeet

Learning assembly other than for fun or a super specific job is beyond retarded. Literally nothing, NOTHING, of value today can be done with assembly. People made C, because assembly was a big fuck you to all their faces. Then a bunch of people made other C based languages, because for what modern users wanted, even C became a huge fuck you to their faces.

Make me a calculator Android app in assembly please.

Make me a personal website in assembly please.

Each of these things are beyond easy with modern tools, yet you flaunt assembly as a superior system.

>Make me a calculator Android app in assembly please.
cuck