flat assembler
Message board for the users of flat assembler.

Index > Main > Are you making something with fasmg?

Author
Thread Post new topic Reply to topic
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 13 Jul 2016, 17:25
Once in a while it surprises me to get to know that someone created something interesting with fasmg, like it was in the case of ez80 includes. But generally speaking, I know very little about any people that actually use fasmg for anything, or even simply play with it. If you are one of them and reading this, I would be happy to know about it. Or perhaps we need a better dedicated place for fasmg-specific topics?
Post 13 Jul 2016, 17:25
View user's profile Send private message Visit poster's website Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1614
Location: Ukraine
shoorick 14 Jul 2016, 09:31
I plan to finish the porting of my 8080 package from fasm 1 to fasmg soon. I wish to combine it with 8048, 8051 and ez80 includes to get more general solid 8-bit package (not absolutely universal though Rolling Eyes )
Post 14 Jul 2016, 09:31
View user's profile Send private message Visit poster's website Reply with quote
Akeo



Joined: 19 Aug 2016
Posts: 8
Location: Ireland
Akeo 27 Sep 2016, 11:08
I'm going to mention that, with some invaluable help of Tomasz, I have successfully used fasmg to create an EBC (EFI Byte Code) assembler.

For those who don't know, EBC is the instruction set UEFI applications and drivers can use to produce a single binary executable that can run across different architectures (x86_32, x86_64, Arm64 and we're working on adding Arm32). It can be considered as a kind of "Java for UEFI" if you will.

To know more about EBC, please have a look at chapter 21 of the UEFI 2.6 specs.

The project is called fasmg-ebc, and hosted on github.
Post 27 Sep 2016, 11:08
View user's profile Send private message Visit poster's website Reply with quote
zhak



Joined: 12 Apr 2005
Posts: 501
Location: Belarus
zhak 27 Sep 2016, 12:16
I tried fasm g a litle bit and I liked it, but I'm too afraid to move to it. Although it has so many cool features that fasm 1 is missing, and I'm always like "fasm g is cool, I should go master it and use it and move my project source to it" but then I like "it's pretty slow. and it's still new. and Tomasz said it's a sorta example engine. what if it becomes abandoned and not maintained at some point, maybe to the favor of fasm2 or something?" and some months have passed already and I still want to switch and still can't decide
Post 27 Sep 2016, 12:16
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 27 Sep 2016, 13:50
zhak wrote:
"it's pretty slow. and it's still new. and Tomasz said it's a sorta example engine. what if it becomes abandoned and not maintained at some point, maybe to the favor of fasm2 or something?"
fasmg is the engine that was to become the base of fasm 2, so if fasm 2 was ever actually created, it would be mostly compatible with fasmg. However, as vid had once reasonably commented, it is not so certain that fasm 2 is actually needed and wanted, so you should not count on it ever becoming real. Currently I treat fasmg as a supplementary product, it does not seek to completely replace fasm 1 like fasm 2 would (but even fasm 2 might not be successful at this), however it gives us new interesting options. And when you want to implement an instruction set from scratch, fasmg is a much better choice than fasm 1.
Post 27 Sep 2016, 13:50
View user's profile Send private message Visit poster's website Reply with quote
uor99



Joined: 04 Dec 2014
Posts: 42
uor99 05 Nov 2016, 10:31
I am trying to use fasmg for 51/avr/8086/arm32/win32.However,it seems that arm32 cannot be compiled in fasmg yet.
Post 05 Nov 2016, 10:31
View user's profile Send private message ICQ Number Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 05 Nov 2016, 14:54
That's what this thread is about - if someone is working on any new macros, for example ones for an ARM32 architecture, I'd recommend letting others know, so anyone interested would be able to find it and maybe even give some feedback.

There is also another thread where I collect links to known projects / macro packages.
Post 05 Nov 2016, 14:54
View user's profile Send private message Visit poster's website Reply with quote
halak



Joined: 29 Jan 2017
Posts: 1
Location: Ukraine / Lviv Oblast / Turka Raion / Dnistryk-Dubovyi
halak 25 Mar 2017, 02:32
Code:
; INTEL 8008 1972 MNEMONICS FLAT ASSEMBLER G MACROINSTRUCTIONS
; 2021-01-18 VITALII KHALAK (63 DNISTRYK-DUBOVYI, 82509 UKRAINE)

ITERATE <MNM, OPC>, \
    \
              HLT, 001, RLC, 002, RFC, 003, ADI, 004, RST, 005, LAI, 006, RET, 007, \
    INB, 010, DCB, 011, RRC, 012, RFZ, 013, ACI, 014,           LBI, 016,           \
    INC, 020, DCC, 021, RAL, 022, RFS, 023, SUI, 024,           LCI, 026,           \
    IND, 030, DCD, 031, RAR, 032, RFP, 033, SBI, 034,           LDI, 036,           \
    INE, 040, DCE, 041,           RTC, 043, NDI, 044,           LEI, 046,           \
    INH, 050, DCH, 051,           RTZ, 053, XRI, 054,           LHI, 056,           \
    INL, 060, DCL, 061,           RTS, 063, ORI, 064,           LLI, 066,           \
                                  RTP, 073, CPI, 074,           LMI, 076,           \
    \
    JFC, 100, INP, 101, CFC, 102,           JMP, 104,           CAL, 106,           \
    JFZ, 110,           CFZ, 112,                                                   \
    JFS, 120, OUT, 121, CFS, 122,                                                   \
    JFP, 130,           CFP, 132,                                                   \
    JTC, 140,           CTC, 142,                                                   \
    JTZ, 150,           CTZ, 152,                                                   \
    JTS, 160,           CTS, 162,                                                   \
    JTP, 170,           CTP, 172,                                                   \
    \
    ADA, 200, ADB, 201, ADC, 202, ADD, 203, ADE, 204, ADH, 205, ADL, 206, ADM, 207, \
    ACA, 210, ACB, 211, ACC, 212, ACD, 213, ACE, 214, ACH, 215, ACL, 216, ACM, 217, \
    SUA, 220, SUB, 221, SUC, 222, SUD, 223, SUE, 224, SUH, 225, SUL, 226, SUM, 227, \
    SBA, 230, SBB, 231, SBC, 232, SBD, 233, SBE, 234, SBH, 235, SBL, 236, SBM, 237, \
    NDA, 240, NDB, 241, NDC, 242, NDD, 243, NDE, 244, NDH, 245, NDL, 246, NDM, 247, \
    XRA, 250, XRB, 251, XRC, 252, XRD, 253, XRE, 254, XRH, 255, XRL, 256, XRM, 257, \
    ORA, 260, ORB, 261, ORC, 262, ORD, 263, ORE, 264, ORH, 265, ORL, 266, ORM, 267, \
    CPA, 270, CPB, 271, CPC, 272, CPD, 273, CPE, 274, CPH, 275, CPL, 276, CPM, 277, \
    \
    LAA, 300, LAB, 301, LAC, 302, LAD, 303, LAE, 304, LAH, 305, LAL, 306, LAM, 307, \
    LBA, 310, LBB, 311, LBC, 312, LBD, 313, LBE, 314, LBH, 315, LBL, 316, LBM, 317, \
    LCA, 320, LCB, 321, LCC, 322, LCD, 323, LCE, 324, LCH, 325, LCL, 326, LCM, 327, \
    LDA, 330, LDB, 331, LDC, 332, LDD, 333, LDE, 334, LDH, 335, LDL, 336, LDM, 337, \
    LEA, 340, LEB, 341, LEC, 342, LED, 343, LEE, 344, LEH, 345, LEL, 346, LEM, 347, \
    LHA, 350, LHB, 351, LHC, 352, LHD, 353, LHE, 354, LHH, 355, LHL, 356, LHM, 357, \
    LLA, 360, LLB, 361, LLC, 362, LLD, 363, LLE, 364, LLH, 365, LLL, 366, LLM, 367, \
    LMA, 370, LMB, 371, LMC, 372, LMD, 373, LME, 374, LMH, 375, LML, 376

  IF OPC#Q AND 305Q = 004Q

    MACRO MNM? X*
      ASSERT - 100H / 2 <= X & X < 100H
      DB OPC#Q, X
    END MACRO

  ELSE IF OPC#Q AND 307Q = 005Q

    MACRO MNM? X*
      ASSERT 0 <= X & (X < 8 | X MOD 8 = 0 & X < 8 * 8)
      IF X < 8
        DB OPC#Q + 8 * X
      ELSE
        DB OPC#Q + X
      END IF
    END MACRO

  ELSE IF OPC#Q AND 301Q = 100Q

    MACRO MNM? X*
      ASSERT 0 <= X & X < 1 SHL 14
      DB OPC#Q
      DW X
    END MACRO

  ELSE IF OPC#Q AND 301Q = 101Q

    IF OPC#Q AND 361Q = 101Q

      MACRO MNM? X*
        ASSERT 0 <= X & X < 8
        DB OPC#Q + 2 * X
      END MACRO

    ELSE

      MACRO MNM? X*
        ASSERT 8 <= X & X < 32
        DB OPC#Q + 2 * (X - 8)
      END MACRO

    END IF

  ELSE

    MACRO MNM?
      DB OPC#Q
    END MACRO

  END IF

END ITERATE
    


Last edited by halak on 31 Jan 2021, 19:47; edited 7 times in total
Post 25 Mar 2017, 02:32
View user's profile Send private message Send e-mail Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 26 Mar 2017, 14:09
halak: thank you, I'm adding a link to this post to the other thread.
Post 26 Mar 2017, 14: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:  


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