; http://CPCrulez.fr
;

         ORG #8000
;        ENT $

TABADR   EQU #A000
TAMPTR   EQU #5000
ECRAN    EQU #C000
;
CREADRES LD HL,#B800
         LD   DE,#C050
         LD   B,200
         LD   IX,TABADR
CREAD    LD   A,8
         ADD  A,H
         LD   H,A
         JR   NC,RANGAD
         ADD  HL,DE
RANGAD   LD   (IX+0) ,L
         LD   (IX+1) ,H
         INC  IX
         INC  IX
         DJNZ CREAD
LOADIMG  LD   HL,NOM
LONG     LD   B,NOMI-NOM
         LD   DE,TAMPTR
         CALL #BC77
         LD   HL,TAMPTR
         CALL #BC83
         CALL #BC7D
INIT     LD   HL,TAMPTR
         LD   DE,ECRAN
         LD   BC,#50
         LDIR
         LD   IX,TAMPTR+#50
         LD   IY ,TAMPTR+#5A
         LD   C,0
GETAD    LD   HL,TABADR
         LD   A,C
         SLA  A
         JR   NC,GETADI
         INC  H
GETAD1   LD   L,A
         LD   E, (HL)
         INC  HL
         LD   D, (HL)
         INC  HL
         PUSH DE
         LD   E, (HL)
         INC  HL
         LD   D, (HL)
         POP  HL
         LD   A,#3E
         LD   (SUICP+3),A
         LD   B,80
;
CPLIG    LD   A, (SUICP+3)
         ADD  A,8
         CP   #86
         JR   NZ,METOP
         INC  IX
         LD   A, #46
METOP    LD   (SUICP+3) ,A
SUICP    BIT  0, (IX+O)
         JR   Z,SUIT
         LD   A, (IY+O)
         INC  IY
         JR   META
SUIT     LD   A, (HL)
META     LD   (DE) ,A
         INC  HL
         INC  DE
         DJNZ CPLIG
         PUSH IY
         POP  IX
         LD   DE,10
         ADD  IY,DE
         INC  C
         LD   A,C
         CP   199
         JR   NZ,GETAD
;
FIN      RET
NOM      DM     DES2.BIN
NOM1
