Hi all!

As I said in another mail, I'm interested on assembler programming on MSX.
I'm started with simple programs for MSX1, and I have a little problem:
I want to write data to the Pattern Table of Screen 2. Doing it from BASIC
with VPOKE and VPEEK works good, but in assembler not. I've write this
little program:

START:      EQU &HA000 ; Start address
SCREEN2:    EQU &H72 ; SCREEN 2 BIOS routine
VPOKE:      EQU &H4D ; VPOKE BIOS routine
PAT2:       EQU &H0000 ; SCREEN 2 Pattern Table Address
COL2:       EQU &H2000 ; SCREEN 2 Color Table Address
NOM2:       EQU &H1800 ; SCREEN 2 Name Table Address
NUMCHAR:    EQU 4      ; Number of chars to redefine

            ORG START
            CALL SCREEN2
            LD HL, PAT2
            LD B, NUMCHAR*8-1
            LD DE, DEFCHAR
LOOP:       LD A, (DE)
            CALL VPOKE
            INC HL
            INC DE
            DJNZ LOOP
            LD A,(DE)
            CALL VPOKE
            RET


DEFCHAR:    DB *** Data of the new chars ***

Its function is to redefine NUMCHAR characters, that is, to write NUMCHAR*8
bytes in the Pattern Table of SCREEN 2.
But... this doesn't work.
What is wrong?

Thanks!

P.S.: Now, I see a possible problem... the VPOKE BIOS routine modifies the
HL register?

+------------------------------------------------+
|            Toni Burguera Burguera              |
+------------------------------------------------+
| E-mail :    [EMAIL PROTECTED]               |
+------------------------------------------------+
|            9D - La Novena Dimensio             |
| http://www.geocities.com/Area51/Dimension/9812 |
+------------------------------------------------+


****
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