I want to fold sections of the following Z80 assembly excerpt correctly, but I can't get it done:
.ORG $9D93
.DB t2ByteTok, tAsmCmp
Increase:
LD A, B
CP 255
JR Z, KeyLoop
INC B
JR Display
Decrease:
LD A, B
CP 0
JR Z, KeyLoop
DEC B
JR Display
.END
In this excerpt, three folding regions should be created:
- #1 going from .ORG $9D93 to .END
- #2 going from "Increase:" to the line before "Decrease:"
- #3 going from "Decrease:" to the line before ".END"
Two problems with that:
- I was able to create the first folding by setting the keyword "ORG" as an open token in "Folding in code 1 style" and "END" as the Close token. Funnily enough it doesn't work with ".ORG" and ".END" as a token. E.g. right now it is possible to create a fold if the dot is missing. Do I have to escape the dot in any way?
- I can't get the second and third fold working at all. I tried to add ":" as the open token, but what to put in the Close token? It would be the line before the next fold starts or ends. How to express that in the UDL?