flat assembler
Message board for the users of flat assembler.
Index
> Windows > GUID gone from EQUATES/KERNEL32.INC? |
Author |
|
comrade 09 Jul 2008, 06:45
I notice the USECOM example uses this:
Code: struc GUID def { match d1-d2-d3-d4-d5, def \{ .Data1 dd 0x\#d1 .Data2 dw 0x\#d2 .Data3 dw 0x\#d3 .Data4 db 0x\#d4 shr 8,0x\#d4 and 0FFh .Data5 db 0x\#d5 shr 40,0x\#d5 shr 32 and 0FFh,0x\#d5 shr 24 and 0FFh,0x\#d5 shr 16 and 0FFh,0x\#d5 shr 8 and 0FFh,0x\#d5 and 0FFh \} } Why isn't this part of standard includes? Just wondering too... |
|||
09 Jul 2008, 06:45 |
|
revolution 09 Jul 2008, 06:51
comrade wrote: Why isn't this [GUID] part of standard includes? Just wondering too... |
|||
09 Jul 2008, 06:51 |
|
comrade 09 Jul 2008, 16:53
Right, I was going to ask about that too. But I knew someone would get to it.
Can you come up with a single version that assembles an uninitialized GUID if nothing is given, and something if something is given? Or is that impossible? |
|||
09 Jul 2008, 16:53 |
|
Tomasz Grysztar 09 Jul 2008, 17:00
Try this:
Code: struc GUID def { local pending match d1-d2-d3-d4-d5, def \{ label . byte .Data1 dd 0x\#d1 .Data2 dw 0x\#d2 .Data3 dw 0x\#d3 .Data4 db 0x\#d4 shr 8,0x\#d4 and 0FFh .Data5 db 0x\#d5 shr 40,0x\#d5 shr 32 and 0FFh,0x\#d5 shr 24 and 0FFh,0x\#d5 shr 16 and 0FFh,0x\#d5 shr 8 and 0FFh,0x\#d5 and 0FFh pending equ \} match =pending,pending \{ . db 16 dup (?) if ~ def eq display 'Warning: incorrect GUID ',`.,' value, uninitialized value used instead.' end if \} } |
|||
09 Jul 2008, 17:00 |
|
revolution 09 Jul 2008, 17:02
comrade wrote: Can you come up with a single version that assembles an uninitialized GUID if nothing is given, and something if something is given? Or is that impossible? [edit]Bugger, Tomasz gave the game away. I was going to let comrade think about it for a day or so before posting.[/edit] |
|||
09 Jul 2008, 17:02 |
|
Tomasz Grysztar 09 Jul 2008, 17:13
You forgot how it used to be here when I was active, didn't you?
|
|||
09 Jul 2008, 17:13 |
|
revolution 10 Jul 2008, 00:37
Tomasz Grysztar wrote: You forgot how it used to be here when I was active, didn't you? Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for life. So can you help me with my OS? I've got as far as the for line "format binary", but from there I am stuck. Feel free to post the entire code with working examples and documentation. Thanks |
|||
10 Jul 2008, 00:37 |
|
comrade 10 Jul 2008, 06:36
This is all very confusing.
|
|||
10 Jul 2008, 06:36 |
|
comrade 10 Jul 2008, 06:37
Can you please explain this line:
Quote: if ~ def eq If something is not defined but equal to something? What???? |
|||
10 Jul 2008, 06:37 |
|
revolution 10 Jul 2008, 07:04
That line checks for the macro being called with a non-blank parameter "def". It means: if "def" not-equal-to null.
|
|||
10 Jul 2008, 07:04 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.