[A83] Re: im 2
[Prev][Next][Index][Thread]
[A83] Re: im 2
Or you can use addresses that, even if you swap them, always point to a safeRam location where you can store your routine. Like on the 83- this could be 8687h and 8786h, which both lay in the statVars ram area.
> ----------------------------------------
> From: Michael Vincent <hookman@worldnet.att.net>
> Sent: Wed Sep 05 21:42:05 GMT+02:00 2001
> To: <assembly-83@lists.ticalc.org>
> Subject: [A83] Re: im 2
>
>
>
> You have to use addresses like $9898 on the 83+/SE...The lower 8 bits for
> the interrupt table you can't control.
>
> Michael Vincent
> Detached Solutions - www.detacheds.com
> Radical Software - www.radicalsoft.org
> ----- Original Message -----
> From: "Peter-Martijn Kuipers" <hyper@hysoft-automation.com>
> To: <assembly-83@lists.ticalc.org>
> Sent: Wednesday, September 05, 2001 11:07 AM
> Subject: [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).
> >
> > This I do not know, but tell me how you checked it out, and if you checked
> > the address that was read from the pointer table, it might be that the
> last bit
> > is discarded.
> >
> >
> >
> >
> > >
> > >
> > > > ----------------------------------------
> > > > 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
> > >
> > >
> > >
> >
> >
> >
>
>
>
-----------------------------------------------------
Mail.be, Free WebMail and Virtual Office
http://www.mail.be