Author Topic: HJWasm 2.28 release  (Read 13348 times)

aw27

  • Guest
Re: HJWasm 2.28 release
« Reply #15 on: April 22, 2017, 11:28: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

  • Member
  • *****
  • Posts: 2388
    • https://github.com/nidud/asmc
support
« Reply #16 on: April 22, 2017, 11:59:13 PM »
deleted
« Last Edit: February 26, 2022, 12:05:55 AM by nidud »

powershadow

  • Regular Member
  • *
  • Posts: 20
Re: HJWasm 2.28 release
« Reply #17 on: April 23, 2017, 12:36:40 AM »
I start study macros from Irvin's book, so found some fresh bugs 8) in macro system:

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

MASM Output:

Code: [Select]
row = 268435455
row = 16777215
row = 1048575
row = 65535
row = 4095
row = 255
row = 15
row = 0

HJWASM(HJWasm v2.25) Output:
Code: [Select]
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?
« Last Edit: April 23, 2017, 01:49:17 AM by powershadow »

aw27

  • Guest
Re: HJWasm 2.28 release
« Reply #18 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).

nidud

  • Member
  • *****
  • Posts: 2388
    • https://github.com/nidud/asmc
Re: HJWasm 2.28 release
« Reply #19 on: April 23, 2017, 07:31:29 AM »
deleted
« Last Edit: February 26, 2022, 12:06:11 AM by nidud »

jj2007

  • Member
  • *****
  • Posts: 13957
  • Assembly is fun ;-)
    • MasmBasic
Re: HJWasm 2.28 release
« Reply #20 on: April 23, 2017, 07:53:38 AM »
It'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

  • Member
  • *****
  • Posts: 1228
    • uasm
Re: HJWasm 2.28 release
« Reply #21 on: April 23, 2017, 08:16:01 AM »
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

aw27

  • Guest
Re: HJWasm 2.28 release
« Reply #22 on: April 23, 2017, 04:06:07 PM »
Really, exotic stuff like that doesn't have to be hardcoded into HJWasm.
It is not exotic, hundreds of famous software were and are being developed in PASCAL language.

jj2007

  • Member
  • *****
  • Posts: 13957
  • Assembly is fun ;-)
    • MasmBasic
Re: HJWasm 2.28 release
« Reply #23 on: April 23, 2017, 06:03:31 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?
Quote
The 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

  • Guest
Re: HJWasm 2.28 release
« Reply #24 on: April 23, 2017, 06:49:42 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--

  • Administrator
  • Member
  • ******
  • Posts: 10583
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: HJWasm 2.28 release
« Reply #25 on: April 24, 2017, 07:44:44 AM »
I have split the topic so that the technical data on this release of HJWASM is not confused with the following discussion on licencing.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

powershadow

  • Regular Member
  • *
  • Posts: 20
Re: HJWasm 2.28 release
« Reply #26 on: April 24, 2017, 07:20:47 PM »
; Start studying 'VARARG' with HJWasm v2.25. ::)

Code: [Select]
_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

  • Member
  • ****
  • Posts: 893
    • Uasm
Re: HJWasm 2.28 release
« Reply #27 on: April 24, 2017, 07:56:39 PM »
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

  • Guest
Re: HJWasm 2.28 release
« Reply #28 on: April 27, 2017, 03:34:16 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