>
> ========================================
>
> First, you will have to put your interrupt-routine on an
> adress of which the
> MSB is the same as the LSB, so for example #C0C0
>
> Then, fill an area starting at an adress of which the LSB is #00 (e.g.
> #C200) with 257 times the MSB (or the LSB) of your interrupt-routine's
> adress.
>
> Then set I to the MSB of the jump-table.
>
> Q&A:
> ====
> Q: Why must the MSB equal the LSB?
> A: Because on computers which use IM2 (PC uses something like it), the
> number on the databus MUST be a multiple of 2. On MSX however, this is
> undefined, so the adress in the jump-table can also be an odd number.
>
You need that because you use the statement:
IntJumpTable: DS 257, Interrupt / 256
And it is more convenient to fill the table with all 0xC0 's for the
HIGH and the low address.
You can use different values, but then you would have to use more than
one interrupt routine. Which costs more memory.
Frits
> Q: Why 257 times the value?
> A: Because if 255 is on the databus, it will get the
> jump-adress from #C2FF
> and #C300.
>
>
> Example routine:
>
> org #C000
>
> Start: ld a,IntJumpTable / 256
> ld i,a
> IM 2
> ret
>
> FILLAREA: DS Interrupt - FILLAREA
>
> org #C0C0
>
> Interrupt: push af
> in a,(#99)
> pop af
> ei
> ret
>
> FILLAREA2: DS IntJumpTable - FILLAREA2
>
> org #C200
>
> IntJumpTable: DS 257, Interrupt / 256
>
>
> ~Grauw
>
>
> --
> >>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<
> email me: [EMAIL PROTECTED] or ICQ: 10196372
> visit the Datax homepage at http://datax.cjb.net/
> >>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<
>
>
> ****
> 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
> ****
>
****
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
****