Setup Z80 language
Posted: Thu Apr 21, 2022 9:26 pm
Hi!
I followed the path described here (viewtopic.php?t=7626) to setup a Document Type for Z80 assembler.
That was helpful, however I could not figure out how to get the lookup to work, to make the editor jump to a label which might be defined in the current file, or in a different file which is sourced (included) by the current file.
I have provided a simple example: suppose we have two files, in FineA.asm there is the definition of a label called "ClearBlock", that file may or may not be opened right now. FileB.asm is opened in the Zeus editor, I'm at the statement "call ClearBlock" with the cursor and want the editor to open FileA.asm and to jump to the ClearBlock label.
What do I have to do to make Zeus do that navigation?
Example:
FileA.asm ...
ClearBlock: ; That's the label I want to navigate to
ld d,h
ld e,l
inc de
ldir
ret
FileB.asm ...
include "FileA.asm" ;this tells the assembler to read FileA.asm at this point, all label in this file can be accessed from code.
MainCode:
call ClearBlock ; This is where the cursor is currently sitting in the editor, I want to navigate to ClearBlock from here in FileA.asm
I followed the path described here (viewtopic.php?t=7626) to setup a Document Type for Z80 assembler.
That was helpful, however I could not figure out how to get the lookup to work, to make the editor jump to a label which might be defined in the current file, or in a different file which is sourced (included) by the current file.
I have provided a simple example: suppose we have two files, in FineA.asm there is the definition of a label called "ClearBlock", that file may or may not be opened right now. FileB.asm is opened in the Zeus editor, I'm at the statement "call ClearBlock" with the cursor and want the editor to open FileA.asm and to jump to the ClearBlock label.
What do I have to do to make Zeus do that navigation?
Example:
FileA.asm ...
ClearBlock: ; That's the label I want to navigate to
ld d,h
ld e,l
inc de
ldir
ret
FileB.asm ...
include "FileA.asm" ;this tells the assembler to read FileA.asm at this point, all label in this file can be accessed from code.
MainCode:
call ClearBlock ; This is where the cursor is currently sitting in the editor, I want to navigate to ClearBlock from here in FileA.asm