unused .proc generates .he data
dfbg opened this issue · 2 comments
mads 2.1.5
If there is .he
data inside a .proc that is unused the data will get put into the file even though the code is ignored.
In my particular case I have a file with 2 .procs, each with a small static table, that are both unused and trying to run the obx crashes the computer. Typically in page zero or three. Maybe the data gets written to the file between segments which confuses the (DOS 2.5) loader.
Using dta
properly generates no data.
org $2000
.proc t1
nop
.he 1 2 3 4
.endp
.proc t2
nop
dta 1,2,3,4
.endp
mads -x test.asm
works fine, where is problem?
This file shows the problem.
It builds ToAscii8 but not ToAscii16. The segment header in the file has a length that is 10 bytes longer than it should be which is the size of the .he data at the end of ToAscii16.
xex-filter.pl reports this as a corrupt file.
You can see in the .lst file that the address is being increased without adding bytes.
This seems like the opposite of my initial description where there are extra bytes in the file. But that was found in a large project so it might take some time to recreate and isolate that (if it's actually different than this).