Re: A86: I've got questions about registers and interupts, maby someon


[Prev][Next][Index][Thread]

Re: A86: I've got questions about registers and interupts, maby someone can aswer?




At 13:28 1998-01-01 -0800, you wrote:
>
>What follows is a list of all the registers and the names/uses of them,
>as I know them could someone please correct this list if it is wrong.
>
>A  - acender

accumulator

>B  - base
>C  - counter
>D  - data
>E  - extra

Did you make up the names of those registers yourself?

>R  - What does the memory refresh register do?  Is the register a count
>down timer until memory refresh, then why is it a multiple of 2?  Or,
>does the register change after every register?  And of what uses is it,
>other than a pueso-random number generator (that is no good)

The R registers is updated after every instruction as I recall. Also,
I think it's increased with one after each instructions, but the
last bit is always clear (thus in range 0-127). I think I checked this
out once, but I'm not sure.

It has no practical purpose except for generating pseudo-random numbers.
Many Z80 emulators skips the emulation of the R register.

>I - Is I the interupt vector?  i.e. when an interupt occurs does the PC
>now point to I?  And how does that work I is only 8-bit.  And what does
>the interupt call do to the stack, and why do you have to return with an
>RETI ($ED$4D), or do I have that wrong?
>
>Interupt Modes
>There are 3 interupt modes im 0, im 1, and im 2.  Can someone tell me
>the difference between the 3?  I'm assuming that im 0 means no
>interupts, which BTW tends to kill the calc (I think because it
>disactivates (kinda) the get key routine).  What are the different
>interupts, I know the clock (200Hz) and the ON key, any one know of any
>others?

IM     What to when an interrupt occurs
---------------------------------------
 0     Get two bytes from the databus, make a jump to that address
       (or maybe it jumps to the word at that address? - it's usless
       on TI-8x calcs anyway)
 1     JP $38
 2     Get byte from databus. Read word at I*$100+<byte>. JP <word>

(note that 'jump' is in reality a 'call')

The bytes from the databus are, on the TI-8x calcs, random.

>Also, I have been thinking about getting the processor into a state
>where the ROM has no influence what so ever.  I think I can do it by
>starting a program that removes all the interupts and than I can have
>that same program recive a transver through the link port to fill the
>rest of the ram with code.  Just an idea.

"All the interrupts" - there are only one kind of interrupt on the
TI-8x calc (which is either IM 0, 1 or 2). Disabling the interrupts
is done by DI. But I don't know why you would want to do this.

[Technical note: on most Z80 processors, there are also a Non-Maskable
Interrupt, NMI, which can't be disabled. However, on TI-8x calcs,
there doesn't seem to be any such interrupt, because at $0066
(where the NMI interrupt handler start) there is no code (it's
in the middle of an instruction actually)]

--
Real name: Jimmy Mårdell                 
IRC......: Yarin                         
Email....: mailto:yarin@acc.umu.se      <-- NEW E-MAIL ADDRESS!!!!
Homepage.: http://www.algonet.se/~mja/


Follow-Ups: References: