At 10:18 AM 06/13/98 +0200, you wrote:

>The MSX2 Technical Handbook sais:
>
>AVCSAV (FAF7H, 1)
>  contents: reserves AV control port
>
>EXBRSA (FAF8H, 1)
>  contents: SUB-ROM slot address
>
>Then, the EXBRSA is the FAF8, not FAF7. There is an error in the assembler
>listing, or in my version of the Technical Handbook?

There is no error.

Register IY is a 16-bit register. A slot ID is only 8 bits wide. The
highest 8 bits of IY are the ones where the slot ID should be stored. Let's
call the high byte of IY "IYh" and the low byte "IYl".

In memory, the Z80 always stores 16-bit values "low byte first".
What "ld IY,(0faf7h)" does is this:
ld IYl,(0faf7h)
ld IYh,(0faf8h)

So, the slot ID is read from 0faf8h to IYh, everything works fine.

Bye,
                Maarten

****
MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put
in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the
quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
****

Reply via email to