Added printing signed integers
This commit is contained in:
parent
8aaff235cd
commit
4ebf74a04d
|
@ -7,7 +7,12 @@ from .emulator import Device
|
||||||
class tty(Device):
|
class tty(Device):
|
||||||
|
|
||||||
def __setitem__(self, index: int, value: int):
|
def __setitem__(self, index: int, value: int):
|
||||||
if index & 0xf == 0xe:
|
if index & 0xf == 0xd:
|
||||||
|
if value & 0x800:
|
||||||
|
print(((~(value & 0x7FF)) + 1) * -1)
|
||||||
|
else:
|
||||||
|
print(value)
|
||||||
|
elif index & 0xf == 0xe:
|
||||||
print(value)
|
print(value)
|
||||||
elif index & 0xf == 0xf:
|
elif index & 0xf == 0xf:
|
||||||
print(chr(value), end='')
|
print(chr(value), end='')
|
||||||
|
|
Loading…
Reference in New Issue