Message from @DanielKO

Discord ID: 429469477319475211


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.

2018-03-31 02:42:39 UTC  

yeah but its mainstream, deployable, versatile, so it's a good starting point?

2018-03-31 02:42:44 UTC  

yee

2018-03-31 02:42:47 UTC  

By all means, learn some assembly, it'll do you some good. But you don't really write programs in assembly; at least not if you want to finish coding it any time soon.

2018-03-31 02:43:04 UTC  

Mainstream? Go for x86-64.

2018-03-31 02:43:50 UTC  

You should know what compiled code looks like, specially if you want to have any hope of debugging code properly.

2018-03-31 02:44:11 UTC  

Say, what a function call looks like.

2018-03-31 02:44:29 UTC  

What an array access looks like.

2018-03-31 02:44:36 UTC  

What a C string operation looks like.

2018-03-31 02:44:49 UTC  

What an `if` or a `for` look like.

2018-03-31 02:46:16 UTC  

But you don't really write any significant code in assembly. We have compilers for that; at which point the architecture is irrelevant - as long as the language is supported by the hardware vendor.

2018-03-31 02:47:23 UTC  

well i thought ARM asm was big for embedded systems

2018-03-31 02:48:17 UTC  

Dude, even NES games were made with compilers (or pseudo-compilers) back then.

2018-03-31 02:48:34 UTC  

Embedded devices these days have plenty of RAM and CPU.

2018-03-31 02:49:13 UTC  

When you program something for a raspberry pi, you do it in a high level language.

2018-03-31 02:49:49 UTC  

well what do arm asm dudes get paid for?

2018-03-31 02:50:45 UTC  

Usually people just run Linux on a raspberry pi, and thus they can use any language that runs on Linux + ARM.

2018-03-31 02:51:34 UTC  

also, as far as my reasearch i was under the impression that all or most 8/16bit console games were coded in assembly. But as I'm learning I see it's all about sweettalking the Assembler with macros to let you write human-readable code

2018-03-31 02:52:56 UTC  

What would often happen is, some essential routines would be written in ASM, and they would be glued with an "almost high-level language."