# Assembly Language (Mult.asm)

3 messages
Open this post in threaded view
|
Report Content as Inappropriate

## Assembly Language (Mult.asm)

 Hi, I'm working on Mult.asm, but I'm still having trouble implementing and understanding the machine language, especially on what to do in multiplication. I read the chapter, and the power point, and my instructor also added new instructions such as "left bit shift" (<) to the mult.asm file. I was wondering if there is a reference out there with more explanation provided? I have an exam soon too, and my instructor will include more of implementation of it, and I really wanna get this. I understand D, M, A for instance: //D=Memory[10]-5 @10 D=M @5 D=D-A ...but how do I use this to add, multiply, divide, etc.  Thank you!
Open this post in threaded view
|
Report Content as Inappropriate

## Re: Assembly Language (Mult.asm)

 Administrator I've written an introduction to Hack Assembly language programming you mignt find useful:     http://www.marksmath.com/tecs/hack-asm/hack-asm.htmlThe Mult.asm program is intended to have you learn the basics of accessing data and conditional looping in Hack assembly.  It is not intended that you write a sophisticated multiply algorithm. You can simple compute x=a*b by adding a together b times.     x = 0     while a > 0         x = x+b         a = a-1 You will not need to write division in assembly language for the n2t course. I do not understand "added left shift to the mult.asm file." The only commands the n2t tools understand are the documented A-commands and C-commands. --Mark