[ home ] [ q / soy / qa / r / nate ] [ a / health / incel / int / mtv / pol / psy / raid / sci ] [ overboard ] [ rules ] [ bans ] [ wiki ] [ booru ] [ archive ] [ merch ] [ donate ]

/sci/ - Soyence and Technology

Name
Options
Comment
File
Embed
Password (For file deletion.)

File: 1689200036080.png (20.96 KB, 320x470, ClipboardImage.png)ImgOps

 8110

i ❤ crushing leetcode problems in assembly
i ❤ crushing leetcode problems in assembly
i ❤ crushing leetcode problems in assembly

 8111

>asembles to 44 bytes of actual code
beat that rust trannies haha

 8123

>mov al, byte [arr + ebx]
>inc ebx
You should be using `lodsb`
>cmp ebx, 4
>jl .loop
if you care about size you should be using `loop` and if you care about speed you should be using a dec jnz downcounter.
>mov esp, ebp
>leave
remove mov esp, ebp because leave already does this:
if(StackAddressSize == 32) ESP = EBP;
else SP = BP; //StackAddressSize = 16

if(OperandSize == 32) EBP = Pop();
else BP = Pop(); //OperandSize == 16

In fact, because you don't ever use the stack you should be able to remove all the stack boilerplate.

 8124

>You should be using `lodsb`
but that seems to wanting to read from the stack?
>https://www.felixcloutier.com/x86/lods:lodsb:lodsw:lodsd:lodsq

>using `loop`

i could never get that to work

and the stack boilerplate... the antivirus tripped when it tested that

 8129

>>8124
ah esi data pointer, but it spat out 13 instead of 9 and needs a separate counter anyway

 8130

i hate assemblyniggers, just use java

 8148

>>8130
i will kill you poojet

 8149

>>8148
java is Aryan.
assemblyniggers are stuck in the past, just like pajeets
on the other hand, javaGODS are using a futuristic language strictly designed by white men

 8150

>>8149
>java is Aryan.
yet most java programmers are shitskins
0 relevant isas have ever been produced in africa, india or any other nigger infested country
x86 was handcrafted by WHITES

 8210

File: 1689304698518.png (366.42 KB, 1363x2904, ClipboardImage.png)ImgOps

>>8130
>evendoe i do use java aswell
mostly for automation tools and scripts and minecraft stuff, hack client adons and the soycraft server plugin i maintain

 8211

>>8210
fucking horrendous

 8259

>>8210
If you're going to work that hard may as well use C++.



[Return][Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ home ] [ q / soy / qa / r / nate ] [ a / health / incel / int / mtv / pol / psy / raid / sci ] [ overboard ] [ rules ] [ bans ] [ wiki ] [ booru ] [ archive ] [ merch ] [ donate ]