Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to setup a mixed C / Z80-assembler toolchain in Visual Studio Code

I want to use Visual Studio Code for writing code for my homebrew Z80 Computer. I use z88dk and its tools to compile C, assemble the Z80 asm files etc. I will write parts in assembler and other parts in C. I also need to edit .m4 files. Would be nice if these file types would have syntax coloring.

I am totally new to vscode and I have seen some languages for the z80 but I have no idea how to continue from there - or if these will even work at all.

I don't want to have to write a language extension because that looks like just too much work - from what I understand. I am also not a typescript/javascript developer.

Is there a tutorial out there on how to set this up, or any other helpful resources?

like image 959
obiwanjacobi Avatar asked Dec 16 '16 07:12

obiwanjacobi


1 Answers

I'm looking this up as I type so it may not be sufficiently complete to warrant a tick but I hope it'll be useful.

Per Adding Language Colorization you can use TextMate-format colourisation rules so jumping through those rules with something like this 'Z80 Asm' rule set should get you syntax highlighting. It doesn't look like it's a lot of work given that somebody else has already written the highlighting rules.

Microsoft's documentation on Tasks also guides you through using tasks.json to incorporate into your workspace "a task runner like gulp or grunt or any command line tool like a compiler or linter". So you should be able to create a z88dk running task fairly easily.

like image 84
Tommy Avatar answered Sep 18 '22 18:09

Tommy