Author Topic: a exaple of loops macro and if macro  (Read 133 times)

stevenxie

  • Regular Member
  • *
  • Posts: 37
a exaple of loops macro and if macro
« 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

stevenxie

  • Regular Member
  • *
  • Posts: 37
Re: a exaple of loops macro and if macro
« Reply #1 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:

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 7801
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: a exaple of loops macro and if macro
« Reply #2 on: November 18, 2020, 01:45:56 AM »
Yes, simple examples are useful as they are easy to follow and can be learned from.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

stevenxie

  • Regular Member
  • *
  • Posts: 37
Re: a exaple of loops macro and if macro
« Reply #3 on: November 18, 2020, 02:01:39 AM »
To be simple and easy, but to be true and pure