Scaffolding for VT100 ChipSet

This commit is contained in:
Jeff Parsons 2016-08-02 06:50:25 -07:00 • committed by Jeff Parsons
commit 843d24c627
6 changed files with 124 additions and 69 deletions

View file

@ -794,8 +794,10 @@ Bus.prototype.addPortInputNotify = function(start, end, fn)
Bus.prototype.addPortInputTable = function(component, table, offset)
{
if (offset === undefined) offset = 0;
for (var port in table) {
this.addPortInputNotify(+port + offset, +port + offset, table[port].bind(component));
if (table) {
for (var port in table) {
this.addPortInputNotify(+port + offset, +port + offset, table[port].bind(component));
}
}
};
@ -951,8 +953,10 @@ Bus.prototype.addPortOutputNotify = function(start, end, fn)
Bus.prototype.addPortOutputTable = function(component, table, offset)
{
if (offset === undefined) offset = 0;
for (var port in table) {
this.addPortOutputNotify(+port + offset, +port + offset, table[port].bind(component));
if (table) {
for (var port in table) {
this.addPortOutputNotify(+port + offset, +port + offset, table[port].bind(component));
}
}
};