⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 http:^^cs.nyu.edu^cs^dept_info^course_home_pages^fall96^v22.0201.002^shiftadd.html

📁 This data set contains WWW-pages collected from computer science departments of various universities
💻 HTML
字号:
Date: Tue, 14 Jan 1997 22:48:32 GMTServer: NCSA/1.4.1Content-type: text/htmlLast-modified: Mon, 21 Oct 1996 00:18:13 GMTContent-length: 915<HTML><HEAD>  <META NAME="GENERATOR" CONTENT="Adobe PageMill 2.0 Mac">  <TITLE>shift and add = multiply</TITLE></HEAD><BODY BGCOLOR="#fee7cb"><PRE>; code to demonstrate the shift &amp; add method of multiplication;;;  presume the input is in two bytes named fact1 and fact2;   and the output is going into a Word (unsigned) called PRODUCT;;        mov     bl, fact1       ; grab input        mov     al, fact2               mov     bh, 0           ;zero out high byte of bx        mov     dx, 0           ;zero accum (product)lp:     cmp     al, 0           ;check for end        je      fini        shr     al, 1           ;grab rightmost bit        jnc     nextbit           ;don't add it -bit was zero        add     dx, bx          ;add next shift into accumnextbit: shl    bx, 1           ;shift first fact to left        jmp     lpfini:   mov     product, dx </PRE></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -