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, mnemonic of the instruction, and/or bytecode size in the status bar. Click on either to copy the clock cycles and the bytecode size information to the clipboard.
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:
"asm-collection", "pasmo", "z80", "z80-asm", "z80-macroasm", "zeus-asm".
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.syntax.label: Adjusts the label detection to match the syntax of the assembler:
default (default): The labels must be followed by a colon (:) and can be indented. This behaviour matches most assemblers and coding styles.
colonOptional: The trailing colon is optional, and the labels must not be indented. This behaviour matches some assemblers such as Pasmo and SjASMPlus.
z80-asm-meter.viewInstruction: Enables the processed instruction in the status bar. Useful to check if the extension is mistaking instructions. Enabled by default.
z80-asm-meter.viewOpcode: Enables the opcode in the status bar. Disabled by default.
The lower status bar does not display any information. I don't get clock cycles and bytecode size!
Double check the
Coded by theNestruo (Néstor Sancho).