Make sure HALT_SEQUENCE works even if only one byte
This commit is contained in:
parent
5a1558c3d7
commit
6b3b41a0c8
1 changed files with 4 additions and 2 deletions
6
kl11.py
6
kl11.py
|
@ -38,8 +38,8 @@
|
|||
# which is Unicode U+00E7, c--cedilla, will cause the emulation to
|
||||
# halt as if the physical console HALT toggle had been selected.
|
||||
# This sequence was chosen because it is option-C on a mac; see
|
||||
# HALT_BYTES
|
||||
# to override this choice. NOTE: the first N-1 bytes of the HALT_BYTES
|
||||
# HALT_SEQUENCE
|
||||
# to override this choice. NOTE: the first N-1 HALT_SEQUENCE bytes
|
||||
# will still be transmitted to the emulation, the HALT will only occur
|
||||
# once the full sequence has been received.
|
||||
#
|
||||
|
@ -250,6 +250,8 @@ class KL11:
|
|||
if in_halt_sequence is None:
|
||||
if b == self.HALT_SEQUENCE[0]:
|
||||
in_halt_sequence = 1
|
||||
if len(self.HALT_SEQUENCE) == 1:
|
||||
return
|
||||
elif b == self.HALT_SEQUENCE[in_halt_sequence]:
|
||||
in_halt_sequence += 1
|
||||
if len(self.HALT_SEQUENCE) == in_halt_sequence:
|
||||
|
|
Loading…
Add table
Reference in a new issue