flat assembler
Message board for the users of flat assembler.

Index > Windows > Odd Error!

Author
Thread Post new topic Reply to topic
LAS3R



Joined: 17 Oct 2003
Posts: 6
LAS3R
i'm trying to compile a TASM source to FASM, and get odd error everytime at line looks like this:

proc DlgProc, hDB, DBMsg, Param, DBlParam

cmp [DBMsg], WM_INITDIALOG
je InitDB <- This line reports as "Invalid Value", i don't see reason why!

cmp [DBMsg], WM_COMMAND
je Usercommand <- This one and below, not sure, since winFasm only take line at time to check!

cmp [DBMsg], WM_CLOSE
je Exitprog

cmp [DBMsg], WM_DESTROY
je Exitprog

xor eax, eax
ret

InitDB:
(More code here....)
Post 17 Oct 2003, 11:22
View user's profile Send private message Reply with quote
pelaillo
Missing in inaction


Joined: 19 Jun 2003
Posts: 878
Location: Colombia
pelaillo
With this information, I didn't find a reason why fasm does not assemble it. Could you post a little (but complete) snippet to help you better?
I send you an example
Code:
proc WinProc,hwnd,wmsg,wparam,lparam
  .ps       PAINTSTRUCT
 enter
       mov     eax,[wmsg]
  cmp     eax,WM_PAINT
        je      .wmpaint
    cmp     eax,WM_DESTROY
      je      .wmdestroy
  cmp     eax,WM_CREATE
       je      .wmcreate
.defwndproc:
       invoke DefWindowProc,[hwnd],[wmsg],[wparam],[lparam]
        jmp     .finish
.wmcreate:

;      init stuff here

 jmp     .finish
.wmpaint:
    lea eax, [.ps]
      invoke BeginPaint,[hwnd],eax

;   painting stuff here

     lea eax, [.ps]
      invoke EndPaint,[hwnd],eax
  xor     eax,eax
     jmp     .finish
.wmdestroy:
  xor     eax,eax
.finish:
     return    
Post 17 Oct 2003, 12:26
View user's profile Send private message Yahoo Messenger Reply with quote
roticv



Joined: 19 Jun 2003
Posts: 374
Location: Singapore
roticv
Because he did not use "enter"?
Post 17 Oct 2003, 12:42
View user's profile Send private message Visit poster's website MSN Messenger Reply with quote
LAS3R



Joined: 17 Oct 2003
Posts: 6
LAS3R
roticv is right, i typed enter also in code, and it worked, not sure why enter got to do with it but it works Razz
Post 17 Oct 2003, 16:05
View user's profile Send private message Reply with quote
roticv



Joined: 19 Jun 2003
Posts: 374
Location: Singapore
roticv
enter is a marco, but I am not too sure abt the specifics of it. For me I had been using call labels and not too bothered with marcos like "enter" and "return"
Post 17 Oct 2003, 17:17
View user's profile Send private message Visit poster's website MSN Messenger 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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.