;* MAKE A BITMAP BY COMPARING TWO FILES .Z80 ;Z80 NMEMONICS LD HL,3000h ;ONE FILE LD DE,4000h ;THE OTHER FILE LD BC,8000h ;BYTE OF THE BITMAP LD A,8 ;BIT COUNT LD (7FFFh),A ;STORE BIT COUNT BITCK: LD A,(DE) CP (HL) ld a,(bc) ;get byte being assembled in bit map JR Z,SAME SET 7,a ;make high bit a 1 JR BYTECK SAME: RES 7,a ;make high bit a 0 BYTECK: ld (bc),a ;store assembled byte back into bit map ld a,(7FFFh) ;count of bits done dec a JR NZ,samebt ;if 8 bits not done in this byte set 3,a ;make count 8 again inc bc ;point to next byte in bit map samebt: ld (7FFFh),a ;store bit count ld a,(bc) ;get byte being assembled in bit map SRA a ;shift all bits right one place ld (bc),a ;store assembled byte back into bit map INC HL ;one file INC DE ;the other file LD A,H ;file began at 3000 h cp 40H ;SET TO DO 1000 H BYTES jr nz,bitck JP Z,0 ;WARM BOOT end