News:

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

Main Menu

whats your favourite macro?

Started by daydreamer, December 31, 2020, 12:27:37 AM

Previous topic - Next topic

daydreamer

whats your favourite macros in category
A:comes with assembler
B:your own made macro
C:someone elses macro you adapted
rv with or without chr$ macros to easily write everything needed for api call in one long line
some macros that replaces unsupported newer mnemonics
some special .COM interface version of invoke + float and other equates that makes d3d programming simpler
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

TouEnMasm

TXT (with all variations possibles),CUNI for UNICODE

Fa is a musical note to play with CL

HSE

fSlv8 , of course  :biggrin:

fSlv8 macro expr:VARARG

IFB FSBE_ENTITY
EXITM
ELSEIF fslv_glb_error
EXITM
ENDIF

fslv8_nc=fslv8_nc+1
fslvm_pos INSTR 1,<&expr>,<=>
fslvm_size SIZESTR <&expr>
IFE fslvm_pos
.err <missing '='>
EXITM
ELSEIF fslvm_size LE 1
.err <invalid argument>
EXITM
ELSEIF fslvm_pos EQ 1
fslvm_dest TEXTEQU <>
fslvm_expr TEXTEQU <&expr>
;fslvm_expr SUBSTR <&expr>,2
ELSE
fslvm_dest SUBSTR <&expr>,1,fslvm_pos-1
fslvm_dest TEXTEQU @TrimStr(%fslvm_dest)
fslvm_expr TEXTEQU <&expr>
;fslvm_expr SUBSTR <&expr>,fslvm_pos+1
ENDIF

IFNB fslvm_dest
IFIDNI @TrimStr(%fslvm_expr),<st0>
fst fslvm_dest
EXITM
ENDIF
ELSE
IF FSBE_FNC(%FSBE_ENTITY,%FSEN_REQ_RETVAL)
.err <destination operand required>
ENDIF
ENDIF

fslv_extract_attributes %fslvm_expr
IF fsea_found NE 0
fslvm_expr TEXTEQU fsea_expr
fslv_current_attributes TEXTEQU fsea_attributes
fslv_attributes? = 1
fslv_local_type_from_attributes fslv8_def_real_type,fslv8_def_int_type,%fsea_attributes
ELSE
fslv_attributes? = 0
fslv_lcl_real_type = fslv8_def_real_type
fslv_lcl_int_type  = fslv8_def_int_type
ENDIF

ll_MathTokenize SlvPath,SubExpr,%fslvm_expr
IF tmt_error
fslv_glb_error = 1
fslv_glb_error_msg CATSTR <PARSER: >,tmt_err_txt
.err fslv_glb_error_msg
EXITM
ENDIF

ll_fSlv SlvPath,SubExpr
IF fslv_glb_error
.err fslv_glb_error_msg
EXITM
ENDIF
endm
Equations in Assembly: SmplMath

jj2007


Adamanteus

Much economy time-size :
inv TEXTEQU <Invoke>