[A83] Re: im 2
[Prev][Next][Index][Thread]
[A83] Re: im 2
Normally the least significant bit should indeed be 0, but on the 83- this isn't the case. It is sometimes 1, so you can only use addresses like $8787. So now I want to know if this is also the case on the 83+(SE).
> ----------------------------------------
> From: Peter-Martijn Kuipers <hyper@hysoft-automation.com>
>
> Fron your explanation, I understand this:
>
> mem_address_$HH00:
> $HH00: .dw pointer1
> $HH02: .dw pointer2
> $HH04: .dw pointer3
> $HH06: .dw pointer4
> $HHxx: .dw ...
>
> ;if you do:
> ld i,HH ; HH is highest bytes of mem table above.
> im 2
>
> ; then if an interrupt occurs, the interrupt device produces an 8 bit number,
> ; e.g. 06h, whigh is used as the lower bytes. (the produced byte itself,
> ; I'll refer to as $II.
> ; the address would then become $HH06. The word from that place is read,
> ; and a jump takes place to the address the word at $HH06 references.
>
> ; Naturally, the lowest bit of $II would be 0 (producing an even number),
> ; because a read from an uneven address would give an invalid pointer address
> ; this could be interpreted as a 7-bit number.
>
> ; But when you say that an 8-bit number is produced, you mean that the lowest
> ; bit (bit 0) of $II is sometimes 1 too, thus producing an odd address???
> ; Or do you mean that it is an 8-bit byte with bit 0 on 0?
>
> --Peter Martijn
>
> >
> > According to the cpu manual, when you use interrupt mode 2, you should create a pointer table somewhere in memory, then put in the I reg the most significant byte. When an interrupt happens the Z80 takes the I register and the interrupting device provides the lower 8 bits. Then it jumps to the pointer stored at the address that is formed. The manual also says that the lowest bit provided should always be 0 to create even numbers, because pointers are 16 bit and therefore take 2 bytes. For now I've discovered that this isn't the case on the 83-. The interrupting device seems to generate an 8 bit numbers (not 7). But is this also on the 83+(SE)?
> >
> > --Tijl Coosemans
> > -----------------------------------------------------
> > Mail.be, Free WebMail and Virtual Office
> > http://www.mail.be
> >
> >
> >
>
>
>
-----------------------------------------------------
Mail.be, Free WebMail and Virtual Office
http://www.mail.be
Follow-Ups:
- [A83] Re: im 2
- From: Peter-Martijn Kuipers <hyper@hysoft-automation.com>