News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

movtest

Started by stevenxie, December 06, 2020, 11:46:39 PM

Previous topic - Next topic

stevenxie

hi ,everyone.

include \masm32\include64\masm64rt.inc
s qword "abc"
matrix1 EQU 10 * 10
matrix2 EQU <10 * 10>
.data
oneByte BYTE 12h
oneWord WORD 1234h
oneDword DWORD 12345678h
oneQword QWORD 0123456789ABCDEFH
.code

      entry_point proc

            mov rbx,0                                                            ;RBX=OOOOOOOO00000000h
            mov bl,oneByte                                                       ;RBX=0000000000000078h
            conout lf
            conout lf
            conout lf
            conout tab,tab,"rbx=00000000000000",hex$(rbx),"h",lf
            mov rbx,0
            mov bx,oneWord                                                       ;RBX=0000000000001234h
            conout tab,tab,"rbx=000000000000",hex$(rbx),"h",lf
            mov rbx,0
            mov ebx,oneDword                                                     ;RBX=12345678h
            conout tab,tab,"rbx=00000000",hex$(rbx),"h",lf
            mov rbx,0
            mov rbx,oneQword                                                     ;RBX=0123456789ABCDEFh
            conout tab,tab,"rbx=0",hex$(rbx),"h",lf
            conout tab,tab
            waitkey       
           

            .exit

      entry_point endp
end

jj2007

That's all fascinating, of course, but it would be even more interesting if you
- stated what your problem is, or what you want to demonstrate
- used more comments, like every decent programmer
- used names that are a bit more transparent than "s" or "lf"

stevenxie

Quote from: jj2007 on December 07, 2020, 12:08:26 AM
That's all fascinating, of course, but it would be even more interesting if you
- stated what your problem is, or what you want to demonstrate
- used more comments, like every decent programmer
- used names that are a bit more transparent than "s" or "lf"

stevenxie

DEAR JJ,So long as you sink down, seriously study the programming ideas in the MASM64SDK of the HUTCH, carefully analyze the pretreatment macro, master the WIN64ABI,, then 64 MASM will provide you with an incomparably broad sky and the most powerful driving force.
do not scorn and belittle MASM64,MASM64 as a low-level, professional, powerful, pure binary product generator! And let us embrace MASM64! together

jj2007

Steven, my comment had absolutely nothing to do with the qualities of the Masm64 SDK.

hutch--

I think what Steven is doing is very straight forward, he is learning and demonstrating base MASM operators in a systematic manner by test piece. It is a pleasure to see a new member using a systematic technique to digest and understand the complexities of Win64.

stevenxie

DEAR JJ,I see. we are very friendly.thank for you! however,As a friend, I suggest you watch MASM64, meet the new age of 64 bit.

DEAR Hutch.thank for you very much. You are very right. I will never forget the church you gave me. A preprocessor macro you've created in your MACRO64.INC is so simple, smooth, and profound and magical. I will now write the simplest console test piece to simply test some of the basic code functions. Thanks again to all the designers in the forum.

hutch--

Console mode is a very useful tool for the assembler language programmer, it lets you get at assembler operators and instructions much faster than jumping directly into a User Interface where you have the massive complexities of Windows API functions and the architecture of Windows messaging to deal with.

That will come once the operators and instructions become more familiar but a systematic approach that is understood step by step will lead to writing UI based applications.