flat assembler
Message board for the users of flat assembler.

Index > Programming Language Design > fasmg macro support for Parallax MCUs

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
jmg



Joined: 18 Sep 2016
Posts: 62
jmg 14 Oct 2016, 06:28
Tomasz Grysztar wrote:
In fasmg additional passes are only very slightly faster than the first one, so the total time is roughly the multiple of a single pass.


That makes sense, but does not explain why the listing speed seems to track passes too....

Do the listing macros somehow run on all passes, but only display on the last-pass ?
Post 14 Oct 2016, 06:28
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 14 Oct 2016, 06:55
Listing macro, as the name implies, is just a macro. It gets processed every time the source code is processed, just like any other macro.
Post 14 Oct 2016, 06:55
View user's profile Send private message Visit poster's website Reply with quote
jmg



Joined: 18 Sep 2016
Posts: 62
jmg 14 Oct 2016, 08:48
Tomasz Grysztar wrote:
Listing macro, as the name implies, is just a macro. It gets processed every time the source code is processed, just like any other macro.


How does it limit to one listing copy, not one per pass ?
Post 14 Oct 2016, 08:48
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8351
Location: Kraków, Poland
Tomasz Grysztar 14 Oct 2016, 10:06
jmg wrote:
How does it limit to one listing copy, not one per pass ?
Only the final values are displayed, not the intermediate ones - just like you do not get output generated from intermediate passes, only the final output where all values are resolved properly.
Post 14 Oct 2016, 10:06
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 14 Oct 2016, 16:50
One simple and small improvement to the listing macro that makes the "disphex" macro use the look-up table:
Code:
namespace Listing
        base = $$ 
        offset = $
        virtual at 0
                HexDigits:: db '0123456789ABCDEF'
        end virtual
        macro disphex number*,digits:8
                repeat digits 
                        load digit:byte from Listing.HexDigits:((number) shr ((%%-%) shl 2)) and 0Fh
                        display digit
                end repeat
        end macro 
end namespace    
(I included only the fragment of listing macros which contains the changes).


Last edited by Tomasz Grysztar on 17 Oct 2016, 07:48; edited 1 time in total
Post 14 Oct 2016, 16:50
View user's profile Send private message Visit poster's website Reply with quote
jmg



Joined: 18 Sep 2016
Posts: 62
jmg 14 Oct 2016, 22:16
Thanks, that gives a small boost to speed Smile
I could give better feedback, if the time reported had more digits...
Post 14 Oct 2016, 22:16
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

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