Standalone use of new GAS64 assembler as backend for a different Parser

User projects written in or related to FreeBASIC.
wallyg
Posts: 124
Joined: May 08, 2009 7:08
Location: Tucson Arizona

Standalone use of new GAS64 assembler as backend for a different Parser

Postby wallyg » Jul 26, 2020 22:35

During this time of not being able to go out to visit my favorite places, plus the 100+ degree weather for 3 months every summer, I get bored. Working on my regular projects gets to me after a while, and I want to do something fun.

I had thought of a project I have wanted to do for fun. It would probably never get to full 1.0 release mode, but I could enjoy doing it.

I want to generate a reasonably efficient Assembly code that I could use the new 64-bit assembler to create loadable code.

It has been almost 40 years since I last did any assembly code for the 80386, Vax, and CDC multi-processor machines. I wonder if anyone can send me documentation on the current assembler (GAS) or new version that I could use to be able to generate code. A description of all the commands and instructions would be great.

Thanks
Wally
marcov
Posts: 3012
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: Standalone use of new GAS64 assembler as backend for a different Parser

Postby marcov » Jul 27, 2020 7:57

There are about 1503 instructions nowadays. The Intel doc documents them all, so best to download the Intel datasheets.
SARG
Posts: 1145
Joined: May 27, 2005 7:15
Location: FRANCE

Re: Standalone use of new GAS64 assembler as backend for a different Parser

Postby SARG » Jul 27, 2020 9:44

Hi wally,

wallyg wrote:A description of all the commands and instructions would be great.
Did you receive my email ? There is a link to an alphabetic list of these instructions then each one is well described.

For well understanding your project , where does it sit ? I omit object files and linker.

Code: Select all

BAS --> fbc [lexer/parser/emitter]  --> AS32 -->   gas32
                                    |          
                                    --> AS64 -->   gas64
                                    |   
                                    --> C    -->   gcc32/gcc64   -->  gas32/gas64

Good luck for your project.

If you want you also could help me in my gas64 project : stronger optimization. For now I just do 'peephole optimization' (thanks to Google for learning me the name) and with a pass on the asm code we could get a more optimized code.
jj2007
Posts: 1693
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: Standalone use of new GAS64 assembler as backend for a different Parser

Postby jj2007 » Jul 27, 2020 12:55

wallyg wrote:A description of all the commands and instructions would be great
See All opcodes in a handy format, attachment AllOpcodes.zip
wallyg
Posts: 124
Joined: May 08, 2009 7:08
Location: Tucson Arizona

Re: Standalone use of new GAS64 assembler as backend for a different Parser

Postby wallyg » Jul 29, 2020 6:30

Thank you for the responses.

But, I have not received any emails containing any information as of right now.

My email address is TiresRMe2001@yahoo.com. The same address for 19 years.

Wally
wallyg
Posts: 124
Joined: May 08, 2009 7:08
Location: Tucson Arizona

Re: Standalone use of new GAS64 assembler as backend for a different Parser

Postby wallyg » Jul 29, 2020 6:35

I clicked on the link for AllOpcodes.zip in the RichMash forum and the file downloaded will not open in the standard Zip that is part of Windows 10. And 7Zip also indicates it in not valid.

Wally
robert
Posts: 123
Joined: Aug 06, 2019 18:45

Re: Standalone use of new GAS64 assembler as backend for a different Parser

Postby robert » Jul 29, 2020 6:49

wallyg wrote:I clicked on the link for AllOpcodes.zip in the RichMash forum and the file downloaded will not open in the standard Zip that is part of Windows 10. And 7Zip also indicates it in not valid.

Wally


Confirmed. AllOpcodes.zip is broken.
SARG
Posts: 1145
Joined: May 27, 2005 7:15
Location: FRANCE

Re: Standalone use of new GAS64 assembler as backend for a different Parser

Postby SARG » Jul 29, 2020 7:24

wallyg wrote:But, I have not received any emails containing any information as of right now.
The same address for 19 years.
Strange because we have already exchanged using this address and after checking no error of sending, maybe gone in spam.

All the files are here http://users.freebasic-portal.de/sarg/Docs_Wally.zip
And the links below.

My bible about Intel/Amd instructions :
https://www.felixcloutier.com/x86/

Calling convention windows :
https://www.gamasutra.com/view/news/171 ... ention.php

Directives when using gas :
https://ftp.gnu.org/old-gnu/Manuals/gas ... /as_7.html
jj2007
Posts: 1693
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: Standalone use of new GAS64 assembler as backend for a different Parser

Postby jj2007 » Jul 29, 2020 8:16

robert wrote:
wallyg wrote:I clicked on the link for AllOpcodes.zip in the RichMash forum and the file downloaded will not open in the standard Zip that is part of Windows 10. And 7Zip also indicates it in not valid.

Wally

Confirmed. AllOpcodes.zip is broken.

All opcodes in a handy format
Attached a slightly updated version of the AllOpcodes.rtf document. You can open it in WordPad or MS Word or any other editor that understands Rich Text Format.

There are two attachments here:

above the image: AllOpcodes.zip (191.75 kB - downloaded 65 times.)
below the image: AllOpcodesJpg.zip (49.7 kB, 959x372 - viewed 223 times.)

Try the upper one. The lower one is just a cheap trick to make the SMF forum software accept an attachment that can be "viewed 223 times" but actually isn't in trusty old zip format ;-)

Return to “Projects”

Who is online

Users browsing this forum: Gunslinger and 1 guest