News:

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

Main Menu

assembler doesn't like newer opengl32.inc

Started by kiptron, March 28, 2020, 01:01:14 PM

Previous topic - Next topic

kiptron

 Hello again comrades, Trying to get opengl going in a simple 64 bit build. Newer version of
opengl32.inc contains symbol PPROC   The assembler can't find it  "undefined symbol PPROC" 100 times.
I have looked all over for this symbol, no luck. I think it's a 32 bit pointer. Does this .inc file need
work, like getting pointers for all the OGL functions ?  Thanks,  comrade kiptron

Mikl__

Hi, kiptron!
There is opengl32.inc with "PPROC" in http://www.masm32.com/download/install64.zip
I repeat, if you wonna that we will help you, you need to show us your asm-/rc-/bat-files, otherwise this is not the help that you are waiting for, but fortune-telling on a crystal ball or Tarot cards

hutch--

The main include file "win64.inc" has the macro for PPROC. Include that BEFORE the opengl32 file and it should work OK.

kiptron

 Thank you Mikl and Hutch,  Yes Mikl, I have that file, PPROC only appears there, or so I thought. I will try
changing the order as Hutch has suggested. The assembler is multi-pass and looks through all files (first pass)
for all symbols before it proceeds, so the order should not matter.  I thought I looked through all the inc's
but apparently missed it. Please forgive my inexperience with this forum, I will try to learn how to include
information and be more clear in the future.  Thanks  kiptron

kiptron

  Thank you Hutch,  That did the trick. The order of includes is important.
Where did I learn that it was not ? I should have no more issues to bug you with.
   The masm32 project is the best thing of it's kind for an old low level guy.
                                                                      Thank you  kiptron                                                                     

jj2007

Quote from: kiptron on March 29, 2020, 03:58:04 AM
The order of includes is important.

Inter alia, you can redefine constants and macros. For example,
this equ <esi>
is valid until you reach the line
this equ <edi>

jimg

jj-
there are a lot of caveats with that statment

first, you can't use equ like that

this equ <esi> is illegal
you can however say
this equ esi

also, you can only redefine a var set with equ if it's not a number.
and I think that only works because the var in the second equ has already been replaced by the first equ.

jj2007

Quote from: jimg on March 29, 2020, 01:05:36 PM
this equ <esi> is illegal
you can however say
this equ esi

I confess that I didn't test this statement. You didn't, either ;-)

These are legal (tested):
  that equ <esi>
  dest equ edi
  mov that, 123
  mov dest, 123

HSE

Quote from: jj2007 on March 30, 2020, 11:19:02 AM
These are legal (tested):
  that equ <esi>
  dest equ edi
  mov that, 123
  mov dest, 123


I remember that good practice in this case is:that textequ <esi>
dest textequ <edi>

Of course, I don't remember why  :biggrin:
Equations in Assembly: SmplMath

jj2007

Quote from: HSE on March 30, 2020, 11:45:02 AMI remember that good practice in this case is:that textequ <esi>
dest textequ <edi>

Jim has yet another version:

Quote from: jimg on March 29, 2020, 01:05:36 PMthis equ <esi> is illegal
you can however say
this equ esi

In any case, I didn't know that this was a reserved word in MASM; and it's not listed in MASM Programmer's Guide :cool:

HSE


Quote from: jj2007 on March 30, 2020, 11:14:17 PM
In any case, I didn't know that this was a reserved word in MASM; and it's not listed in MASM Programmer's Guide :cool:
RadAsm paint "this" like a reserved word, but I don't see in any code.

Just now I learned about that! Very interesting: is like UNION but for single variables  :thumbsup:    .data
        item2 = this dword
        sujeto2 real4 1.95
main proc
    cls
    print real4$(sujeto2),13,10

    mov item2, 123456
    print real4$(sujeto2),13,10
    print str$(item2),13,10

    fSlv sujeto2 = 6.54
    print real4$(sujeto2),13,10
    ret
main endp

1.950000

0.000000
123456

6.540000
Press any key to continue ...
Equations in Assembly: SmplMath