I guess I should post this here:
What exactly is the error "Don't autoclean a label at the end of a freespace block, you'll remove some stuff you're not supposed to remove" supposed to mean?
I have never seen that being thrown when the description is actually accurate to what you're doing.
Anyway, I also don't really understand what is happening here and feel like this is a bug:
The patch
Codesa1rom
print hex(read3($06F624))
print hex(read3($06F717))
print hex(read3($06F67B))
print hex(A)
print hex(B)
org $06F624 : autoclean dl A
freecode
B: db $0
org $06F717 : autoclean JML B
freedata align
A: rep 10 : db 0
org $06F67B : autoclean JML B
outputs
Originally posted by asar888000
801C5C
80085C
128000
10CA1A
maintest.asm:7: error: (E5136): Don't autoclean a label at the end of a freespace block, you'll remove some stuff you're not supposed to remove. [autoclean dl A]
Errors were detected while assembling the patch. Assembling aborted. Your ROM has not been modified.
(4MB SA-1 ROM, using the currently waiting asar 1.61 but 1.50 and 1.37 do the same)
however, only autocleaning the B freespace once, or autocleaning both before or after the A freespace block will not throw the error.
The following variations work with the last one having a slightly different outcome:
Codeorg $06F717 : JML B
freedata align
A: rep 10 : db 0
org $06F67B : autoclean JML B
Codeorg $06F717 : JML autoclean B
freedata align
A: rep 10 : db 0
org $06F67B : JML B
Codefreedata align
A: rep 10 : db 0
org $06F717 : autoclean JML B
org $06F67B : autoclean JML B
Originally posted by asar888000
801C5C
80085C
138000
10CA1A
Codeorg $06F717 : autoclean JML B
org $06F67B : autoclean JML B
freedata align
A: rep 10 : db 0
Originally posted by asar888000
801C5C
80085C
128000 ; different this time though this is probably just a thing of order and not a bug
10CA1A