flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > listing for fasm 1.63 and higher

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



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 02 Aug 2005, 13:55
The attachment contains the new version of the listing extension, which can be applied to all the latest releases - just unpack the sources to the same directory where one of the official fasm releases resides. The known bugs were fixed and the performance improved with this new version.


Description: listing extension for flat assembler
Download
Filename: LISTING.ZIP
Filesize: 126.32 KB
Downloaded: 1451 Time(s)



Last edited by Tomasz Grysztar on 05 Aug 2007, 18:05; edited 3 times in total
Post 02 Aug 2005, 13:55
View user's profile Send private message Visit poster's website Reply with quote
Chewy509



Joined: 19 Jun 2003
Posts: 297
Location: Bris-vegas, Australia
Chewy509 03 Aug 2005, 00:24
Hi Tomasz,

Is there a time when this will be merged into the standard download and become part of the standard precompiled build? Or will this continue to be an add-on?

Darran.
Post 03 Aug 2005, 00:24
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 03 Aug 2005, 08:22
Maybe if one day if becomes really nice and like it...
Post 03 Aug 2005, 08:22
View user's profile Send private message Visit poster's website Reply with quote
ccrayne



Joined: 17 May 2005
Posts: 12
ccrayne 05 Aug 2005, 22:24
I am pleased to report that this new (Aug 2) version works with version 1.63.5 using LInux. Unfortunaty, however, the installation procedure is seriously broken.

To begin with, because Linux file names and directories are case sensitive, unzipping 'LISTING.ZIP' into the installation directory does not place the listing source files in directory 'source', as is clearly the intent, but rather creates a separate 'SOURCE' directory tree, containing upper case file names.

Even after this is fixed, the assembly fails because the 'get_params' routine exists both in the 'system.inc' file and the 'FASM.ASM' file.

Here are the steps which I went through to install the listing function:
1. Move the 'LISTING' directory from the 'SOURCE' directory to the 'source' directory.
2. Change the LISTING.INC & VARIABLE.INC file names to lower case.
3. Comment out the 'get_params' routine in 'system.inc'.
4. Enter the . . . 'source/LISTING/LINUX' directory and assemble 'FASM.ASM''.
Post 05 Aug 2005, 22:24
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 05 Aug 2005, 22:34
Oh, sorry, this reflects the changes I've made to the interfaces after 1.63.5 - perhaps it's time to make another release (actually this version of extension was made with the coming 1.64 release in mind). Also this was packaged with the DOS/Windows releases in mind, for Linux I would perhaps make .tgz package like with the releases. Using unzip with -L switch should help.
Post 05 Aug 2005, 22:34
View user's profile Send private message Visit poster's website Reply with quote
ccrayne



Joined: 17 May 2005
Posts: 12
ccrayne 06 Aug 2005, 00:10
Thank you for the tip about the -L option in unzip. As for packaging the extension as .tgz, it would be nice to have, but -- now that I know how to handle the .zip file properly -- I do not consider it a high priority.

-- Chuck
Post 06 Aug 2005, 00:10
View user's profile Send private message Reply with quote
ccrayne



Joined: 17 May 2005
Posts: 12
ccrayne 08 Aug 2005, 01:56
I have just installed 1.64 and the listing extension, under Linux, and am pleased to report that they each installed smoothly, and both of them appear to be working well.

-- Chuck
Post 08 Aug 2005, 01:56
View user's profile Send private message Reply with quote
Professor Edgeworth



Joined: 18 Dec 2005
Posts: 1
Location: Tasmania
Professor Edgeworth 18 Dec 2005, 02:52
I'm finding FASM a very useful program, and I am most grateful to the author for
providing it for every one to use. But there is one problem with the LISTING, in
that the offsets on the left do not correspond with the ORG statements. For example:

use16
org 0
; Information to be used by some linker
00000000: 00 7C dw 7c00h
00000002: 7B 00 dw 123
00000004: C8 01 dw 456

; Start of code proper at 7c00
org 7c00h
; I would expect listing to show 7c00 at the left, not 0006
00000006: FA codsta: cli
; Values loaded are correct but offsets in listing are wrong
00000007: B9 00 7C mov cx,codsta
0000000A: B8 07 7C mov ax,second
0000000D: 89 D8 second: mov ax,bx

-------
What it should be is, for example:
00007C01: B9 00 7C mov cx,codsta

The object file is fine - nice and small - only the listing needs changing. I can't
quite see how it is done in the source of LISTING.INC, because there are no comments.
Could some one point me in the right direction, please?
Post 18 Dec 2005, 02:52
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 18 Dec 2005, 11:43
The listing in it current form shows you the output file offsets, not assumed memory addresses. Listing for memory addresses would a bit different task - for example things inside "virtual" blocks would get listed with their addresses, too; and such addresses might even relative to registers - so displaying the value would be enough, it can be even an address like "eax+ebx*2+1234h". You cannot use such addresses with "org", only with "label" and "virtual", but this is not assembler's limitation, only syntactical choice for the "org" - I can actually even remove the reg-based-addresses prohibition from "org" if anyone really needed it.
Post 18 Dec 2005, 11:43
View user's profile Send private message Visit poster's website Reply with quote
FlashBurn



Joined: 06 Jan 2005
Posts: 87
FlashBurn 05 Feb 2006, 14:47
I tried to assemble listing with the current version (1.65.12), but I get this error:

Code:
flat assembler  version 1.65.12
..\..\expressi.inc [13]:
        mov     edi,single_operand_operators
error: undefined symbol.
    
Post 05 Feb 2006, 14:47
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 15 Feb 2006, 11:19
Well, the 1.65 has new include file - TABLES.INC, which needs to be included from interface files. The correction is simple and you should be able to do it yourself.
Post 15 Feb 2006, 11:19
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 15 Feb 2006, 11:22
Tomasz Grysztar wrote:
The listing in it current form shows you the output file offsets, not assumed memory addresses. Listing for memory addresses would a bit different task - for example things inside "virtual" blocks would get listed with their addresses, too; and such addresses might even relative to registers - so displaying the value would be enough, it can be even an address like "eax+ebx*2+1234h". You cannot use such addresses with "org", only with "label" and "virtual", but this is not assembler's limitation, only syntactical choice for the "org" - I can actually even remove the reg-based-addresses prohibition from "org" if anyone really needed it.

wouldn't it be nice to have another column with virtual address in listing output?
Post 15 Feb 2006, 11:22
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 15 Feb 2006, 11:28
It would be nice, though would require much extended storage during the assembly (well, only during the additional pass this extension does). I will think about it.

Alternatively, it would be combined with the symbol dump extension, posted here: http://board.flatassembler.net/topic.php?t=4645#34297
Post 15 Feb 2006, 11:28
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 15 Feb 2006, 11:49
you mean some extended FASM version with all these extensions? interesting, but i think it will result in everyone using this one, FASM will be pretty fast even with all these things.

Imagine:
Code:
Flat Assembler, version 1.70
Usage:
-p [filename]: store result of preprocessing
-P [filename]: store result of preprocessing without empty lines and comments
-s [filename]: store symbol information
-l [filename]: generate listing
...
    
Post 15 Feb 2006, 11:49
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 15 Feb 2006, 12:31
fasm 1.66 is planned to make some kind of debug info format - though I may have to invent some dedicated one if none of the existing ones is able to hold the specific information kinds that fasm provides. The extensions would then change into external tools extracting various types of lists from that compact format.
Post 15 Feb 2006, 12:31
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 15 Feb 2006, 12:37
so that format will store all the data i meant for -p, -s, -l ? That seems to be nice idea... with coverters to other format. Most general solution we can work out.

I don't believe there is already some that can cover all what we need
Post 15 Feb 2006, 12:37
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
OzzY



Joined: 19 Sep 2003
Posts: 1029
Location: Everywhere
OzzY 04 Mar 2006, 01:09
Hi Tomasz!
I've tested and the listing feature seems to work pretty cool.
But it just works for DOS applications. If I try to build some win32 app with invoke macro and all, it will show some error. =(

It's a lot better to look at the listing and see how the code was actually assembled.

How to make it work with the GUI version of FASM?
Also, would be great if it comes in standard distribution and with some kind of directive like
Quote:

.LISTING 'prog.lst'


Thanks!
Post 04 Mar 2006, 01:09
View user's profile Send private message Reply with quote
MAD_DËMON



Joined: 03 Mar 2006
Posts: 23
MAD_DËMON 12 Apr 2006, 20:44
Hey ¿can I generate listing from the built-in ide instead of cmd line? ¿How? I'm not using another ide such as fresh or radasm yet, i'm using fasm 1.64
Post 12 Apr 2006, 20:44
View user's profile Send private message Visit poster's website Reply with quote
llaurrentt



Joined: 02 Nov 2006
Posts: 13
Location: Liège / Belgium
llaurrentt 02 Nov 2006, 09:56
Just got 1.67.14, listing extention and symbol_dump hack under linux. After the name case and "tables.inc" adjustment, I just had the unexpected problem of having to change from "section" to "segment" in "Listing/Linux/fasm.asm". Anyway both listing symbols dump seem to work great!

Edit: and here is my custom archive (Linux, DOS and Win32)


Description: fasm 1.67.14 with both listing and symbdump extentions merged.
Download
Filename: fasm-1.67.14-listing_symbdump.tgz
Filesize: 312.24 KB
Downloaded: 1226 Time(s)

Post 02 Nov 2006, 09:56
View user's profile Send private message MSN Messenger Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 03 Nov 2006, 08:42
llaurrentt, Prebuilt DOS .EXE works fine, but Win32 one won't generate a SYMBDUMP.TXT that isn't zero-bytes. Sad

Anyways, great job! (DOS rules, anyways) Laughing
Post 03 Nov 2006, 08:42
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 1, 2  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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.