[ prog / sol / mona ]

prog


Is it weird to learn asm as your first programming language?

1 2018-11-05 20:28

I'm always told to forget about it and learn python instead. But why?

2 2018-11-05 21:03

just do c and then assembly

3 2018-11-05 21:03

starting with assembly seems a bad idea

4 2018-11-05 22:29

>>1
how many times have you tried to start learning programming?

5 2018-11-06 07:51

>>1
Then learn ARM assembly:
https://azeria-labs.com/writing-arm-assembly-part-1/

6 2018-11-06 08:57 *

if you're motivated to learn then do so.

7 2018-11-07 00:17

Start with FORTH instead - Best of both/all worlds.

8 2018-11-07 01:10

>>7
The guy seems a bit masochistic but maybe not *that* masochistic.

9 2018-11-07 03:42

>>7
why forth?

10 2018-11-07 22:03

Read A Hacker's Delight

11 2018-11-08 03:50

>>10
not OP, but looks fun, thanks!

12 2018-11-12 04:25

>>9
muh stack
I think it's as beautiful as lisp, though for very different reasons.
And if OP is interested in really low level stuff, it can in some ways just be thought of as a glorified assembly - You'll think about problems or datastructures in a similar way, but it's much friendlier and then easily extensible, so when you want to go further/deeper/higher you can.

13 2018-11-12 10:07

>>12
i started learning forth (using gforth), and I kind of like it so far
i can't wait until i can work with memory, arrays, and files

14 2018-11-13 07:48

>>13
Build your own Forth computer with 7400 ICs.
http://www.aholme.co.uk/Mk1/Architecture.htm

15 2018-11-13 09:04 *

>>14
https://www.homebrewcpuring.org//ringhome.html
[Is there a sageru or soko field?]

16 2018-11-13 09:08

>>15
I think VIP is sage. I don't know what is soko.

17 2018-11-13 16:12

>>16 Then what does VIP even mean?

sage: Prevents the thread from being bumped to the top of the thread index.
noko: Return back to the thread instead of the thread index.
soko: Takes the thread to the end Lowers the thread's position in the index by one.
shuffle: Shuffles the thread's position in the thread index.
dice: Rolls a dice/die. Format: dice:dicesd[sides[modifier]]. Example: dice:2d6+2
edit: Edits your post. Format: edit:post_number OR threadID. Example: edit:6

18 2018-11-13 16:25 *

>>17
That's tinychan only, which is a recent implementation.

There will never be any soko or dice or shuffle. If you want to be a VIP, just check the VIP box, it will also sage.

19 2018-11-13 16:34 *

I don't know what to tell you about VIP, I think there are some wikis documenting the history of 2ch and its western clones. It's kind of a private joke.

20 2018-11-13 19:27

>>18,19 I know the historical context, I mean for SchemeBBS, since sageru isn't.
Whatever.

21 2018-11-14 00:35 *

>>20
sage=VIP
If you check the box, the thread won't be bumped and you'll be distinguished with a star to show everybody your VIP status.

22 2018-11-19 01:09

>>14
This is amazing. It has everything but a parts lists.

23 2018-12-25 15:03

>>17
Only sage and noko are enabled on the default boards, though.

24 2018-12-26 00:25

test

25 2019-01-05 19:52 *

>>24
success

26 2020-02-29 12:11

If you really want to learn programming with assembly language, read Programming from the Ground Up.
http://download.savannah.gnu.org/releases/pgubook/ProgrammingGroundUp-0-8.pdf

27 2021-06-01 08:53

Starting from asm is best option, don't listen to the others here, they have no idea what they're talking about. ASM gave me insight. SHitlangs didn't

28 2021-06-01 14:01 *

I've always wondered, is "sage" pronounced saw-gay or sage (as you would normally pronounce it)?

29 2021-06-01 23:26 *

>>28

It depends on how thick your neckbeard is.

30 2021-06-02 05:30

Learning assembly first is unusual, but it'll force you to have very good attention to detail, because the smallest mistakes will often result in a crash. It's nice to learn how to write your subroutines so that they can be called from C too. The pointer arithmetic that gives beginner C programmers trouble will in some ways be more straightforward when viewed from an assembly perspective.

31 2021-06-02 07:46

>>30 agreed

32 2021-06-03 10:25

>>30
meh, you can write some crap asm and still have software that works well ignoring edge cases. Look at older PC software from the 80s.

33 2021-06-09 14:16

The whole "assembly language is hard/bad for beginners/obsolete/<some other trendy buzzword with negative connotations>" is nothing more than a meme. There are only two actual problems with this approach. First: the program has to be re-implemented for any other architecture - a bit overblown case, since as long as the programmer has the reference material, which he/she already understands (block diagrams, the algorithms in mathematical form, documentation), he/she does not really starts from scratch. The already written code, while not directly portable, still has a value in hinting the steps, flow and structure. The second problem that we are facing currently is that the most common microprocessor architecture is 8086-derived.

The original Intel 8086 is already fucked up, and if one adds everything introduced over the last 43 years, much of which being just bloat that addressed immediate market needs and trends, the result is an extremely convoluted programming model. Too bad that much more well-thought architectures like MIPS, Motorola's 680?? line or SPARC did not manage to achieve comparably wide adoption - so was the power of IBM. The Motorola 6809 is another piece of beauty, unfortunately crippled by the 64 kB address space. So far I did not find time to check ARM.

Back to the original subject, learning assembly language simultaneously teaches one about the way the microprocessor works. It offers the programmer much bigger flexibility when it comes to structuring the program. I do not know what software platform the OP uses; what however may be off-putting for many beginners is the fact that a lot of the tutorials available target DOS (not a bad thing by itself, but it is no longer a popular platform) and, what is much worse, 16 b real mode. So below three URLs that target something more contemporary:

https://stackoverflow.com/questions/1023593/how-to-write-hello-world-in-assembler-under-windows/1032422

http://bogdro.byethost18.com/index-en.php

http://web.archive.org/web/20180930075429/https://www.oocities.org/gotcomputer/

34 2021-06-14 16:47

I wholeheartedly agree with >>33. I understand the reasons "they" tell you to learn something else instead. They are manifold. But to completely discourage writing assembly code altogether is bad advice. If you learn to write assembly only for practice and fun, then that's a worthy and fruitful pursuit. If all you ever care about is making money and have zero regards for programming as an intellectual activity in it's own right, well, that is reflected in the kind of thinking quoted above: "assembly language is hard/bad for beginners/obsolete/<some other trendy buzzword with negative connotations>".
I started with a bit of assembly, and I am considering going back to it. I am sick of the whole ecosystem of unix, libraries, high-level languahes and their limitations, etc. Ironically, they all take away from the actual programming, distract me into considering things that are irrelevant to programming itself, whereas the more austere environment of assembly has little clutter and it's largely manageable.
Of course that means I won't be doing any SRS WERK in it, but I never did anyway.
I suggest using an emulator for some nice architecture, to avoid x86. But it may serve you well to understand some x86 as it'll likely bear fruit in your career.

35 2021-06-15 06:46 *

>>33
It's not a meme, it is an admission that your average student has the attention span of a goldfish. Assembly programming is hard work for meagre results. Meanwhile you can throw together some GUI program to trace IP addresses using Visual Basic in ten minutes. Guess which one will appeal more to the beginner? If you think you are bad enough for starting with assembly, go for it, but most students would rather make the next Facebook as an electron "app" or some shit like that.

36 2021-06-15 13:17

>>35
Maybe we should have programming be a bit more demanding so we don't have "students make the next Facebook as an electron "app" or some shit like that".

37 2021-06-16 06:47

I don't think learning to write assembly well is a particularly useful skill for most programmer but being able to read it has been invaluable for me over the last 20 years. I started out programming C++ but simultaneously started learning assembly (x86 32 bit), I never wrote much more than the odd block of inline __asm{}, but being able to crack open a debugger or disassembly and follow along is incredibly freeing. The other big benefit of learning some assembly is to better understand ISA concepts and conventions that provide insight and rationale for high level code and practices.

38


VIP:

do not edit these