Author Topic: Re: movtest  (Read 776 times)

TouEnMasm

  • Member
  • *****
  • Posts: 1805
    • EditMasm
Re: movtest
« on: December 07, 2020, 02:38:18 AM »

very classic
Code: [Select]
include sdk64.inc
include stdio.sdk
include conio.sdk
includelib ucrt.lib
includelib msvcrt.lib
.const

.data
oneByte BYTE 12h
oneWord WORD 1234h
oneDword DWORD 12345678h
oneQword QWORD 0123456789ABCDEFH
.code

comment µ output:

                oneDword        =0305419896D
                oneByte         =0000000012h
                oneQword        =0089ABCDEFh

µ
;################################################################


main proc uses rbx 
local Nombre:QWORD
mov rax,0
mov eax,oneDword   
mov Nombre,rax                                                       
invoke printf,TXT(13,10,09,09,"oneDword =%0.10uD",13,10),Nombre
mov ax,oneWord   
mov rax,0
            mov al,oneByte 
mov Nombre,rax                                                     
invoke printf,TXT(09,09,"oneByte =%0.10Xh",13,10),Nombre
mov rax,oneQword
mov Nombre,rax                                                     
invoke printf,TXT(09,09,"oneQword =%0.10Xh",13,10),Nombre
invoke _getch
mov eax,0
ret
main endp

end

Fa is a musical note to play with CL