Z80 Assembly meter in Visual Studio Code
The Z80 Assembly meter extension for Visual Studio Code meters clock cycles and bytecode size from Z80 assembly source code.
This extension meters timing in Z80 clock periods, referred to as T (time) cycles.
As the MSX standard requires so-called M1 wait cycles, this extension also meters M1 wait cycles for Z80 timing calculations on MSX. For a good explanation on how to do Z80 timing calculations on MSX, please read Wait States from Grauw MSX Assembly Page.
In Amstrad CPC architecture, all instruction timings are stretched so that they are all multiples of a microsecond (1�B5;s), which is approximatively equivalent to the duration of a NOP instruction. This extension can meter duration in "number of NOPs" for timing calculations on Amstrad CPC.
ZX Spectrum Next Extended Z80 Instruction Set is supported.
Select Z80 assembly source code to view clock cycles and bytecode size in the status bar.
If there is no selection, the current line will be used.
This extension can be installed standalone, but does not contribute any problem matcher, symbol provider, definition provider, or completion proproser for Z80 assembly.
Therefore, this extension can be installed alongside other Z80-related extensions such as:
This extension contributes the following settings:
z80-asm-meter.languageIds: Additional language IDs for which the extension is enabled (such as "c", to meter in-lined assembly). Defaults to:
"z80-macroasm", "z80-asm", "z80", "pasmo".
z80-asm-meter.maxLines: When working with huge files, metering can be disabled when the line count of the selection exceeds a certain threshold. Unlimited by default.
z80-asm-meter.maxLoC: Stops metering when the parsed lines of code (LoC) count exceeds a certain threshold. Unlimited by default.
z80-asm-meter.maxOpcodes: Stops instruction and opcode block visualization (in the tooltip) when the instruction count exceeds this value. Defaults to 16.
z80-asm-meter.platform: Controls the instruction set to use and the timing information to display:
z80 (default): Uses the default Z80 instruction set and shows default timing information.
msx: For MSX developers. Uses the default Z80 instruction set and shows Z80+M1 timing information (MSX standard).
cpc: For Amstrad CPC developers. Uses the default Z80 instruction set and shows timing measured in number of NOPs.
z80n: For ZX Spectrum Next developers. Includes the ZX Spectrum Next Extended Z80 instruction set and shows default timing information.
z80-asm-meter.viewBytecodeSize: Enables the bytecode size information in the status bar. Enabled by default.
z80-asm-meter.viewInstruction: Enables the processed instruction in the status bar. Useful to check if the extension is mistaking instructions. Disabled by default.
z80-asm-meter.viewLoC: Enables the processed lines of code (LOC) count in the status bar. Disabled by default.
z80-asm-meter.viewOpcode: Enables the opcode in the status bar. Disabled by default.
z80-asm-meter.platform setting instead.
z80-asm-meter.viewLoC settings instead.
z80-asm-meter.viewOpcode settings instead.
Coded by theNestruo (Néstor Sancho).