Skip to content

Commit 700cd7f

Browse files
committed
Source code comments.
1 parent 17b375e commit 700cd7f

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

sources/Z80.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1915,7 +1915,7 @@ INSN(fd_prefix) {XY_PREFIX(IY)}
19151915
/*-----------------------------------------------------------------------.
19161916
| Instructions with the two-byte prefix DDCBh or FDCBh increment R by 2, |
19171917
| as only the prefix is fetched by opcode fetch operations (M1 cycles). |
1918-
| The remaining wto bytes are fetched by normal memory read operations. |
1918+
| The remaining two bytes are fetched by normal memory read operations. |
19191919
'=======================================================================*/
19201920

19211921
INSN(xy_cb_prefix)
@@ -1928,8 +1928,8 @@ INSN(xy_cb_prefix)
19281928
/*-----------------------------------------------------------------------------.
19291929
| In a sequence of prefixes DDh and/or FDh, it is the last one that counts, as |
19301930
| each prefix disables and replaces the previous one. No matter how long the |
1931-
| sequence is, interrupts can only be responded after all prefixes are fetched |
1932-
| and the final instruction is executed. Each prefix consumes 4 T-states. |
1931+
| sequence is, interrupts can only be responded to after all prefixes are |
1932+
| fetched and the final instruction is executed. Each prefix takes 4 T-states. |
19331933
'=============================================================================*/
19341934

19351935
INSN(xy_xy)
@@ -1975,7 +1975,7 @@ INSN(xy_xy)
19751975
/* MARK: - Instructions: Illegal */
19761976

19771977
/*----------------------------------------------------------------.
1978-
| The CPU ignores illegal opcodes prefixed with EDh; in practice, |
1978+
| The CPU ignores illegal opcodes prefixed with EDh. In practice, |
19791979
| they are all equivalent to two `nop` instructions (8 T-states). |
19801980
'================================================================*/
19811981

@@ -1988,11 +1988,11 @@ INSN(ed_illegal)
19881988
}
19891989

19901990

1991-
/*------------------------------------------------------------------------.
1992-
| Illegal opcodes with the prefix DDh or FDh cause the CPU to ignore the |
1993-
| prefix, i.e., the byte immediately following the prefix is interpreted |
1994-
| as the first byte of a new instruction. The prefix consumes 4 T-states. |
1995-
'========================================================================*/
1991+
/*-----------------------------------------------------------------------.
1992+
| Illegal opcodes with the prefix DDh or FDh cause the CPU to ignore the |
1993+
| prefix, i.e., the byte immediately following the prefix is interpreted |
1994+
| as the first byte of a new instruction. The prefix takes 4 T-states. |
1995+
'=======================================================================*/
19961996

19971997
INSN(xy_illegal)
19981998
{
@@ -2191,8 +2191,8 @@ Z80_API void z80_nmi(Z80 *self)
21912191
self->cycles += insn_table[DATA[0] = FETCH_OPCODE(PC)](self);
21922192
}
21932193

2194-
R = R_ALL; /* restore R7 bit */
2195-
return self->cycles; /* return consumed cycles */
2194+
R = R_ALL; /* restore R7 bit */
2195+
return self->cycles;
21962196
}
21972197
#endif
21982198

@@ -2433,10 +2433,10 @@ Z80_API zusize z80_run(Z80 *self, zusize cycles)
24332433
| An instruction supplied via the data bus is executed. Its first byte is |
24342434
| read during the INT acknowledge cycle (INTA). If it is an opcode prefix, |
24352435
| additional M-cycles of this kind are produced until the final opcode of |
2436-
| the instruction is fetched [1]. Each INT acknowledge cycle consumes as |
2437-
| many T-states as its normal M1 counterpart (the opcode fetch M-cycle) |
2438-
| plus the 2 wait T-states mentioned above [1]. Subsequent bytes of the |
2439-
| instruction are fetched by using normal memory read M-cycles [1,2], |
2436+
| the instruction is fetched [1]. Each INT acknowledge cycle takes as many |
2437+
| T-states as its normal M1 counterpart (the opcode fetch M-cycle) plus |
2438+
| the 2 wait T-states mentioned above [1]. Subsequent bytes of the |
2439+
| instruction are fetched by using normal memory read M-cycles [1,2], |
24402440
| during which the interrupting I/O device must still supply the data [2]. |
24412441
| The PC register, however, remains at its pre-interrupt state, not being |
24422442
| incremented as a result of the instruction fetch [1,2]. |
@@ -2692,8 +2692,8 @@ Z80_API zusize z80_run(Z80 *self, zusize cycles)
26922692
self->cycles += insn_table[DATA[0] = FETCH_OPCODE(PC)](self);
26932693
}
26942694

2695-
R = R_ALL; /* restore R7 bit */
2696-
return self->cycles; /* return consumed cycles */
2695+
R = R_ALL; /* restore R7 bit */
2696+
return self->cycles;
26972697
}
26982698

26992699

0 commit comments

Comments
 (0)