Skip to content

Amstrad CPC ASM Export Improvements#72

Open
BigWhizzy wants to merge 5 commits into
TheGoodDoktor:masterfrom
BigWhizzy:Amstrad-CPC-ASM-Export-Enhancements
Open

Amstrad CPC ASM Export Improvements#72
BigWhizzy wants to merge 5 commits into
TheGoodDoktor:masterfrom
BigWhizzy:Amstrad-CPC-ASM-Export-Enhancements

Conversation

@BigWhizzy

@BigWhizzy BigWhizzy commented Jun 5, 2026

Copy link
Copy Markdown

Amstrad CPC ASM Export Improvements

CPC-specific changes

ProcessLabelsOutsideExportedRange — bank-grouped header comments

Labels outside the exported range are now grouped by 16K block with a comment identifying the actual mapped bank and whether it contains screen memory. The original code also had a latent null-pointer bug (pLabelInfo was never checked before use) which is fixed here.

; Block 0 (0x0000-0x3fff) - ROM OS
FIRMWARE_KL_CHPR:     equ $BB5A

; Block 1 (0x4000-0x7fff) - RAM 1 (screen memory)
screen_buffer:        equ $4000

; Block 3 (0xc000-0xffff) - ROM BASIC
some_label:           equ $C000

CPCEmu::InitExportStartAddress/ExportEndAddress now explicitly initialised to the full address space on startup.

@BigWhizzy BigWhizzy force-pushed the Amstrad-CPC-ASM-Export-Enhancements branch from 073a0e8 to 79275b4 Compare June 5, 2026 06:43
@Colourclash

Copy link
Copy Markdown
Collaborator

Thanks for taking some time to improve the cpc assembler exporter. Give me some time to look into this. My initial thoughts are the ProcessLabelsOutsideExportedRange change looks fine but I'm not sure about the bExportAsmShowAddresses change. Because it's in the shared assembler export code I would need to check with the owner of the repository. I thought about adding a similar feature in my PCE branch but then I found the .list feature of the assembler I am using (PCEAS). It outputs a listing file that lists the memory address on each line. Looks like sjasmplus has a similar feature. Would that solve your problem?

@BigWhizzy

Copy link
Copy Markdown
Author

No worries. Yes if another tool can do the address listing then that's probably a better way. I'll rip that stuff out then. I've not yet got around to messing around sjasmplus but will have a look as well. Cheers

@BigWhizzy

Copy link
Copy Markdown
Author

@Colourclash I have removed that option now. Cheers for the sjasmplus tip. I installed it and confirmed that I can just run sjasmplus --lst=output.lst source.asm, which produces an output.lst file with the addresses included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants