Class ASCIIConsole

Basic class that implements a console that adapts stdin/stderr as Input/Output. This console doesn't make use of any interrupt signal of the emulator, so, you'll have to poll the console to get it's input. The first byte is the input register of the console and the last byte is the output register, both of the bytes will be zero if there's no data on the registers.

class ASCIIConsole
  : BusComponent ;

Methods

NameDescription
popCharacter () Get a character from the output of the console.
pushCharacter (Character) Add a character to the character stack of the console.
setBaudrate (Baudrate) Change the baudrate of the console.
thereIsOutput () Check if there's any output from the console.
waitBaud () Creates a delay for the time space of a character.
getAuthor () Returns a string with the component author's name.
getName () Returns a string with the component's name.
getSize () Returns the bus component size on the address bus, this cannot be variable at execution time, if the component's size changes, the emulator will present undefined behaviour.
read (Address) Read a byte from this bus component, like in the write method, the address will be translated.
write (Address, Data) Write data to this bus component. The address will be translated from the real address to a zero-indexed address.