3 ms·
> Multiplications/divisions need to be hand-rolled. In the context of someone's first contact with assembly language, that's a good thing! Translating various
by apricot 2y ago
> Multiplications/divisions need to be hand-rolled.
In the context of someone's first contact with assembly language, that's a good thing! Translating various multiplication and division algorithms to assembly is a great way to learn it.
- kccqzy 2y agoI learned to implement my own multiplication and division as part of learning bignum with a high level language (in my case Pascal). By the time I learned assembly language I simply focused on how to translate high level language to assembler; basically be a manual compiler and compare my output against a real compiler. It seems unnecessary to learn any algorithm including the multiplication algorithm in assembly language.
- apricot 2y agoImplementing shift-and-add multiplication and division algorithms in assembly, and analyzing them, is a very formative exercise in my experience. Besides, if assembly language is good enough for Knuth to express all the algorithms in TAOCP, it's good enough for me...