correcting buffer for reading and writing

This commit is contained in:
Thiago Auler dos Santos 2017-11-26 01:54:43 -02:00
parent eb8b6656ee
commit 5332a3a9e7
1 changed files with 2 additions and 16 deletions

View File

@ -48,6 +48,8 @@ db read_byte(dw address)
}
else if (address == 0xD010)
{
// when reading from keyboard buffer,
// its status control is disabled again
keyboard_control = 0x00;
return keyboard_buffer;
}
@ -59,10 +61,6 @@ db read_byte(dw address)
{
return display_buffer;
}
else if (address == 0xD013)
{
return display_control;
}
else if (address >= 0xFF00 && address <= 0xFFFF)
{
// wozmon ROM
@ -99,22 +97,10 @@ void write_mem(dw address, db data)
// 4KB memory RAM
ram_memory[address] = data;
}
else if (address == 0xD010)
{
keyboard_buffer = data;
}
else if (address == 0xD011)
{
keyboard_control = data;
}
else if (address == 0xD012)
{
display_buffer = data;
}
else if (address == 0xD013)
{
display_control = data;
}
// any other addressed memory will be ignored on write
}