] 
] 
] According to the official documentation on the Z80 regarding
] interrupt mode 2 says that bit 0 of the lower address byte is
] always 0. To be short, only the 7 most significant bits are used.
] 
] I implemented it this way in NLMSX and UZIX works perfectly now.
] 
] > ] > So, it is sufficient to write your pointer to (I + 0xFF, 
] > I + 0x100), as shown 
] > ] > in Laurens code example.
] > ] Thanks for explaining.
] > ]  
] > ] > Kind regards,
] > ] > Alex Wulms
] 
] This should not work.
I'm fully aware of what most books about the Z80 say that the lowest bit is 
set to 0. Though, the most authorative source that I have ever seen 
(Programming the Z80 from Rodnay Zaks) does not say explicitly that it is the 
Z80 which masks the bit to 0. So it might very well be the role of the 
interrupt controller to set the bit to 0 but more as a convention then as a 
mandatory requirement. The convention in such case is that the pointer table 
is word-aligned. After all, in a table of 256 bytes you can put a most 128 
16-bits entries, so why not align them at the word-boundary?

Anyway, I have several programs in which I have programmed it like I 
described. For example in a program to test the behaviour of HR/VR flags of 
the VDP, I have used the following code fragment:

 di
 ld hl,myint
 ld (#d4ff),hl
 ld a,#d4
 ld i,a
 im 2
 ei

myint is placed at address #d062 by the assembler.

This code works on the MSX turbo R in Z80 mode and in R800 mode. The Z80 of 
the MSX turbo R is a clone, contained in the MSX Engine by Toshiba.
This code also works on the Philips V9938 MSX2 computer. This MSX has a real 
Z80. Or a clone by Nec. I do not remember.
This code does not work on fMSX 2.1, due to a bug in the interrupt driver. I 
have patched the interrupt handler of fMSX 2.1 on my computer but did not 
release the patch to the public (yet). Marat is completely redesigning the 
interrupt handler of fMSX 2.2 so it does not make much sence to release a 
patch for a soon (already?) obsolete version of fMSX.

I predict that this code will not work on your latest version of NLmsx, until 
you modify it as I explained earlier.


Kind regards,
Alex Wulms
-- 
Visit The MSX Plaza (http://www.inter.nl.net/users/A.P.Wulms) for info
on XelaSoft, Merlasoft, Quadrivium, XSA Disk images, the MSX Hardware list,
SD-Snatcher on fMSX, documentation and lots more.



****
MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED]
and put "unsubscribe msx [EMAIL PROTECTED]" (without the quotes) in
the body (not the subject) of the message.
Problems? contact [EMAIL PROTECTED]
More information on MSX can be found in the following places:
 The MSX faq: http://www.faq.msxnet.org/
 The MSX newsgroup: comp.sys.msx
 The MSX IRC channel: #MSX on Undernet
****

Reply via email to