It is currently Mon Sep 16, 2019 7:40 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Sun Jul 21, 2019 12:53 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 21591
Location: NE Indiana, USA (NTSC)
ASM6 is still drunk.

I'm developing a library where features can be turned on or off at build time. The user edits a config file to set constants to zero or nonzero. Then after the config file is processed, another include file tests whether each constant has been set: if ifndef returns that the constant hasn't been set yet, it gives the constant a reasonable value. But when I was introducing support for prefixed constant and macro names in this library, ASM6's macro system started acting up.

Steps to reproduce:
Code:
asm6 -L wrongmacro.asm wrongmacro.bin && tail -n21 wrongmacro.lst


Expected behavior:
The PP_ name, transposition, and PI_ name in each db statement in the listing correspond to the macro call right above it.

Actual behavior:
The PP_ name, transposition, and PI_ name in each db statement stop corresponding to the preceding macro call soon after PSDAT_arp_waltz.

Code:
0806F                           PSDAT_arp_waltz:  ; title: Arpeggio Waltz
0806F                           PENTLY_playPatSq2 PP_arp_waltz_melody, 24, PI_stringlead
0806F 01 0C 18 01               db PENTLY_CON_PLAYPAT|1, PP_arp_waltz_melody, 24, PI_stringlead
08073                           PENTLY_playPatSq1 PP_arp_waltz_bass1, 1, PI_toot0
08073 00 03 23 01               db PENTLY_CON_PLAYPAT|0, PP_bf98_melodyB1, 35, PI_bf98_flute
08077                           PENTLY_waitRows 39  ; end at 0:17.00
08077 20 26                     db PENTLY_CON_WAITROWS, (39)-1
08079                           PENTLY_playPatSq1 PP_arp_waltz_bass2, 3, PI_toot0
08079 00 05 12 00               db PENTLY_CON_PLAYPAT|0, PP_bf98_bassB1, 18, PI_bass
0807D                           PENTLY_waitRows 9  ; end at 0:20.00
0807D 20 3E                     db PENTLY_CON_WAITROWS, (63)-1
0807F                           PENTLY_playPatSq1 PP_arp_waltz_bass1, 1, PI_toot0
0807F 00 00 01 03               db PENTLY_CON_PLAYPAT|0, PP_bf98_drums_tripletfill, 1, PI_toot0
08083                           PENTLY_waitRows 39  ; end at 0:33.00
08083 20 08                     db PENTLY_CON_WAITROWS, (9)-1
08085                           PENTLY_playPatSq1 PP_arp_waltz_bass2, 3, PI_toot0
08085 00 00 03 03               db PENTLY_CON_PLAYPAT|0, PP_bf98_drums, 3, PI_toot0
08089                           PENTLY_waitRows 9  ; end at 0:36.00
08089 20 11                     db PENTLY_CON_WAITROWS, (18)-1
0808B                           PENTLY_dalSegno
0808B 23                        db PENTLY_CON_DALSEGNO


I guess I could find some other way to provide defaults.


Attachments:
wrongmacro.asm [9.41 KiB]
Downloaded 37 times

_________________
Pin Eight | Twitter | GitHub | Patreon
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2

All times are UTC - 7 hours


Who is online

Users browsing this forum: Google Adsense [Bot] and 3 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group