Schweigi / assembler-simulator

Simple 8-bit Assembler Simulator with Angular.js
http://schweigi.github.io/assembler-simulator
962 stars 293 forks source link

F flag ¿what is it? #34

Open xmontero opened 5 years ago

xmontero commented 5 years ago

Hey, I found your superb simulator today. I used to code in assembler about 20 or 30 years ago and I found it very didactic for teammates that now only know high-level coding.

I see the Z is the Zero flag and the C is the Carry flag.

But, what is the F flag to the right? When does it get true?

In the instruction set document instruction-set.html I search for "f" whole words and I don't see any reference to it.

xmontero commented 5 years ago

Humm,... I see... the "Fault" flag when an opcode is wrong...

Test sample:

mov b, 0
add b, 0x94
sub b, 0x94
DB 88
hlt

when you execute the sub, the program counter points to a memory address filled with an 88. This does not correspond to any opcode so the F is set to true.

I'd suggest adding it to the documentation ;)