How to realize multiplication in loop on the basis of assembly
This article is about the compilation of the basis of loop how to achieve multiplication, the editor thinks it is very practical, so share it with you to learn, I hope you can get something after reading this article, say no more, follow the editor to have a look.
IDE: Masm for Windows Integrated Experimental Environment 2015
OS: Windows 10 x64
Typesetting: Markdown
Codedatas segment; data segment code datas endsstacks segment; stack segment code stacks endscodes segment assume cs:codes,ds:datas,ss:stacksstart: mov ax,datas mov ds,ax; code snippet code mov ax,200 mov bx,0; accumulator initialization mov cx,100; number of cycles; 200100 = 20,000; 20000-> 4E20H s: add bx,ax loop s mov ah,4ch int 21hcodes ends end startdebug
The above is how to achieve multiplication in loop on the basis of compilation. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.