flat assembler
Message board for the users of flat assembler.

Index > Windows > Pcount includes still working?

Author
Thread Post new topic Reply to topic
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt
I've noticed that the pcount variables don't seem to work any more. Are they still supported? I tried compiling CreateWindowEx with one less parameter than required, but fasm raised no parameter warning. I know I've included the pcount includes right.
Post 07 Mar 2006, 19:25
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7795
Location: Kraków, Poland
Tomasz Grysztar
Works for me. Can you show some example where the problem occurs?
Post 07 Mar 2006, 19:40
View user's profile Send private message Visit poster's website Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt
Here is my win32a.inc file, I combined the normal win32a.inc with the win32ax.inc file. Other than that, the only major thing I've done is to add a lot of extra equates/api's to the fasm include's that didn't come with the standard fasm package. For once the problem is It didn't give me an error message. Smile
Post 07 Mar 2006, 22:29
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7795
Location: Kraków, Poland
Tomasz Grysztar
The problem is that you combined it with the macros from win32ax.inc and not from win32axp.inc
Post 07 Mar 2006, 22:57
View user's profile Send private message Visit poster's website Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt
Oh I see, didn't know that's what the p stood for. Confused All right, thanks! Smile
Post 07 Mar 2006, 23:04
View user's profile Send private message Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt
Maybe you could apply your macro genius one more time and help me solve another problem. I need to call a function like this:
Code:
stdcall [psetmode], x0, y0, color    

But with the pcount macros, this doesn't work anymore. Do you know a way of making this work right?
Post 08 Mar 2006, 14:18
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7795
Location: Kraków, Poland
Tomasz Grysztar
Why cannot you use "invoke" instead of "stdcall []"?
Post 08 Mar 2006, 15:04
View user's profile Send private message Visit poster's website Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt
I need to use the stdcall[] form because the function I want to call is in the same DLL. also, "psetmode" is not a real function, just a variable that holds a pointer to a function.

its used like this
Code:
psetmode dd Pset8 ;or Pset16, Pset32
.
.
proc DDPset8 x0, y0, color
     mov     ecx, [x0]
     mov     edx, [y0]
     mov     eax, [color]

     cmp     ecx, [clipx0]
     jl      DDPset8_e
     cmp     ecx, [clipx1]
     jge     DDPset8_e
     cmp     edx, [clipy0]
     jl      DDPset8_e
     cmp     edx, [clipy1]
     jge     DDPset8_e

     add     ecx, [scanlinetable + edx*4]
     mov     [ecx], al
     return  0

DDPset8_e:
     return  -1
endp
.
.
proc DDHline  x0, x1, y0, color
     mov     eax, [y0]
     .if     eax, l, [clipy0]
             return  DD_OK
     .elseif eax, ge, [clipy1]
             return  DD_OK
     .endif

     mov     ecx,[x0]
     mov     edx,[x1]
     call    _HlineClip

     .if     ecx, e, edx
             stdcall [psetmode], ecx, eax, [color]
             return  DD_OK
     .endif

     mov     [x0],ecx
     mov     [x1],edx
     .repeat
             stdcall [psetmode], [x0], [y0], [color]
             mov     eax,[x1]
             add     [x0],1
     .until  [x0], a, eax
     return  DD_OK
endp    
Post 08 Mar 2006, 18:09
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7795
Location: Kraków, Poland
Tomasz Grysztar
"stdcall [func]"="invoke func", so you can do "invoke psetmode". To have the parameters checked, you need to set it up like
Code:
psetmode% = Pset8%    
Post 08 Mar 2006, 18:23
View user's profile Send private message Visit poster's website Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt
Sorry, your right, I was using invoke [psetmode], I took a nap and am less foggy now, but to late for this post. Smile
Thanks again, Tomasz
Post 08 Mar 2006, 23:21
View user's profile Send private message 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.