flat assembler
Message board for the users of flat assembler.

Index > High Level Languages > I’m Making a Language With FASM as My Backend!

Author
Thread Post new topic Reply to topic
goren



Joined: 17 Nov 2023
Posts: 7
goren 17 Nov 2023, 23:24
Here’s a git repository: https://github.com/gorentbarak/skylang

_________________
Rust — A language empowering everyone to build reliable and efficient software.
Post 17 Nov 2023, 23:24
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1820
Roman 19 Nov 2023, 07:09
Give more information.
And explanations.

Now I not understood why you do this and what you want do.
Post 19 Nov 2023, 07:09
View user's profile Send private message Reply with quote
386



Joined: 11 Nov 2023
Posts: 28
Location: Ukraine (Ruthenia)
386 19 Nov 2023, 13:10
Roman wrote:
Now I not understood why you do this
Apparently goren do this because goren wants to do this Smile
Roman wrote:
and what you want do.
Apparently goren wants to make a language with FASM as backend Smile
Post 19 Nov 2023, 13:10
View user's profile Send private message Reply with quote
goren



Joined: 17 Nov 2023
Posts: 7
goren 19 Nov 2023, 14:36
I wanted to write a language that outputs as close as possible to handwritten assembly, and also make something that has minimal operations given, instead putting most things in the standard library.

_________________
Rust — A language empowering everyone to build reliable and efficient software.
Post 19 Nov 2023, 14:36
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1640
Location: Toronto, Canada
AsmGuru62 19 Nov 2023, 17:35
I have a project where the script like this one generated into FASM and then compiled (by FASM, of course):
Basically, it is a mix of blocks of normal FASM with some OOP features.
Code:
class Element
{
    data
    {
        Surface RECT
        Command Int32
    }

    code
    {
        virtual Paint (hdc)
        {
            lea     ecx, Surface
            invoke  DrawText, hdc, L"PLEASE OVERRIDE ME!", -1, ecx, DT_CENTER or DT_VCENTER or DT_SINGLELINE
        }
    }
}

class Circle : Element
{
    data
    {
        ; members here will be appended to members of 'Element' as one structure
    }
    
    code
    {
        override Paint (hdc)
        {
            lea     esi, Surface
            invoke  Ellipse, hdc, [esi + RECT.left], [esi + RECT.top], [esi + RECT.right], [esi + RECT.bottom]
        }
    }
}

; somewhere in other parts of code...

class Application
{
    data
    {
        ; .... a pile of members ...
    }

    code
    {
        method DoSomeDrawing (hdc)
        {
            locals
            {
                item1 = new Element
                item2 = new Circle
            }

            ; these will be painted differently, because of overriden 'Paint'

            item1.Paint (hdc)
            item2.Paint (hdc)
        }
    }
}
    

The project is frozen right now for a couple of years.
Maybe, I should continue.
Post 19 Nov 2023, 17:35
View user's profile Send private message Send e-mail Reply with quote
goren



Joined: 17 Nov 2023
Posts: 7
goren 19 Nov 2023, 18:13
Wait… high-level assembler? You made HLA?

_________________
Rust — A language empowering everyone to build reliable and efficient software.
Post 19 Nov 2023, 18:13
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1640
Location: Toronto, Canada
AsmGuru62 19 Nov 2023, 21:08
No. HLA was made by Hyde long ago.
And my project is stalled for now.
Post 19 Nov 2023, 21:08
View user's profile Send private message Send e-mail Reply with quote
goren



Joined: 17 Nov 2023
Posts: 7
goren 19 Nov 2023, 22:46
Okay. What is your project called?

_________________
Rust — A language empowering everyone to build reliable and efficient software.
Post 19 Nov 2023, 22:46
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1640
Location: Toronto, Canada
AsmGuru62 19 Nov 2023, 22:52
I call it "FASM Blocks".
But it is in the middle of construction.
There is no ready product.
Post 19 Nov 2023, 22:52
View user's profile Send private message Send e-mail Reply with quote
goren



Joined: 17 Nov 2023
Posts: 7
goren 19 Nov 2023, 23:11
okay! sounds fun!
Post 19 Nov 2023, 23:11
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.