News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

a exaple of loops macro and if macro

Started by stevenxie, November 18, 2020, 12:22:53 AM

Previous topic - Next topic

stevenxie

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

    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

stevenxie

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:

hutch--

Yes, simple examples are useful as they are easy to follow and can be learned from.

stevenxie

To be simple and easy, but to be true and pure