Skip to content

Commit cc8b3e1

Browse files
committed
Added CLI arguments
1 parent d26ac47 commit cc8b3e1

File tree

5 files changed

+5781
-21
lines changed

5 files changed

+5781
-21
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,34 @@
11
# af6502
22
6502 8-bit processor emulator
3+
4+
This emulator is still a work in progress. Most of the instruction set is
5+
still unimplemented.
6+
7+
## Usage
8+
9+
The emulator shall be operated from the command line.
10+
11+
The command line flags must have space between each other, but their
12+
arguments are attached. For example, to load a file and activate the
13+
register status output:
14+
15+
```
16+
af6502 -input=./program.bin -showstatus
17+
```
18+
19+
### Command line arguments:
20+
21+
- `cycles=` *(followed by a number, without quotes)*: sets the number of
22+
clock cycles to execute
23+
- `-input=` *(followed by the path, without quotes)*: selects the input
24+
binary file
25+
- `-showstatus`: displays the status of the registers in the terminal,
26+
at the end of the execution
27+
- `-dump=` *(followed by the path, without quotes)*: selects the path for
28+
the memory dump file
29+
- `start=` *(followed by a number, without quotes)*: sets the inital value
30+
for the Program Counter register, that is, the starting memory location
31+
of the executable. When loading a binary, it will be transcribed to
32+
memory starting from this value
33+
34+
Invalid flags are ignored.

compile_flags.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
-std=c++20
2-
-stdlib=libc++
2+

src/af6502

83.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)