Miracle #03
16 июля 1999 |
|
kodit Who's there? - Fast 42 print: fast how to print 42 characters in a row.
(C) Death Moroz --------------- Rapid procedure for printing 42 characters per line I would like to share some of my researches in the field of O 42-x characters per line, all of which are is that the memory created in March additional font, procedures for their create approximately as follows: FONT EQU ADRES; ADDRESS THE BASIC FONT FONT2 EQU 49152 FONT3 EQU FONT2 +4096 FONT4 EQU FONT3 +4096; ADDRESSES FUTURE FONTAINE , Their sizes will be in 2 ; Times the original ; PROCEDURE FOR THE ESTABLISHMENT OF FONT offset 6 ; Bit from familiarity ORIGIN: LD DE, FONT2 LD HL, FONT LD BC, 2048 F_CR1 LD A, (HL) RLCA RLCA PUSH AF AND 3 LD (DE), A INC DE POP AF AND 252 LD (DE), A INC DE INC HL DEC BC LD A, B OR C JR NZ, F_CR1 ; PROCEDURE FOR THE ESTABLISHMENT OF FONT offset 4 ; BITA From the beginning familiarity: LD DE, FONT3 LD HL, FONT LD BC, 2048 F_CR2 LD A, (HL) RRCA RRCA RRCA RRCA PUSH AF AND 15 LD (DE), A INC DE POP AF AND 240 LD (DE), A INC DE INC HL DEC BC LD A, B OR C JR NZ, F_CR2 ; PROCEDURE FOR THE ESTABLISHMENT OF FONT offset 6 ; Bit from familiarity ORIGIN: LD DE, FONT4 LD HL, FONT LD BC, 2048 F_CR3 LD A, (HL) RRCA RRCA PUSH AF AND 63 LD (DE), A INC DE POP AF AND 192 LD (DE), A INC DE INC HL DEC BC LD A, B OR C JR NZ, F_CR3 Here is an example output line fonts, created in this way. At the entrance to the HL address of the text, the screen should be cleared. LD (SP_ +1), SP BEGIN LD A, (HL) CP # 0D; line terminator JP Z, SP_ INC HL EXX EX AF, AF ' S_ADR LD DE, # 4000; which to dump BITS LD A, 0, offset from the beginning familiarity OR A JR Z, BIT0 CP 6 JR Z, BIT6 CP 4 JR Z, BIT4 XOR A LD BC, FONT4 JR S_OUT BIT4 LD A, 2 LD BC, FONT3 JR S_OUT BIT6 LD BC, FONT2 LD A, 4 S_OUT LD (BITS +1), A EX AF, AF ' LD L, A LD H, 0 ADD HL, HL ADD HL, HL ADD HL, HL ADD HL, HL ADD HL, BC LD SP, HL EX DE, HL ; POP BC; LD A, C; OR (HL); LD (HL), A; REPEAT INC L; 4 LD (HL), B; TIMES INC H; POP BC; LD (HL), B; DEC L; LD A, C; OR (HL); LD (HL), A; INC H; ; LD A, (S_ADR +1) INC A LD (S_ADR +1), A EXX JR BEGIN BIT0 EX AF, AF ' LD L, A LD H, 0 ADD HL, HL ADD HL, HL ADD HL, HL LD BC, FONT ADD HL, BC LD SP, HL EX DE, HL ; POP BC; LD (HL), C; REPEAT INC H; 4 LD (HL), B; TIMES INC H; ; LD A, 6 LD (BITS +1), A EXX JP BEGIN SP_ LD SP, 0 RET Lastly, ladies primerchik protsedurki setting attributes in the 42-character line (without a single pop / push 'a ;)).: LD BC, TEXT_ADR LD DE, # 5800; ADDRESS ATTRIBUTE LD A, 68; default color LD (COLOR +1), A A_S0 LD HL, A_TABL A_S1 LD A, (BC) INC BC CP 1932 JR NC, A_K CP 3; CODE END OF TEXT RET Z CP # 0D; CODE END OF LINE JR Z, A_N CP # 10; CODE CHANGE ATTRIBUTE JR Z, A_C ; A_K LD A, E EX AF, AF ' LD A, E ADD A, (HL) LD E, A COLOR LD A, 0 LD (DE), A EX AF, AF ' LD E, A INC HL JR A_S1 A_C LD A, (BC) LD (COLOR +1), A INC BC JR A_S1 A_N LD A, E EX AF, AF ' LD A, E ADD A, (HL) LD E, A LD A, (COLOR +1) LD (DE), A EX AF, AF ' LD E, A LD HL, 32 ADD HL, DE EX DE, HL LD A, D CP # 5B JR C, A_S0 RET A_TAB DB 0,0,1,2,3,3,4,5,6,6,7,8,9,9,10,11 DB 12,12,13,14,15,15,16,17,18,18,19 DB 20,21,21,22,23,24,24,25,26,27,27 DB 28,29,30,30,31,31 I take this opportunity to express their opinion on the "assemblers we choose: for me personally steepness of the assembly is determined not speed of compilation, not the presence of the heap all setups and overlays in the form of minerals 'Co, and the speed and convenience of the editor, koim, in my opinion, is the XAS, because only you can dial: (Hl) .40 and get: ld (hl), # 40 All the vaunted alasm flunked would you lots of questions, and the newly-born storm has such a paltry amount of free memory, that his whole frame- Scrolling is reduced to nothing (well, that though there is no Multicolor screen Savery;)) For the same XAS'a enough not to spoil a Bank ... And on the macro, multi, tag lines for fast and things I do "silent". In short, the guy who made it enjoys, I understand. All who disagree, please contact the Editor ...%)
Other articles:
Similar articles:
В этот день... 23 November