News:

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

Main Menu

htpdw

Started by shankle, May 02, 2016, 01:33:47 AM

Previous topic - Next topic

shankle

This module exists in Masm32.
It converts a hex string to a double word.
I have to modify it considerably to get it to work in GoAsm.
Is there a module in GoAsm to do this function?
I might not be allowed to modify the module. Will
check on the masm32 forum.

This is one of the problems I am having converting the file
to use in GoAsm:
  Old Code .while esi != 0

Use Square Brackets to address memory.

It doesn't make any difference, if I code the following, I get the same error message:
  cmp esi,!=o
OR
  cmp [esi],!=0


satpro

Hey Shankle,


Did you try something like

OR esi, esi
jz >  somewhere   (or jnz > somewhere)

or...

TEST esi, esi
jz >  somewhere   (or jnz > somewhere)


Either can be used as a short test for 0 (mods the zero flag, 0 bits remain 0, 1 bits remain 1).

Flags Affected (for both OR and TEST):
The OF and CF flags are cleared; the SF, ZF, and PF flags are set according to the result. The state of the AF flag is
undefined.


GoAsm doesn't support run-time .while, and a compare would be something like:
cmp esi, 0
je > somewhere     (or jne > somewhere)

shankle

Thank you for responding SatPro.
If you look in the Orphanage you will see all the
examples I have been getting.
Trouble is I have to convert all of them to 64-bit GoAsm.
To date I have not been successful.
I came close with the examples by Nidud.
The example by Habran would be a real hassle for me to convert
to GoAsm