flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > masm conversion kmd kit problem

Author
Thread Post new topic Reply to topic
shism2



Joined: 14 Sep 2005
Posts: 248
shism2 27 Oct 2005, 03:39
The kmd files have alot of masm macros... But ima just get rid of them


IM stuck at this part of the conversion


IF PORT_MAXIMUM_MESSAGE_LENGTH > ERROR_LOG_MESSAGE_LIMIT_SIZE
IO_ERROR_LOG_MESSAGE_LENGTH equ ERROR_LOG_MESSAGE_LIMIT_SIZE
ELSE
IO_ERROR_LOG_MESSAGE_LENGTH equ PORT_MAXIMUM_MESSAGE_LENGTH
ENDIF

even if i make it .if , it won't work. The error it gives me is invalid expression.
Post 27 Oct 2005, 03:39
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 27 Oct 2005, 08:14
"if" is assembly time, so it doesn't condition preprocessor-time things (read FAQ). ".if" is same as MASM's ".if" - it's pseudo instruction which generates code, it doesn't have anyhing with conditional assembly. COnditional preprocessing is done with "match", but problem ihere is that PORT_MAXIMUM_MESSAGE_LENGTH is numeric constant, and these are assembly-time things, not preprocess time. To get what you wanted just declare IO_ERROR_LOG_MESSAGE_LENGTH as (assembly time) numeric constant:
Code:
if PORT_MAXIMUM_MESSAGE_LENGTH > ERROR_LOG_MESSAGE_LIMIT_SIZE 
IO_ERROR_LOG_MESSAGE_LENGTH = ERROR_LOG_MESSAGE_LIMIT_SIZE 
else 
IO_ERROR_LOG_MESSAGE_LENGTH = PORT_MAXIMUM_MESSAGE_LENGTH 
end if    
Post 27 Oct 2005, 08:14
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
shism2



Joined: 14 Sep 2005
Posts: 248
shism2 27 Oct 2005, 21:48
How about something like this

ApcListEntry LIST_ENTRY <>

or

Next SINGLE_LIST_ENTRY <>


Also is the abrevations for

WORD and QWORD

dd or dw or db ?????
Post 27 Oct 2005, 21:48
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 02 Nov 2005, 11:17
???
try to be more specific, i don't get what you want
Post 02 Nov 2005, 11:17
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Reverend



Joined: 24 Aug 2004
Posts: 408
Location: Poland
Reverend 02 Nov 2005, 11:40
shism2:1 -
Code:
label STRUCTURE <>    
It is a masm way of putting structure as data. Just delete '<>' and it shall compile in fasm (but of course these structures: LIST_ENTRY, SINGLE_LIST_ENTRY must be defined somewhere)
2 - Check: http://flatassembler.net/docs.php?article=manual#1.2.1 and http://flatassembler.net/docs.php?article=manual#1.2.2
Post 02 Nov 2005, 11:40
View user's profile Send private message Visit poster's website Reply with quote
shism2



Joined: 14 Sep 2005
Posts: 248
shism2 04 Nov 2005, 00:16
Ok thanks reverend...

The datatypes... WORD and QWORD


have abbreviations?????

like dw or db?
Post 04 Nov 2005, 00:16
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 04 Nov 2005, 00:46
you have these:
1. data definition directives: db, rb, dw, rw, dd, dq ...
2. size operators: byte, word ("mov word [eax],5", "label here dword", "movs dword ...")

is this what you wanted?
Post 04 Nov 2005, 00:46
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
shism2



Joined: 14 Sep 2005
Posts: 248
shism2 04 Nov 2005, 04:49
Yes data defintion directives thats what I wanted thanks vid...

so for

word it's dw
qword dq


Right??
Post 04 Nov 2005, 04:49
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 04 Nov 2005, 08:52
Post 04 Nov 2005, 08:52
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.