NO

Author Topic: ALIAS sample  (Read 2907 times)

Offline Vortex

  • Member
  • *
  • Posts: 870
    • http://www.vortex.masmcode.com
ALIAS sample
« on: April 03, 2024, 07:30:44 PM »
Quick example to use the keyword ALIAS :

Code: [Select]
.386
.model flat,stdcall
option casemap:none

ExitProcess PROTO :DWORD
printf PROTO C :DWORD,:VARARG
OutputText PROTO C :DWORD,:VARARG

ALIAS "OutputText"="printf"

includelib  \PellesC\lib\Win\kernel32.lib
includelib  msvcrt.lib


DefStr MACRO id,str

.data

    id  db str
    db  0

    slen SIZESTR str

.code

ENDM


.data

msg db 'Lenght of the string = %u',0

.code

start:

    DefStr  string,"Hello world!"

    invoke  OutputText,ADDR msg,slen

    invoke  ExitProcess,0

END start
Code it... That's all...