patchZ80 assembler - Patches: patch #10038, Feature request: add DEFB 'string'...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #10038: Feature request: add DEFB 'string' to listing

Submitter:  Paul Flo Williams <hisdeedsaredust>
Submitted:  Wed 03 Mar 2021 11:29:52 AM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open

Discussion

Wed 03 Mar 2021 11:29:52 AM UTC, original submission:  

If we have the source file:


defb 2ah
defb '*'


it strikes me as odd that the listing looks like this:


0000 2a                            defb 2ah
0001 ..                            defb '*'


I can see good reasons for not wanting to have a messy listing by listing all the bytes for a really long string, but showing at least as many generated bytes as a normal instruction would show (i.e. 4) would seem to be a good idea.

The really old CP/M ZASM assembler, which produced very neat listings, also showed the first four hex bytes of defined strings, so the attached patch changes the listing to do this.

With this patch applied, this source:


    defb 2ah
    defb '*'
    defb '0123'
    defb 'abcdefghijkl'
    defb '*'


produces this listing:


# File test-defb.asm
0000 2a                            defb 2ah
0001 2a                            defb '*'
0002 30 31 32 33            defb '0123'
0006 61 62 63 64            defb 'abcdefghijkl'
0012 2a                            defb '*'
# End of file test-defb.asm
0013


If you wanted to indicate that a string has more than four bytes, it wouldn't be difficult to change the listing to append another '..' after the fourth byte. I'm happy to amend the patch if you'd like to do this. (ZASM didn't indicate missing bytes, but its listing format didn't have room to do so.)

Paul Flo Williams <hisdeedsaredust>
Group Member

 

Attached Files

Attached Files
file #50979:  list-defb.patch added by hisdeedsaredust (664B - text/x-patch)

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by hisdeedsaredust (Submitted the item)
  •  

    Votes

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    History

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-03-03 hisdeedsaredust Attached File- Added list-defb.patch, #50979

    Back to the top

    Powered by Savane 3.16.
    Corresponding source code