https://github.com/grahambates/68kcounter
68000 ASM source code cycle counter
https://github.com/grahambates/68kcounter
Last synced: 3 months ago
JSON representation
68000 ASM source code cycle counter
- Host: GitHub
- URL: https://github.com/grahambates/68kcounter
- Owner: grahambates
- License: mit
- Created: 2021-04-06T15:22:53.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-03T15:54:59.000Z (about 1 year ago)
- Last Synced: 2025-03-15T01:14:48.393Z (4 months ago)
- Language: Assembly
- Size: 664 KB
- Stars: 29
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# 68k Counter
Analyses 68000 assembly source to profile resource and size data. For each instruction it will tell you.
- CPU cycles
- Bus read cycles
- Bus write cycles
- Size in bytes## Usage:
### Web app
You can try out the tool in a web-based version.
### CLI
To analyse a source file run:
`npx 68kcounter mysource.s`
This will output each line prefixed with profile data in the following format:
`[cycles]([reads]/[writes]) [size]`
See `npx 68kcounter --help` for more options.
### VS Code extension
Available as VS Code extension to provide live annotations and totals.

## Limitations:
- Because it analyses your pre-assembled source, it can't take into account
optimisations made by your assembler.
- Total timings for a whole file are pretty meaningless as it doesn't take
into account branching etc, but it can be useful for smaller blocks.
- While it adds profile information inside any macro definitions, it doesn't
currently process macro invocations
- Where timings are based on an 'n' multiplier from an immediate value, it
will parse simple expressions but doesn't currently substitute constants
defined elsewhere.