You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As it is, this opcode uses the current value of the program counter as the port to request (meaning that its function depends on its position in the program, which it should not), instead of requesting the next byte from memory and using that value as the port to request. (It also then treats the next byte as a new opcode, which is especially problematic.)
I came up with my own solution (comparing the implementation for OUT (n1),A [opcode D3] with what was already there for DB, and making modifications until it worked like I thought it should), but had kept it to myself because I just didn't know enough to know if I was doing it right. But then I found Goran Devic's work and in particular here, and I saw that it looked similar to what I had figured out.
As it is, this opcode uses the current value of the program counter as the port to request (meaning that its function depends on its position in the program, which it should not), instead of requesting the next byte from memory and using that value as the port to request. (It also then treats the next byte as a new opcode, which is especially problematic.)
I came up with my own solution (comparing the implementation for OUT (n1),A [opcode D3] with what was already there for DB, and making modifications until it worked like I thought it should), but had kept it to myself because I just didn't know enough to know if I was doing it right. But then I found Goran Devic's work and in particular here, and I saw that it looked similar to what I had figured out.
Originally:
00030000 00031000 00030000 00000020 88000400 00031200 00030000 00000408
88000600 88000040 00800200 00800000 00800200 00019000 88000800 88004000
My fix:
00819000 00819200 00000020 88000400 00031200 00030000 00000408 88000600
88000040 00800200 00800000 00800200 00019000 88000800 88004000 00000000
I am very new to this, and I welcome any corrections or further insight. Thank you.
The text was updated successfully, but these errors were encountered: