Message from @M4Gunner

Discord ID: 429467526540427266


2018-03-30 20:41:33 UTC  

Share it

2018-03-30 20:42:03 UTC  

Also, chrome? Really?
Might as well just use JS

2018-03-30 21:48:16 UTC  

What do you use? Safari?

2018-03-31 00:06:41 UTC  

One has to wonder, how much energy we're wasting worldwide because so many websites now offset computation and rendering to the client side.

2018-03-31 00:12:54 UTC  

@Durtle02 Use firefox

2018-03-31 01:43:59 UTC  

@Deleted User This is my life tonight.
```
.data

print: .asciz "%d\n\000"
scan: .asciz "%d\000"

.comm A, 32, 32
.comm B, 32, 32

.text
addr_A: .word A
addr_B: .word B
addr_scan: .word scan
addr_print: .word print

.global main

main:

stmfd sp!, {r0-r1, lr}

ldr r0, addr_scan /* r0 <- &addr_scan */
ldr r1, addr_A /* r1 <- addr_A */
bl scanf /* calls scanf */

ldr r0, addr_scan /* r0 <- &addr_scan */
ldr r1, addr_B /* r1 <- addr_B */
bl scanf /* calls scanf */

ldr r0, addr_A /* r0 <- addr_A */
ldr r0, [r0] /* r0 <- *r0 */

ldr r1, addr_B /* r1 <- addr_B */
ldr r1, [r1] /* r1 <- *r1 */

cmp r0, r1 /* compare r0 and r1 */
movgt r1, r0 /* move greater to r1 */
ldr r0, addr_print /* */
bl printf /* calls printf */

ldmfd sp!, {r0-r1, pc}

```

2018-03-31 01:45:29 UTC  

@meratrix nigger is that assembly code

2018-03-31 01:45:37 UTC  

arm assembly my dude

2018-03-31 01:45:41 UTC  

why the fuck are you showing me that cancer

2018-03-31 01:45:48 UTC  

cause it's my cancer

2018-03-31 01:46:39 UTC  

two can play it that way nigger

2018-03-31 01:49:19 UTC  
2018-03-31 02:25:47 UTC  

``bl printf /* calls printf */`` comments could use more redundancy

2018-03-31 02:27:54 UTC  

I guess it's useful for people not familiar with the mnemonics.

2018-03-31 02:28:13 UTC  

But then, `cmp r0, r1 /* compare r0 and r1 */` ? That's just retarded.

2018-03-31 02:28:23 UTC  

Gotta comment every line otherwise TA's give me shit

2018-03-31 02:29:33 UTC  

they should be more worried the students know what their code means

2018-03-31 02:30:01 UTC  

Back when I did assembly homework, I had to normalize a single-precision floating point number on a toy computer, that had only 256 bytes of RAM. And we had to write our own assembler.

2018-03-31 02:30:19 UTC  

i'm learning 68k but im gonna learn ARM after that

2018-03-31 02:30:26 UTC  

And whoever used the least instructions got bragging rights.

2018-03-31 02:30:37 UTC  

which computer

2018-03-31 02:31:32 UTC  

Oh, one that my professors used, I think it was created by a student a few years prior. Don't even remember the name.

2018-03-31 02:32:01 UTC  

It was your typical two operand instructions, 4-bit instructions.

2018-03-31 02:32:03 UTC  

interesting strategy. too obscure to cheat?

2018-03-31 02:32:34 UTC  

I guess so.

2018-03-31 02:32:48 UTC  

can i do your same assignment on 68k?

2018-03-31 02:33:17 UTC  

I don't see why not.

2018-03-31 02:33:29 UTC  

will it be easier then?

2018-03-31 02:33:41 UTC  

Probably.

2018-03-31 02:34:02 UTC  

I got bragging rights, by the way. Got my program to be even shorter than the professor's and the TAs' programs.

2018-03-31 02:34:19 UTC  

By using the instructions themselves as constants.

2018-03-31 02:34:48 UTC  

About 20% of the class couldn't make it fit in the 256 bytes.

2018-03-31 02:35:41 UTC  

what book did they give you for assembly

2018-03-31 02:35:45 UTC  

assembly is cancer

2018-03-31 02:35:58 UTC  

^you probly like java

2018-03-31 02:36:05 UTC  

^likes js

2018-03-31 02:36:13 UTC  

Another we had to do was long division. Actually, now that I'm thinking about it, the 4-bit instructions one was to program long division. The architecture didn't have division. The normalization one was on an 8-bit instructions architecture. Same 256 bytes limit for both.

2018-03-31 02:37:10 UTC  

well you've already said assembly is cancer twice. yet your computer needs it to run, js or no?

2018-03-31 02:38:22 UTC  

We didn't get any book, the course was on computer architectures. We went through the design of various didactic architectures, then at the end some MIPS and IA-32.

2018-03-31 02:41:50 UTC  

if i wanna play with ARM i should buy an rPi??

2018-03-31 02:42:02 UTC  

There are plenty of ARM devices.