Tutorial


Contents


Decoding example program

// ******** Main program ********// Here you can enter the image database nameStart: LD DE,PIC_Name CALL DecoderLoop: JP Loop
// ******** Decoder rutin ********Decoder:LD HL,($400C) INC HL LD A,1 LD (CharRep),A LD B,$20 LD C,$18Cycle1: LD A,(DE) INC DE BIT 7,A JP Z,NotComp RES 7,A LD(Temp),A LD A,(DE) INC DE LD(CharRep),A LD A,(Temp)NotComp:BIT 6,A JP Z,NotInv SET 7,A RES 6,ANotInv: LD(Char),ACycle2: LD A,(Char) LD (HL),A INC HL DEC B JR NZ,Forward LD (HL),$76 INC HL DEC C JR Z,ExitSub LD B,$20Forward:LD A,(CharRep) DEC A LD (CharRep),A CP 0 JR NZ,Cycle2 LD A,1 LD (CharRep),A JP Cycle1Char: db $00CharRep:db $00Temp: db $00ExitSub:RET