flat assembler
Message board for the users of flat assembler.
  
|  Index
      > Macroinstructions > questions about the structure macros | 
| Author | 
 | 
| eet_1024 24 Oct 2003, 23:47 Answer 1:
 First, MOV's in fasm are like those in debug; mov eax, 0x12345678 loads an immediate, mov eax, [0x12345678] loads the dword stored at address 0x12345678 If you defined MyInstance WINDOWPLACEMENT You can load eax with the address of x for MyInstance with: mov eax, MyInstance.ptMinPosition.x Or to load eax with the value of x use: mov eax, [MyInstance.ptMinPosition.x] Answer 2: Look at my post for SZ in http://board.flatassembler.net/topic.php?t=273 Answer 3: I think the following will work: TPTRZ equ DWORD DPTR equ DWORD PPTR equ DWORD | |||
|  24 Oct 2003, 23:47 | 
 | 
| madmatt 25 Oct 2003, 12:00 Thanks eet_1024, Here is a c example of something that I want to do.
 struct gfxinfo { unsigned word vendorid1 unsigned word vendorid2 char vendorname[40] } struct gfxinfo mygfxinfo = {0abcdh,0deffh,"Matrox Millenium Mystique 220"} Is there a way to do this with the structure macros in the previous post? | |||
|  25 Oct 2003, 12:00 | 
 | 
| Tomasz Grysztar 25 Oct 2003, 13:10 For this purpose it's better to use the "native" struc, like:
 Code: struc gfxinfo id1,id2,name { .vendorid1 dw id1 .vendorid2 dw id2 .vendorname db name ; or du if you're using WideChar functions times 40-($-.vendorname) db 0 ; repeating might be unnecessary } mygfxinfo gfxinfo 0abcdh,0deffh,"Matrox Millenium Mystique 220" | |||
|  25 Oct 2003, 13:10 | 
 | 
| madmatt 25 Oct 2003, 22:24 Ok everyone, thanks for your help   , I'll give all the solutions a try. Take Care, Matt | |||
|  25 Oct 2003, 22:24 | 
 | 
| < Last Thread | Next Thread > | 
| Forum Rules: 
 | 
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.