PDA

Просмотр полной версии : Эмуляция инструкции IM 0/1



DZh
08.03.2008, 13:48
Всем привет, а женскую половину ещё и с праздником!

У меня такой вопрос, касающийся эмуляции инструкции IM 0/1 (код ED4E и ED6E): в каких случаях IM 0, а в каких IM 1?

Читал "The Undocumented Z80 Documented", но недопонял смысл:

According to Gerton Lunter1:
The instructions ED 4E and ED 6E are IM 0 equivalents: when FF
was put on the bus (physically) at interrupt time, the Spectrum
continued to execute normally, whereas when an EF (RST 28h) was
put on the bus it crashed, just as it does in that case when the Z80
is in the ocial interrupt mode 0. In IM 1 the Z80 just executes a
RST 38h (opcode FF) no matter what is on the bus.

Спасибо.

DDp
09.03.2008, 09:20
Если эмулируется устройство(компьютер), у которого в цикле прерывания на шине данных установлена комбинация FFh, то не имеет значения в каком режиме находиться процессор (IM 0 или IM 1). В обоих случаях выполняется комманда RST 38h.