flat assembler
Message board for the users of flat assembler.

Index > Main > FASMG and namespace

Goto page Previous  1, 2, 3, 4  Next
Author
Thread Post new topic Reply to topic
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7845
Location: Kraków, Poland
Tomasz Grysztar
Fulgurance wrote:
Anonyme label exist with fasmg ?
You need to include macro/@@.inc to get them emulated (Win32/Win64 headers include this automatically).

There is also a slightly more capable variant in the utility directory. You may use it instead, if you prefer.
Post 12 Jan 2021, 22:33
View user's profile Send private message Visit poster's website Reply with quote
Fulgurance



Joined: 27 Nov 2017
Posts: 259
Fulgurance
Thanks you very much !

I have just one last error, after it's okay. All of my implementation was corrected.

Now I have this error with the section of the file:
Code:
zohran@msi-gs73vr-6rf ~/Documents/Programmation/OS $ fasmg BOOTX64.fasm 
flat assembler  version g.j5ii
BOOTX64.fasm [53]:
        section '.data' data readable writable
macro section? [68]
Custom error: invalid argument.    


Do you think this happen because I use Data as namespace?

But I think no, because I use Code as namespace and I don't have error with it
Post 13 Jan 2021, 01:17
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7845
Location: Kraków, Poland
Tomasz Grysztar
Oh, I forgot to include the WRITABLE as synonym in PE.INC, only WRITEABLE works right now. Also, I should perhaps modify that custom error so that it would show which of the keywords was not recognized. Smile
Post 13 Jan 2021, 09:53
View user's profile Send private message Visit poster's website Reply with quote
Calanor



Joined: 19 Jul 2015
Posts: 22
Location: Sweden
Calanor
Fulgurance: "writable" should read "writeable"

[Edit] Oh, I was too slow again. Crying or Very sad
Post 13 Jan 2021, 09:53
View user's profile Send private message Reply with quote
Fulgurance



Joined: 27 Nov 2017
Posts: 259
Fulgurance
Tomasz Grysztar wrote:
Oh, I forgot to include the WRITABLE as synonym in PE.INC, only WRITEABLE works right now. Also, I should perhaps modify that custom error so that it would show which of the keywords was not recognized. Smile


Laughing Stupid mistake lol,sorry

Now, I have this error:
Code:
zohran@msi-gs73vr-6rf ~/Documents/Programmation/OS $ fasmg BOOTX64.fasm 
flat assembler  version g.j5ii
BOOTX64.fasm [55] Data/Data.fasm [1]:
        Data:
macro data? [17]:
        number = type
Processed: number = :
Error: invalid expression.    


BOOTX64.fasm:
Code:
include "FASMG/macro/@@.inc"
include "FASMG/format/format.inc"

format PE64 EFI
entry Bootx64

include "Virtual/Virtual.fasm"

section '.text' code readable executable

include "Code/Code.fasm"

Bootx64:
Code.UEFI.Initialize

Code.UEFI.Call ConOut,SimpleTextOutputProtocol,ClearScreen,1, \
        InstancePointer

Code.UEFI.GetStatusCode [text1]
        
Code.UEFI.Call BootServices,BootServices,GetMemoryMap,5, \
        Address,[Data.UEFI.GetMemoryMap.MemoryMapSize]

Code.UEFI.GetStatusCode [text2]
        
mov rax,[Data.UEFI.GetMemoryMap.MemoryMapSize]
add qword [Data.UEFI.GetMemoryMap.MemoryMapSize],rax

Code.UEFI.Call BootServices,BootServices,AllocatePool,3, \
        Value,Virtual.UEFI.MemoryTypes.LoaderData, \
        Value,[Data.UEFI.GetMemoryMap.MemoryMapSize], \
        Address,[Data.UEFI.GetMemoryMap.MemoryMapAddress]

Code.UEFI.GetStatusCode [text3]

Code.UEFI.Call BootServices,BootServices,GetMemoryMap,5, \
        Address,[Data.UEFI.GetMemoryMap.MemoryMapSize], \
        Value,[Data.UEFI.GetMemoryMap.MemoryMapAddress], \
        Address,[Data.UEFI.GetMemoryMap.MapKey], \
        Address,[Data.UEFI.GetMemoryMap.DescriptorSize], \
        Address,[Data.UEFI.GetMemoryMap.DescriptorVersion]

Code.UEFI.GetStatusCode [text2]

Code.UEFI.Call ConOut,SimpleTextOutputProtocol,OutputString,2, \
        InstancePointer,0, \
        Address,[text4]
        
Code.UEFI.GetStatusCode [text4]

jmp $

section '.data' data readable writeable

include "Data/Data.fasm"

text1: dw "UEFI ClearScreen:",0xD,0xA,0x0
text2: dw "UEFI GetMemoryMap:",0xD,0xA,0x0
text3: dw "UEFI AllocatePool:",0xD,0xA,0x0
text4: dw "UEFI OutputString:",0xD,0xA,0x0
    


Data.fasm:
Code:
Data:

namespace Data

    include "UEFI/UEFI.fasm"
    
end namespace    


If I do that, I solve the problem:
Code:
?Data:

namespace Data

    include "UEFI/UEFI.fasm"
    
end namespace    


Last edited by Fulgurance on 13 Jan 2021, 18:58; edited 1 time in total
Post 13 Jan 2021, 18:45
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7845
Location: Kraków, Poland
Tomasz Grysztar
This has already been discussed in this thread earlier - "data" is a case-insensitive command defined for PE format (just like in fasm 1). See the post above when I mentioned the solution:
Code:
?Data:    
Post 13 Jan 2021, 18:54
View user's profile Send private message Visit poster's website Reply with quote
Fulgurance



Joined: 27 Nov 2017
Posts: 259
Fulgurance
Yes I edited my post at the same moment you write, you are too fast for me xD

Just something, is it normal when all is assembled, I have .exe file ? Normally is a .efi no ?
Post 13 Jan 2021, 19:00
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7845
Location: Kraków, Poland
Tomasz Grysztar
Fulgurance wrote:
Just something, is it normal when all is assembled, I have .exe file ? Normally is a .efi no ?
It's not in the macro, apparently I forgot. I'm going to add it in the next update.
Note that you may alter details like that easily by tweaking the FORMAT.INC.
Post 13 Jan 2021, 19:33
View user's profile Send private message Visit poster's website Reply with quote
Fulgurance



Joined: 27 Nov 2017
Posts: 259
Fulgurance
Okay. I think just the output name is EXE, but the binary generated is for UEFI? Because when I test my application with uefi shell into virtualbox, she don't work.

Is it because the file assembled is different or I done mistakes into my code when I migrated?
Post 13 Jan 2021, 19:58
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7845
Location: Kraków, Poland
Tomasz Grysztar
Fulgurance wrote:
Is it because the file assembled is different or I done mistakes into my code when I migrated?
It's hard to say with little information. Have you tried with simpler, minimal applications?
Post 13 Jan 2021, 20:03
View user's profile Send private message Visit poster's website Reply with quote
Fulgurance



Joined: 27 Nov 2017
Posts: 259
Fulgurance
Okay I start to do that. If the problem come from the format directive, I will tell you
Post 13 Jan 2021, 20:10
View user's profile Send private message Reply with quote
Fulgurance



Joined: 27 Nov 2017
Posts: 259
Fulgurance
Okay, I done that, It's a old simple code I used before (I already tested, he work with fasm 1).

But when I try to assemble it with fasmg, I have this error:
Code:
zohran@msi-gs73vr-6rf ~/Downloads/Test $ fasmg Test.fasm 
flat assembler  version g.j5ii
Test.fasm [4] macro format?.PE64? [68] macro format?.include [1] FASMG/format/pe.inc [328]:
        .NumberOfSections dw NUMBER_OF_SECTIONS
Processed: .NumberOfSections dw NUMBER_OF_SECTIONS
Error: symbol 'PE.NUMBER_OF_SECTIONS' is undefined or out of scope.    



Code:
include "FASMG/macro/@@.inc"
include "FASMG/format/format.inc"

format pe64 efi
entry Main

section '.text' code readable executable

Main:
mov [UEFIHandle],rcx
mov [UEFISystemTable],rdx
push rbp

;--------------------------------------------
mov rdx,[UEFISystemTable]

push rbp
sub rsp,0x20

mov rcx,[rdx+SystemTable.ConOut]
mov rax,[rcx+SimpleTextOutputProtocol.ClearScreen]
call rax

add rsp,0x20
;--------------------------------------------

jmp $

section '.data' data readable writeable

include "DataTypes.fasm"
include "TableHeader.fasm"
include "SimpleTextOutputProtocol.fasm"
include "SystemTable.fasm"

UEFIHandle:         dq ?
UEFISystemTable:    dq ?    
[/code]
Post 13 Jan 2021, 20:22
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7845
Location: Kraków, Poland
Tomasz Grysztar
This error is probably cascading out of some structural error in the code, you can try to hunt down the actual error by increasing the "-e" setting from command line.
Post 13 Jan 2021, 20:25
View user's profile Send private message Visit poster's website Reply with quote
Fulgurance



Joined: 27 Nov 2017
Posts: 259
Fulgurance
Code:
zohran@msi-gs73vr-6rf ~/Downloads/Test $ fasmg -e 20 Test.fasm 
flat assembler  version g.j5ii
Test.fasm [4] macro format?.PE64? [68] macro format?.include [1] FASMG/format/pe.inc [328]:
        .NumberOfSections dw NUMBER_OF_SECTIONS
Processed: .NumberOfSections dw NUMBER_OF_SECTIONS
Error: symbol 'PE.NUMBER_OF_SECTIONS' is undefined or out of scope.
Test.fasm [4] macro format?.PE64? [68] macro format?.include [1] FASMG/format/pe.inc [359]:
        .SizeOfImage dd SIZE_OF_IMAGE
Processed: .SizeOfImage dd SIZE_OF_IMAGE
Error: symbol 'PE.SIZE_OF_IMAGE' is undefined or out of scope.
Test.fasm [4] macro format?.PE64? [68] macro format?.include [1] FASMG/format/pe.inc [394]:
        db (NUMBER_OF_SECTIONS-1)*SectionTable.ENTRY_LENGTH dup 0
Processed: db (NUMBER_OF_SECTIONS-1)*SectionTable.ENTRY_LENGTH dup 0
Error: symbol 'PE.NUMBER_OF_SECTIONS' is undefined or out of scope.
Test.fasm [4] macro format?.PE64? [68] macro format?.include [1] FASMG/format/pe.inc [417]:
        relocated_addresses:: rd NUMBER_OF_RELOCATIONS
Processed:  rd NUMBER_OF_RELOCATIONS
Error: symbol 'PE.NUMBER_OF_RELOCATIONS' is undefined or out of scope.
Test.fasm [4] macro format?.PE64? [68] macro format?.include [1] FASMG/format/pe.inc [421]:
        relocation_types:: rw NUMBER_OF_RELOCATIONS
Processed:  rw NUMBER_OF_RELOCATIONS
Error: symbol 'PE.NUMBER_OF_RELOCATIONS' is undefined or out of scope.
Test.fasm [10]:
        mov [UEFIHandle],rcx
mov? [2] x86.parse_operand [126] (CALM)
Error: symbol 'UEFIHandle' is undefined or out of scope.
Test.fasm [10]:
        mov [UEFIHandle],rcx
mov? [2] x86.parse_operand [129] (CALM)
Error: symbol 'UEFIHandle' is undefined or out of scope.
Test.fasm [11]:
        mov [UEFISystemTable],rdx
mov? [2] x86.parse_operand [126] (CALM)
Error: symbol 'UEFISystemTable' is undefined or out of scope.
Test.fasm [11]:
        mov [UEFISystemTable],rdx
mov? [2] x86.parse_operand [129] (CALM)
Error: symbol 'UEFISystemTable' is undefined or out of scope.
Test.fasm [15]:
        mov rdx,[UEFISystemTable]
mov? [3] x86.parse_operand [126] (CALM)
Error: symbol 'UEFISystemTable' is undefined or out of scope.
Test.fasm [15]:
        mov rdx,[UEFISystemTable]
mov? [3] x86.parse_operand [129] (CALM)
Error: symbol 'UEFISystemTable' is undefined or out of scope.
Test.fasm [20]:
        mov rcx,[rdx+SystemTable.ConOut]
mov? [3] x86.parse_operand [126] (CALM)
Error: symbol 'SystemTable.ConOut' is undefined or out of scope.
Test.fasm [20]:
        mov rcx,[rdx+SystemTable.ConOut]
mov? [3] x86.parse_operand [129] (CALM)
Error: symbol 'SystemTable.ConOut' is undefined or out of scope.
Test.fasm [20]:
        mov rcx,[rdx+SystemTable.ConOut]
mov? [9] (CALM)
Error: values not comparable.
Test.fasm [20]:
        mov rcx,[rdx+SystemTable.ConOut]
mov? [12] (CALM)
Error: variable term used where not expected.
Test.fasm [21]:
        mov rax,[rcx+SimpleTextOutputProtocol.ClearScreen]
mov? [3] x86.parse_operand [126] (CALM)
Error: symbol 'SimpleTextOutputProtocol.ClearScreen' is undefined or out of scope.
Test.fasm [21]:
        mov rax,[rcx+SimpleTextOutputProtocol.ClearScreen]
mov? [3] x86.parse_operand [129] (CALM)
Error: symbol 'SimpleTextOutputProtocol.ClearScreen' is undefined or out of scope.
Test.fasm [21]:
        mov rax,[rcx+SimpleTextOutputProtocol.ClearScreen]
mov? [9] (CALM)
Error: values not comparable.
Test.fasm [21]:
        mov rax,[rcx+SimpleTextOutputProtocol.ClearScreen]
mov? [12] (CALM)
Error: variable term used where not expected.
Test.fasm [29]:
        section '.data' data readable writeable
macro section? [7]:
        store SECTION_BASE-IMAGE_BASE at PE:SectionTable.VirtualAddress+SECTION_INDEX*SectionTable.ENTRY_LENGTH
Processed: store SECTION_BASE-IMAGE_BASE at PE:SectionTable.VirtualAddress+SECTION_INDEX*SectionTable.ENTRY_LENGTH
Error: address out of range.    
Post 13 Jan 2021, 20:53
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7845
Location: Kraków, Poland
Tomasz Grysztar
Seems like you may have even more of them there (try larger number). Cascades like this are usually caused by some kind of block not closed properly, etc.
Post 13 Jan 2021, 21:17
View user's profile Send private message Visit poster's website Reply with quote
Fulgurance



Joined: 27 Nov 2017
Posts: 259
Fulgurance
Thanks for this advice, I found the problem, I need to do a little conversion of macro and struc for fasmg.

I tested, the problem now come from my implementation, thanks you. I think I done something bad during my migration, I start to perfom checks

FASMG is a very wonderfull work, thanks you again
Post 13 Jan 2021, 21:49
View user's profile Send private message Reply with quote
Fulgurance



Joined: 27 Nov 2017
Posts: 259
Fulgurance
I have question Tomasz, how can I display the value of a label for check the result ? I use display but this command show me just the ASCII code
Post 13 Jan 2021, 22:24
View user's profile Send private message Reply with quote
Calanor



Joined: 19 Jul 2015
Posts: 22
Location: Sweden
Calanor
Fulgurance: There's an example of how to do that in the manual:
Code:
macro show description,value
    repeat 1, d:value
        display description,`d,13,10
    end repeat
end macro

show '2^64=',1 shl 64    
Post 13 Jan 2021, 23:15
View user's profile Send private message Reply with quote
Fulgurance



Joined: 27 Nov 2017
Posts: 259
Fulgurance
Oh yes, sorry.

I have a question about match, because when I convert my macro for call UEFI function with match, I see the test don't work correctly. I don't understand very well how match work....

It's my macro before fasmg:
Code:
macro UEFI Entry*,Interface*,Function*,ParametersNumber*,Type1*,Argument1,Type2,Argument2,Type3,Argument3,Type4,Argument4,Type5,Argument5,Type6,Argument6,Type7,Argument7,Type8,Argument8,Type9,Argument9,Type10,Argument10
{
    ArgumentsNumber = 10
    if Argument10 eq
        ArgumentsNumber = ArgumentsNumber-1
    end if
    if Argument9 eq
        ArgumentsNumber = ArgumentsNumber-1
    end if
    if Argument8 eq
        ArgumentsNumber = ArgumentsNumber-1
    end if
    if Argument7 eq
        ArgumentsNumber = ArgumentsNumber-1
    end if
    if Argument6 eq
        ArgumentsNumber = ArgumentsNumber-1
    end if
    if Argument5 eq
        ArgumentsNumber = ArgumentsNumber-1
    end if
    if Argument4 eq
        ArgumentsNumber = ArgumentsNumber-1
    end if
    if Argument3 eq
        ArgumentsNumber = ArgumentsNumber-1
    end if
    if Argument2 eq
        ArgumentsNumber = ArgumentsNumber-1
    end if
    if Argument1 eq
        ArgumentsNumber = ArgumentsNumber-1
    end if
    
    if ParametersNumber > 4
        sub rsp,ParametersNumber*8
    else
        sub rsp,0x20
    end if

    mov rdx,[UEFISystemTable]
    mov rcx,[rdx+SystemTable.#Entry]
    mov rax,[rcx+#Interface#.#Function]
    
    if ArgumentsNumber > 0
        if Argument1 eq
            if Type1 != UEFI_ARGUMENT_TYPE_INSTANCE_POINTER
                xor rcx,rcx
            end if
        else 
            if Type1 eq UEFI_ARGUMENT_TYPE_INSTANCE_POINTER
        
            else 
                if Type1 eq UEFI_ARGUMENT_TYPE_ADDRESS
                    lea rcx,Argument1
                else
                    mov rcx,Argument1
                end if
            end if
        end if
    end if
    
    if ArgumentsNumber > 1
        if Argument2 eq 0
            xor rdx,rdx
        else 
            if Type2 eq UEFI_ARGUMENT_TYPE_ADDRESS
                lea rdx,Argument2
            else
                mov rdx,Argument2
            end if
        end if
    end if
    
    if ArgumentsNumber > 2
        if Argument3 eq 0
            xor r8,r8
        else 
            if Type3 eq UEFI_ARGUMENT_TYPE_ADDRESS
                lea r8,Argument3
            else
                mov r8,Argument3
            end if
        end if
    end if
    
    if ArgumentsNumber > 3
        if Argument4 eq 0
            xor r9,r9
        else 
            if Type4 eq UEFI_ARGUMENT_TYPE_ADDRESS
                lea r9,Argument4
            else
                mov r9,Argument4
            end if
        end if
    end if
    
    if ArgumentsNumber > 4
        if Type5 eq UEFI_ARGUMENT_TYPE_ADDRESS
            lea r10,Argument5
            mov qword[rsp + 8*4],r10
        else
            mov qword[rsp + 8*4],r10
        end if
    end if
    
    if ArgumentsNumber > 5
        if Type eq UEFI_ARGUMENT_TYPE_ADDRESS
            lea r10,Argument6
            mov qword[rsp + 8*5],r10
        else
            mov qword[rsp + 8*5],r10
        end if
    end if
    
    if ArgumentsNumber > 6
        if Type7 eq UEFI_ARGUMENT_TYPE_ADDRESS
            lea r10,Argument7
            mov qword[rsp + 8*6],r10
        else
            mov qword[rsp + 8*6],r10
        end if
    end if
    
    if ArgumentsNumber > 7
        if Type8 eq UEFI_ARGUMENT_TYPE_ADDRESS
            lea r10,Argument8
            mov qword[rsp + 8*7],r10
        else
            mov qword[rsp + 8*7],r10
        end if
    end if
    
    if ArgumentsNumber > 8
        if Type9 eq UEFI_ARGUMENT_TYPE_ADDRESS
            lea r10,Argument9
            mov qword[rsp + 8*8],r10
        else
            mov qword[rsp + 8*8],r10
        end if
    end if
    
    if ArgumentsNumber > 9
        if Type10 eq UEFI_ARGUMENT_TYPE_ADDRESS
            lea r10,Argument10
            mov qword[rsp + 8*9],r10
        else
            mov qword[rsp + 8*9],r10
        end if
    end if
    
    call rax

    if ParametersNumber > 4
        add rsp,ParametersNumber*8
    else
        add rsp,0x20
    end if
} 
    


And after the migration (the name changed):
Code:
macro Call Entry*,Interface*,Function*,ParametersNumber*,Type1*,Argument1,Type2,Argument2,Type3,Argument3,Type4,Argument4,Type5,Argument5,Type6,Argument6,Type7,Argument7,Type8,Argument8,Type9,Argument9,Type10,Argument10

    ArgumentsNumber = 10
    match , Argument10
        ArgumentsNumber = ArgumentsNumber-1
    end match
    match , Argument9
        ArgumentsNumber = ArgumentsNumber-1
    end match
    match , Argument8
        ArgumentsNumber = ArgumentsNumber-1
    end match
    match , Argument7
        ArgumentsNumber = ArgumentsNumber-1
    end match
    match , Argument6
        ArgumentsNumber = ArgumentsNumber-1
    end match
    match , Argument5
        ArgumentsNumber = ArgumentsNumber-1
    end match
    match , Argument4
        ArgumentsNumber = ArgumentsNumber-1
    end match
    match , Argument3
        ArgumentsNumber = ArgumentsNumber-1
    end match
    match , Argument2
        ArgumentsNumber = ArgumentsNumber-1
    end match
    match , Argument1
        ArgumentsNumber = ArgumentsNumber-1
    end match
    
    if ParametersNumber > 4
        sub rsp,ParametersNumber*8
    else
        sub rsp,0x20
    end if

    mov rdx,[Data.UEFI.SystemTable]
    mov rcx,[rdx+Virtual.UEFI.SystemTable.#Entry]
    mov rax,[rcx+Virtual.UEFI.#Interface#.#Function]
    
    if ArgumentsNumber > 0
        match , Argument1
            if Virtual.UEFI.ArgumentTypes.#Type1 != Virtual.UEFI.ArgumentTypes.InstancePointer
                xor rcx,rcx
            end if
        else 
            if Virtual.UEFI.ArgumentTypes.#Type1 = Virtual.UEFI.ArgumentTypes.InstancePointer
        
            else 
                if Virtual.UEFI.ArgumentTypes.#Type1 = Virtual.UEFI.ArgumentTypes.Address
                    lea rcx,Argument1
                else
                    mov rcx,Argument1
                end if
            end if
        end match
    end if
    
    if ArgumentsNumber > 1
        match , Argument2
            xor rdx,rdx
        else 
            if Virtual.UEFI.ArgumentTypes.#Type2 = Virtual.UEFI.ArgumentTypes.Address
                lea rdx,Argument2
            else
                mov rdx,Argument2
            end if
        end match
    end if
    
    if ArgumentsNumber > 2
        match , Argument3
            xor r8,r8
        else 
            if Virtual.UEFI.ArgumentTypes.#Type3 = Virtual.UEFI.ArgumentTypes.Address
                lea r8,Argument3
            else
                mov r8,Argument3
            end if
        end match
    end if
    
    if ArgumentsNumber > 3
        match , Argument4
            xor r9,r9
        else 
            if Virtual.UEFI.ArgumentTypes.#Type4 = Virtual.UEFI.ArgumentTypes.Address
                lea r9,Argument4
            else
                mov r9,Argument4
            end if
        end match
    end if
    
    if ArgumentsNumber > 4
        if Virtual.UEFI.ArgumentTypes.#Type5 = Virtual.UEFI.ArgumentTypes.Address
            lea r10,Argument5
            mov qword[rsp + 8*4],r10
        else
            mov qword[rsp + 8*4],r10
        end if
    end if
    
    if ArgumentsNumber > 5
        if Virtual.UEFI.ArgumentTypes.#Type = Virtual.UEFI.ArgumentTypes.Address
            lea r10,Argument6
            mov qword[rsp + 8*5],r10
        else
            mov qword[rsp + 8*5],r10
        end if
    end if
    
    if ArgumentsNumber > 6
        if Virtual.UEFI.ArgumentTypes.#Type7 = Virtual.UEFI.ArgumentTypes.Address
            lea r10,Argument7
            mov qword[rsp + 8*6],r10
        else
            mov qword[rsp + 8*6],r10
        end if
    end if
    
    if ArgumentsNumber > 7
        if Virtual.UEFI.ArgumentTypes.#Type8 = Virtual.UEFI.ArgumentTypes.Address
            lea r10,Argument8
            mov qword[rsp + 8*7],r10
        else
            mov qword[rsp + 8*7],r10
        end if
    end if
    
    if ArgumentsNumber > 8
        if Virtual.UEFI.ArgumentTypes.#Type9 = Virtual.UEFI.ArgumentTypes.Address
            lea r10,Argument9
            mov qword[rsp + 8*8],r10
        else
            mov qword[rsp + 8*8],r10
        end if
    end if
    
    if ArgumentsNumber > 9
        if Virtual.UEFI.ArgumentTypes.#Type10 = Virtual.UEFI.ArgumentTypes.Address
            lea r10,Argument10
            mov qword[rsp + 8*9],r10
        else
            mov qword[rsp + 8*9],r10
        end if
    end if
    
    call rax

    if ParametersNumber > 4
        add rsp,ParametersNumber*8
    else
        add rsp,0x20
    end if
    
end macro
    


I tested into a minimal file how match work, but when I test if symbol is empty, the test always fail, look:
Code:
match , Potatoes
    display "Empty"
end match
    


I think It's because if you don't specifie an optional parameter, the symbol don't exist
Post 13 Jan 2021, 23:29
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17865
Location: In your JS exploiting you and your system
revolution
Can we treat namespace as a path?
Code:
namespace Some

    namespace Thing
        value = 0
    end namespace

    namespace ThingElse
        var = ../Thing.value ; go back one level
    end namespace

end namespace    
Post 14 Jan 2021, 05:09
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3, 4  Next

< 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.