Jump to content
  • Advertisement
Sign in to follow this  

assembly div/mul confusion

This topic is 3057 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

heey all, this week I started coding is assembly again (not anything intresting tough) but i'm having trubble understanding the 'div' and 'mul' instructions. I understand 'add' and 'sub' add ax, bx ; add bx to ax I understand that this: mov ax, 10 ; move 10 into ax mov bx, 2 ; mov 2 into bx mul bx ; multiply ax with bx ofcource the result is 20 but where is the result stored? And a second question: Does it make a difference if it are 8-bit values instead of 16-bit values? I mean where the result is stored? mov al, 10 ; move 10 into al mov bl, 2 ; mov 2 into bl mul bl ; multiply al with bl thanks in advance, assainator

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!