flat assembler
Message board for the users of flat assembler.
Index
> Windows > How to send the ATA command 34h with DeviceIoControl |
Author |
|
Atlas 06 Jun 2017, 08:40
Aaahhrrr! If nobody answer I will have a hysterical attack. I am being mad!
|
|||
06 Jun 2017, 08:40 |
|
JohnFound 06 Jun 2017, 09:10
|
|||
06 Jun 2017, 09:10 |
|
revolution 06 Jun 2017, 09:20
Atlas == Apolo
|
|||
06 Jun 2017, 09:20 |
|
Atlas 06 Jun 2017, 10:41
I just want to know how to declare struct inside struct as I show above. How to issue ATA command 34h with an IOCTL_ATA_PASS_THROUGH_DIRECT request to write at hard disk sector ?
|
|||
06 Jun 2017, 10:41 |
|
JohnFound 06 Jun 2017, 10:51
Atlas wrote: I just want to know how to declare struct inside struct as I show above. How to issue ATA command 34h with an IOCTL_ATA_PASS_THROUGH_DIRECT request to write at hard disk sector ? You can declare structures inside structures in FASM, regardless of whether you use the native "struc{}" form or any of the "struct" macro forms. _________________ Tox ID: 48C0321ADDB2FE5F644BB5E3D58B0D58C35E5BCBC81D7CD333633FEDF1047914A534256478D9 |
|||
06 Jun 2017, 10:51 |
|
Atlas 06 Jun 2017, 11:02
JohnFound wrote: use the native "struc{}" form or any of the "struct" macro forms. How to use struct{} and struct macro? Please give me an example |
|||
06 Jun 2017, 11:02 |
|
JohnFound 06 Jun 2017, 11:09
Why not to read the FASM manual?
Here for structures: https://flatassembler.net/docs.php?article=manual#2.3.4 Here for general data definitions: https://flatassembler.net/docs.php?article=manual#1.2.2 Well, simple example: Code: struc POINT { .x dd ? .y dd ? } struc RECT { .p1 POINT .p2 POINT } With "struct" in FreshLib definition: Code: struct POINT .x dd ? .y dd ? ends struct RECT .p1 POINT .p2 POINT ends |
|||
06 Jun 2017, 11:09 |
|
Atlas 06 Jun 2017, 13:08
How to get size of these structs? I already try sizeof.RECT but I kant get the size.
|
|||
06 Jun 2017, 13:08 |
|
JohnFound 06 Jun 2017, 14:10
sizeof.RECT will work only for the "struct ends" macros. For pure "struc" it is a little bit more complex:
Code: virtual at 0 RECT RECT sizeof.RECT = $ end virtual Read about "virtual" in the manual. |
|||
06 Jun 2017, 14:10 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.