News:

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

Main Menu

Recent posts

#21
The Laboratory / Re: Invoke, call, jump. Simple...
Last post by jj2007 - July 03, 2025, 08:11:59 PM
Quote from: NoCforMe on July 03, 2025, 05:19:16 PMI restrict my use of registers for passing parameters to the regular general-purpose ones (EAX/EBX/ECX/EDX), not FPU or XMM registers.

Why so restrictive?

    mov eax, 31416        ; you can mix xmm registers with FPU and ordinary
    movd xmm0, eax        ; registers and directly print the result
    fldpi                 ; load 3.14159 onto the FPU
    mov ecx, 123          ; \n is CrLf, \t is tab in Str$()
    Print Str$("\nresult=\t%f", xmm0/ST(0)*ecx)     ; output: [newline] result=    1230003.0
#22
The Laboratory / Re: Invoke, call, jump. Simple...
Last post by NoCforMe - July 03, 2025, 05:19:16 PM
Quote from: daydreamer on July 03, 2025, 05:11:13 PM@NoCforMe
best with transferring thru registers in your own code,if you prefer using fpu regs or xmm regs for your real4/real8 variables as coding style to your own PROC's

I restrict my use of registers for passing parameters to the regular general-purpose ones (EAX/EBX/ECX/EDX), not FPU or XMM registers.
#23
The Laboratory / Re: Invoke, call, jump. Simple...
Last post by daydreamer - July 03, 2025, 05:11:13 PM
@NoCforMe
best with transferring thru registers in your own code,if you prefer using fpu regs or xmm regs for your real4/real8 variables as coding style to your own PROC's




Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz (SSE4)

322     cycles for 100 * proc aligned 16
267     cycles for 100 * proc aligned 16+3
392     cycles for 100 * aligned push+pop
392     cycles for 100 * aligned reg32

310     cycles for 100 * proc aligned 16
266     cycles for 100 * proc aligned 16+3
397     cycles for 100 * aligned push+pop
394     cycles for 100 * aligned reg32

308     cycles for 100 * proc aligned 16
269     cycles for 100 * proc aligned 16+3
408     cycles for 100 * aligned push+pop
392     cycles for 100 * aligned reg32

314     cycles for 100 * proc aligned 16
263     cycles for 100 * proc aligned 16+3
404     cycles for 100 * aligned push+pop
399     cycles for 100 * aligned reg32

308     cycles for 100 * proc aligned 16
267     cycles for 100 * proc aligned 16+3
395     cycles for 100 * aligned push+pop
391     cycles for 100 * aligned reg32

15      bytes for proc aligned 16
19      bytes for proc aligned 16+3
24      bytes for aligned push+pop
20      bytes for aligned reg32


-
#24
MASM64 SDK / A couple minor additions to .i...
Last post by BobC - July 03, 2025, 10:01:38 AM
I needed a couple additions to two include files, so I am posting them here. I'm not sure if we have a place for MASM64 SDK improvements.

In kernel32.inc, I added GetuserDefaultLocaleName around line 2227.
In win64.inc, I added the full list of LOAD_LIBRARY constants around line 7444. The constants came directly from libloaderapi.h.

Bob
#25
The Laboratory / Re: Invoke, call, jump. Simple...
Last post by NoCforMe - July 03, 2025, 07:47:50 AM
Quote from: daydreamer on July 02, 2025, 06:58:12 PM32bit fastcall transfer data in registers vs 32 bit invoke pushing data would be most fair to test

I transfer arguments to (and from) subroutines in registers all the time in my own code.
No need to follow someone else's ABI when it's your own personal code that you can do what the hell what you like with.

Of course, I do follow the part of the Win32 ABI that requires you to respect the "sacred" registers (EBX, ESI, EDI).
#26
The Laboratory / Re: Invoke, call, jump. Simple...
Last post by jj2007 - July 03, 2025, 12:41:36 AM
Quote from: daydreamer on July 02, 2025, 06:58:12 PM32bit fastcall transfer data in registers vs 32 bit invoke pushing data would be most fair to test

Yep, you can save a cycle :thumbsup:

AMD Athlon Gold 3150U with Radeon Graphics      (SSE4)

400    cycles for 100 * proc aligned 16
400    cycles for 100 * proc aligned 16+3
417    cycles for 100 * aligned push+pop
273    cycles for 100 * aligned reg32

405    cycles for 100 * proc aligned 16
409    cycles for 100 * proc aligned 16+3
426    cycles for 100 * aligned push+pop
276    cycles for 100 * aligned reg32

409    cycles for 100 * proc aligned 16
402    cycles for 100 * proc aligned 16+3
422    cycles for 100 * aligned push+pop
290    cycles for 100 * aligned reg32

403    cycles for 100 * proc aligned 16
406    cycles for 100 * proc aligned 16+3
426    cycles for 100 * aligned push+pop
278    cycles for 100 * aligned reg32

406    cycles for 100 * proc aligned 16
416    cycles for 100 * proc aligned 16+3
421    cycles for 100 * aligned push+pop
281    cycles for 100 * aligned reg32

15      bytes for proc aligned 16
19      bytes for proc aligned 16+3
24      bytes for aligned push+pop
20      bytes for aligned reg32
#27
The Laboratory / Re: Invoke, call, jump. Simple...
Last post by daydreamer - July 02, 2025, 06:58:12 PM
Today with old 32bit arguments vs 64 bit fastcall, put data in registers would be more interesting
32bit fastcall transfer data in registers vs 32 bit invoke pushing data would be most fair to test
#28
The Orphanage / Re: No more Blue screen of dea...
Last post by daydreamer - July 02, 2025, 06:54:45 PM
Actually an alternative black screen of death has been possible since laptops existed in the way of "dead battery" :smiley:
#29
Basic variants / Re: Some 'links' to Alternate ...
Last post by daydreamer - July 01, 2025, 05:56:11 PM
I sometimes get an idea and write TI basic on my Ti calculator before asm version, I can write it anywhere instead of have to wait until I get home to PC

Unfortunatly I never had a Z80 based BASIC, which got enhanced by writing Z80 machine instructions in data sets, so I never managed to write a TI calculator asm program  :sad:
#30
BCX / Dll to Poasm 64 bit include fi...
Last post by Vortex - July 01, 2025, 04:54:16 AM
DllToInc64 tool converting DLLs to Poasm 64-bit include files. The zip file includes the .c and .bas files.

D:\BCX>DllToInc64.exe
Usage : DllToInc64.exe DllFile.dll [optional -u]
Version 1.0
-u : Create include file for UNICODE API functions.

Example :

DllToInc64.exe kernel32.dll