News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

HJWasm 2.28 release

Started by johnsa, April 21, 2017, 10:39:37 PM

Previous topic - Next topic

aw27

Quote from: habran on April 22, 2017, 09:43:54 PM
aw27, this looks perfectly legal and natural as well as faster then pushing on the stack:
I can't call it like that from Delphi.
PS: I have survived without it, but I think it would be a nice addition and no other assembler has it. There are many Delphi fanatics out there that know assembly language as well.

nidud

#16
deleted

powershadow

#17
I start study macros from Irvin's book, so found some fresh bugs 8) in macro system:

Simple code:
row = -1
REPT 8
row = row SHR 4
%ECHO row = @CatStr(%row)
ENDM


MASM Output:

row = 268435455
row = 16777215
row = 1048575
row = 65535
row = 4095
row = 255
row = 15
row = 0


HJWASM(HJWasm v2.25) Output:

row = 4294967295
row = 4294967295
row = 4294967295
row = 4294967295
row = 4294967295
row = 4294967295
row = 4294967295
row = 4294967295


This is x86 code, but hjwasm think 'row' is qword?

aw27

Another thing, I think you should not call it DELPHI calling convention because it is also the default calling convention for Lazarus/Free Pascal.
It's real name is Borland Register or Borland Fastcall calling convention, the guys at Embarcadero are simply boasting they invented a wheel already invented (something other guys do as well).

nidud

#19
deleted

jj2007

Quote from: aw27 on April 23, 2017, 02:44:10 AMIt's real name is Borland Register or Borland Fastcall calling convention

Don't forget you can write a PROLOG macro. If you give me a concise and comprehensible description of what exactly Delphi & Pascal pass to the DLL or object file, I can give it a try. Really, exotic stuff like that doesn't have to be hardcoded into HJWasm.

habran

nidud :t
jj here is all info you need
If you succeed to make macros that work we can put them in macrolib.c :biggrin:
Cod-Father


jj2007

Quote from: aw27 on April 23, 2017, 04:06:07 PM
It is not exotic, hundreds of famous software were and are being developed in PASCAL language.

And Skype on top of the list of Famous Delphi titles! Well, rank #2 after Nero. Reminds me of the claims of the QT freaks:

What programming language was Skype originally written in?
QuoteThe original internal alpha version of UI was built in QT and we hoped to do few platforms at same take. However the result looked like crap, our progress seemed slow and we ditched the QT about 2 months before public beta release.
:lol:

Btw I like Pascal. My former favourite Basic dialect, Gfa, which inspired MasmBasic, was a mix of traditional BASIC and PASCAL elements. Much ahead of other dialects when it came out in 1987 or so.

Really, serving the Delphi community can be done with a simple PROLOG. Some years ago I managed to convince VBA to accept my code as a DLL - that was tough ::)

aw27

Quote from: jj2007 on April 23, 2017, 06:03:31 PM
And Skype on top of the list of Famous Delphi titles!
Since Microsoft acquired it, it is not being developed anymore in Delphi. Yes, you can see the end result.

Quote
The original internal alpha version of UI was built in QT
QT is too much bloated to develop anything with a good future.


hutch--

I have split the topic so that the technical data on this release of HJWASM is not confused with the following discussion on licencing.

powershadow

; Start studying 'VARARG' with HJWasm v2.25. ::)

_ShowMessageBox proc lpBuffer:QWORD, par1:DWORD, par2:DWORD,par3:DWORD
LOCAL tmpBuff[1024]:byte

invoke wsprintf,addr tmpBuff, lpBuffer,par1,par2,par3
invoke MessageBox,0,addr tmpBuff,"Info",MB_OK

ret

_ShowMessageBox endp

_ShowMessageBox2 proc lpBuffer:QWORD, vargs:VARARG
LOCAL tmpBuff[1024]:byte

invoke wvsprintf,addr tmpBuff, lpBuffer,addr vargs
invoke MessageBox,0,addr tmpBuff,"Info",MB_OK

ret

_ShowMessageBox2 endp

start proc

mov rbx,11223344h
mov rdx,55555555h
invoke _ShowMessageBox,"arg1=%08lX arg2=%04lX arg3=%02lX",edx,ebx,ebx

mov rdx,55555555h
invoke _ShowMessageBox2,"arg1=%08lX arg2=%04lX arg3=%02lX",edx,ebx,ebx   ; Error A2165: Register value overwritten by INVOKE

invoke ExitProcess,0

start endp

end start


I don't insert 'FRAME' in the begining of proc's, anymore. 8)


johnsa

Quote from: aw27 on April 23, 2017, 02:44:10 AM
Another thing, I think you should not call it DELPHI calling convention because it is also the default calling convention for Lazarus/Free Pascal.
It's real name is Borland Register or Borland Fastcall calling convention, the guys at Embarcadero are simply boasting they invented a wheel already invented (something other guys do as well).

We're going to re-name this while working on the fixes, should we just call it BORLAND instead?

aw27

Quote from: johnsa on April 24, 2017, 07:56:39 PM
We're going to re-name this while working on the fixes, should we just call it BORLAND instead?

Looks better for me :t