The MASM Forum

General => The Campus => Topic started by: stevenxie on July 11, 2021, 10:03:54 PM

Title: s=s*2
Post by: stevenxie on July 11, 2021, 10:03:54 PM
include \masm32\include64\masm64rt.inc


   .data
      s1 dq 32
       
   .code
     entry_point proc
      mov rbx,1                   ;初始化寄存器rbx
      lal1:
         
         imul rbx,2
         conout "s=",str$(rbx),";",tab   
         sub s1,1
         conout "s1=",str$(s1),";",tab
         cmp s1,0
         jg lal1
         ;.if s1{}0
         ;   jmp lal1
         ;.endif
         conout lf
         waitkey
      .exit
     entry_point endp

     end