gbdev.github.io icon indicating copy to clipboard operation
gbdev.github.io copied to clipboard

Editor configuration

Open pinobatch opened this issue 3 years ago • 1 comments
trafficstars

From https://gbdev.io/guides/asmstyle.html#recommendations (source code is https://github.com/gbdev/gbdev.github.io/blob/dev/list/guides/asmstyle.md)

Please use the .asm (or .s) file extensions, not .z80. The GB CPU isn't a Z80, so syntax highlighters get it mostly right, but not quite. And it helps spreading the false idea that the GB CPU is a Z80. 😢

Syntax highlighters get it even less right when .s and .asm default to x86 syntax on x86 PCs or to ARM syntax on ARM PCs. Would it be appropriate for some page on this site to give instructions to configure popular text editors (and frameworks used by multiple editors, such as GtkSourceView) to distinguish files in assembly language for SM83 instruction set from files in assembly language for other instruction sets?

pinobatch avatar Dec 29 '21 14:12 pinobatch

I agree, it's not a great suggestion, and I suppose z80 would in case case less worse (as far as syntax highlighting goes) than confusing with other x86 syntaxes. I'll open a PR to remove the paragraph.

avivace avatar Jan 07 '22 00:01 avivace