The MASM Forum

Microsoft 64 bit MASM => MASM64 SDK => Topic started by: stevenxie on November 18, 2020, 12:22:53 AM

Title: a exaple of loops macro and if macro
Post by: stevenxie on November 18, 2020, 12:22:53 AM
; --------------------------------------------------------------

    include \masm32\include64\masm64rt.inc

    .code

; ----------------------------------------------------------------

 entry_point proc

     USING r12
     
    ; local  Var1   :QWORD
    ; local  Var2   :QWORD

    SaveRegs

     mov r12,100
     mov r10,0
    .while r12 {} 0
      conout str$(r12),lf
       add r10,r12
       sub r12, 1
       
       .endw
      conout str$(r10),lf
      call wait_key
     
      stdout "hello word of masm!!",150
; ---------------------------------------------------------------

    mov r12, 100
    mov r11,0
    .repeat
     ; conout str$(r12),lf
       add r11,r12
       sub r12, 1
    .until r12 == 0
     conout tab,str$(r11),lf
    waitkey
    RestoreRegs
    .exit

 entry_point endp

; ------------------------------------------------------------------
    end
Title: Re: a exaple of loops macro and if macro
Post by: stevenxie on November 18, 2020, 12:35:52 AM
We can all see clearly that masm64sdk application of advanced syntax features is as easy as MASM32SDK. All those who despise and laugh at MASM64, you can shut up. :eusa_boohoo: :greenclp: :greensml: :badgrin:
Title: Re: a exaple of loops macro and if macro
Post by: hutch-- on November 18, 2020, 01:45:56 AM
Yes, simple examples are useful as they are easy to follow and can be learned from.
Title: Re: a exaple of loops macro and if macro
Post by: stevenxie on November 18, 2020, 02:01:39 AM
To be simple and easy, but to be true and pure