Studies - M. Lazutov: The modernization program font. Program encode / decode block codes. The effect of the attributes.

ZX Review #3-4
(C) Lazutov M., 1996
g.Tuchkovo, MO


   This program of modernization of the font was "pulled" from
Boot to the game "DAM Busters"
140.

     ORG 40000

     LD DE, 41000

     LD HL, 15616

     PUSH DE

     LD BC, 768

     LDIR

     POP HL

     PUSH HL

     LD B, 96
M2 PUSH BC

     LD B, 4

     INC HL

     INC HL

     INC HL

     INC HL
M1 LD A, (HL)

     LD C, A

     SLA A; can be replaced

               ; At SRA A

     OR C

     LD (HL), A

     INC HL

     DJNZ M1

     POP BC

     DJNZ M2

     POP HL

     DEC H

     LD (23606), HL

     RET
2

   I also propose that the simplest
program that "encodes"
block codes, and when called again - decodes.
140.

     LD HL, START; Initial
; Address encoded block.

     LD BC, LEN; Length
; Encoded block.
M1 LD A, (HL)

     CPL

     LD (HL), A

     INC HL

     DEC BC

     LD A, B

     OR C

     JR NZ, M1

     RET


  And this creates the effect of
attributes:


     ORG 40000

     ENT $

     CALL 3435
M0 LD HL, 22528

     LD DE, 768
M1 LD A, (23560)

     CP 1932

     RET Z

     LD A, (HL)

     OUT (254), A

     INC A

     RRC A

     RRC A

     XOR L

     LD (HL), A

     INC HL

     DEC DE

     LD A, D

     OR E

     JR NZ, M1

     JR M02
; ATTR EFFECT
; BY MAXSOFT
; (C) 1996

********************************