3 ms·
Why would it stress you out? If the university is any good at teaching, it will pace the course in a way that at least ⅔ of the students will be able to follow
by Someone 5y ago
Why would it stress you out?
If the university is any good at teaching, it will pace the course in a way that at least ⅔ of the students will be able to follow the course. If you have time _this_ semester to read a book about _next_ semester’s stuff, you aren’t struggling to keep up, so I would expect you to be in that group.
Also, assembler breaks down stuff into smaller steps, but that doesn’t mean it’s hard. It ‘just’ makes it more work to write large programs.
If you have done some C programming, assembler is a bit like having a program where you declare a fixed number of integers (say A, B, and C) and a fixed set of double's (say D and E), a huge array of bytes called MEMORY, functions for reading bytes and integers from, and writing them to it, and then limit your program to.
- simple expressions (e.g. A=B+C is fine, A=B+C+D isn’t. You would have to do A=B+C; A=A+D; instead). The exact set of allowed things varies by CPU. Some allow you to do “A=B + MEMORY[C], some don’t, etc)
- not using while, for
- if is only allowed as if A op 0 goto FOO; (where op is ==, !=, <, etc)
The exact set of int's and double's and the set of allowed expressions varies by processor. also, assembler syntax is different. you'd write something like (this is different per processor, and even between assemblers) "ADD A,B,C" for "A=B+C", for example.
You could start with a small C program and see whether you can change it to adhere to some of these restrictions.
Sample programs could be
- computing the GCD of what’s in A and B
- counting the number of times each byte value occurs in MEMORY between offsets 10,000 and 20,000.
- checking whether the memory region between offsets A and B contains a range of values equal to that given by offset C and number of bytes D.
The result won’t look like assembly, but I think it would give you the right mindset.
- openknot 5y ago>If the university is any good at teaching, it will pace the course in a way that at least ⅔ of the students will be able to follow the course. This is generally true, but sometimes universities assign lecturers who are poor at teaching (e.g. just reading from the slides, or alternatively not putting effort into making the material more understandable). In these circumstances, a more independent approach to learning the subject can be quite helpful (e.g. focusing more on the textbook, and designing a specific learning strategy that's independent of lecture quality).