HI,
Last releases has problem with compilation code as is attached.
We have resulat as:
00022A 294 dispadd:
000324 **E5 7E** [ 7] 295 LD A, #'['
000326 FE 00 FE [17] 296 CALL _putchar
and
000318 **95 01** [ 7] 272 CP a, #eos
00031A **CD 23** [ 7] 273 CP a, #0
Of course selected values are wrong and bin doesn't work.
What is happend?
Please provide instruction on how to reproduce the issue.
When assembling your memtest.asm on my Debian GNU/Linux testing system using
sdasz80 -plosgfffrom current trunk, I get:That looks okay to me.
It is last release 4.4 for Win32 and Win64.
Compilation way is like it:
sdasz80 -l -o -s .\debug\memtest.rel memtest.asm
And is producted memtest.rst file like that.
The
.rstis produced by linker and it doesn't have to mean that the linked binary code corresponds to what is in that.rst, just comparing the .lst and .rst I could imagine it's an error in processing the.lstto.rstwhich could be independent from other generated files: specifically, it seems that during that processing the part of the "page header" is matched by the ".lst to .rst" processing routine (wrongly considered as the code that should be "fixed" using the rellocations) and that confuses all the values that happen afterwards:P.S. for the example to run, the following file has to be added:
screen.h
To state more clearly: it doesn't seem to me that the binary code contains the specific errors which exist in the
.rst:in the .bin it's: "ern \0Read"
int the .rst it's: "ern rn \0Read" (i.e. an insertion of additional 'r' 'n' and space) which can't be seen in the binary:
Last edit: Janko Stamenović 2024-08-03
When .ascii directive is exchanged with .str directive whole *.rst file looks well.
I use *.rst files for looking bugs, because addresses help locate place on system under debuging.
Thanks. Is the only issue the wrong
.rstafter linking or is there some other issue still observable now?Subject is still under observation...
Probably it is badly generated *.rst file only.
Checking this further, the simple workaround to avoid the bug you observe is to use the
-poption when assembling:Instead:
use
There
pmeans " Disable automatic listing pagination", and "loscreate ".lst" ".rel" (a.k.a "object") and ".sym" files, which you already used as-l -o -s.Note: Philipp used for his test the
poption and therefore hasn't observed any problem.Maybe it's not worth attempting to fix this in SDCC now because, if I understand, there is some work in progress to synchronize with the more recent upstream versions of assembler and linker code, and the more recent version of ASxxxx has since 2019 a "rewrite" of the .rst translation:
https://shop-pdp.net/ashtml/aschng.htm
I see @b-s-a is the owner of this ticket. But I don't see when he assigned this to himself (usually, when the owner of a ticket gets changed, there is an entry, e.g. "assigned_to: Philipp Klaus Krause" or so at the end of one of the replies for when I assign a ticket to myself). What happened?
Last edit: Philipp Klaus Krause 2024-11-08
The creator @Mariusz of this ticket already assigned the owner at creation.
This should not be possible IMHO but SourceForge allows it.
It should not be up to the creator of the ticket to assign people unless they are willing to pay them a salary. And otherwise it is up to the volunteers to pick up a ticket to work on.
Maybe the description of this could be ".lst assembled without -p option incompatible with .rst generation"?
Yes; I changed the title.