Code on! - a procedure for quickly printing 42 and 64 characters per line.

Funeral #01
                                          
 QUICK PRINTING 42, 64     
        CHARACTER IN A LINE.       
                                          
                                          
(C) Eraser/Delirium Tremens               
__________________________________________
                                          
                                          
ah, people! Well, how do you like our shell?
It seems normal, although in the future it will be new
improved (we already have some ideas...). Well, now let's move directly to the article itself... Somehow, out of idleness, I decided to rummage through variousmedia: read: "print 42 characters", "print 64 characters". I think - cool, compare nude with my own... But it turns out to be a bummer. The speed is amazing (even in the shell Text Makerhigher speed!). Oh well. Here I actually decided to publish ultra fast printers (they are used inTM and es- naturally in "peepers" of our magazine). Let's start with 42 - characters. Linear font: ;+------------------------------------------------------------+ ;│ Ultra-Fast 42-character typewriter: Eraser/Delirium Tremens │ ;+--------------------------------------------------------------+ ;│Input: HL - print address on screen │ ;│ #ХХ28 - address of location of data for printing (42 byte)│ ;│Output: HL - next address. lines on the screen │ ;│ DE - address of location of data for printing │ ;+--------------------------------------------------------------+ ORG #C000 FONT42 + INCBIN "font_u" ORG #b028 SPACE DEFB "*************** FUNeral #01 **************" Start LD HL,#4000 CALL PR_42 RET
PR_42 PUSH HL XOR A LD (HL),A INC H LD (HL),A INC H LD (HL),A INC H LD (HL),A INC H LD (HL),A INC H LD (HL),A INC H LD (HL),A INC H LD (HL),A POP HL LD В,'FONT42 LD DE,SPACE Loop_1 LD A,(DE) INC Е LD C,A
LD A,(ВС) RRA RRA OR (HL) LD (HL),A LD A,(DE) INC Е LD C,A LD A,(ВС) INC L LD (HL),A LD A,L CPL AND #1F
JR Z,Loop_2 LD A,(DE) INC Е LD C,A LD A,(ВС) RLA LD C,A LD A,#00 RLA RL C RLA OR (HL) LD (HL),A INC L LD (HL),C LD A,(DE) INC Е LD C,A LD A,(ВС)
LD C,#00 RRARRA RRA RR C RRA
RR C OR (HL) LD (HL),A INC L LD (HL),C
JP Loop_1 Loop_2 LD A,L AND #Е0 LD L,A INC H INC В LD A,H AND #07 LD Е,#28 JR NZ,Loop_1 LD A,L ADD A,#20 LD L,A RET C LD A,H SUB #08 LD H,A RET ORG Start
А теперь 64 - символа. Напечатать их го- раздо проще,т.к. нет никакой "заумной" ro- tations, etc. etc. Still very elemental tary: one acquaintance includes two sym- ox (4*8)... The font, as for42 characters,is linear. One matrix contains two copies of the symbol ox: ;+--------------------------------------------------------------+ ;│ Ultra-Fast typing machine for b4 characters: Eraser/Delirium Tremens │ ;+--------------------------------------------------------------+ ;│Input: HL - print address on screen │ ;│DE - address of location of data for printing (64 byte)│ ;│Output: HL - next address. lines in curmehte° │ ;+--------------------------------------------------------------+ ORG #C000 FONTbCH +INCBIN "b4_TAB" ORG #b000 Start LD HL,#4000 LD DE,SPACECALL PRT_б4 RET SPACE DEFB "*************************** FUNeral #01 *********" DEFB "***************" PRT_б4 LD В,#40/#02 Loop_б4 PUSH ВС LD A,(DE) CALL PR_б4_L INC DE LD A,(DE) CALL PR_б4_R INC DE POP ВС DJNZ Loop_б4 RET PR_б4_L LD В,'FОNTбЧ; Печать в левой части знакоместа LD C,ADUP 7 LD A,(ВС) AND #F0 LD (HL),A INC H INC В EDUP LD A,(ВС) AND #F0 LD (HL),A LD A,H SUB #07 LD H,A RET PR_б4_R LD В,'FОNTбЧ; Печать в правой части знакоместа LD C,A
DUP 7 LD A,(ВС) AND #0F OR (HL) LD (HL),A INC H INC В EDUP LD A,(ВС) AND #0F OR (HL) LD (HL),A LD A,H SUB #07 LD H,A INC L RET ;
ORG Start
Р.S. I do not put my copyright on these products procedures, because it would be the same assign to yourself (C) to the DOWN_HL procedure;)

Share your thoughts about the article