Learning to code "Veschi" - II - A universal subroutine for printing with a 32*24 font.

Impulse #09
               
                                         
Learning to code "Veschi" - II
(C) Wax Imamota Hello man! Znova on the line Maxi- mka UboMatkawith a new cooler. How and I was disappointed in the last issue of IMPULSE today I will present "Universal sub- printing program in 32*24" font. I want to explain in the best possible light about this procedure, the whole point is that TA- WHO HAS NOT BEEN ON SPECIALS YET, apparently about this no one except me has guessed yet. True, the program has 1 drawback, it calculates for memory no less than 768 KB, because. one a character takes up at least 6912 Bytes, Therefore, with 96 symbols used, the result is available: * 96 number of characters ──────────── + 41472 Result 6912*6 62208 Result 6912*9 ──────────── 663552 bytes (Result 6912*6+6912*9) i.e. about 640 kilos of RAM. In my work I use the most the more popular Spectrum-compatible model computer with large memory, of course but SPECTRUM TURBO++ with expansion port TR-DOS #FFF7, I recommend everyone to switch look at this model. Well, I won’t hesitate, I’ll start prog- pammupobahue: (and here turn on the 4*8 font) model. tiny codeORG 16384 ;relocated address LD IY,TEKST ;setting the vector permctpa "IY" ;to specify data for printing BEGINS LD A,(IY+0) ;memory text fragment SUB 32 ;attempt to determine the value in the fragment 0R A ;space (SRASE) JP NZ,GAGAR ;if successful, then jump to "GAGAR" SUB A ;command mdentmchna XOR A (simply for ;variety) XOR 255 ;translation of 6mtob to o6pathoe ;high-modal state LD C,A ;loading the counting floor permctpa bC GAGA EQU $+1 ;not all assemblers support this, ;but GENS, yes! I advise you to move on. LD A,9 ;number of spaces in the text ADD A,C ;very sophisticated decrement LD 0FFSET (GAGA),A ;memorized INC C SR C JR NZ,GAGARI RET Z ;output if there are ending spaces GAGAR CALO GAGARS ;in general, print call GAGARI INC IY ;add to text 1 JR BEGINS ;reverse jump GAGARS LD A,(IY+0) ;text restoration LD DE,6912 ;very slow procedure o6pa6otkm LD HL,#C000 ;m calculating integers LD B,A ;expressed, really not my pa6ota LD A,0 ;MZ articles in ECXO-II were torn out GAGARIN ADD HL,BC ; JR NC,GAGARINA;I'm not fully into it yet INC A ;figured it out, so refrain GAGARINA DJNZ GAGARIN ;from kommehtapmeb different, more LD C,0 ;I'll tell you a joke: LD DE,#4000 ;----------------------------------- GAGA2 0R A ;A man is riding in a car, together with nmm ;Bmbmzyanka GLASHA is riding. Myzhykabrake JR Z,GAGA2 ;gamshnmk with brilliant mm hapykabhmkamm: SBC HL,DE ;-Staff Police Inspector Junior mmchman JR NC,GAGA1 ; Myasnmkov Stanmslav Vladmslavovmch DEC A ; 1978 year of birth of the village of Koverdyakm, GAGA1 INC C ; provide your documents to the document JR GAGA2 ; you're crazy! GAGA2 LD DE,#8000 ;-This is not a bmbmzyanka, this is a ZASCHEKANETS, here CALL EXCHANGE ; look: EX AF,AF` ; GAGACH LD A,(HL) ;Man 6bet ee on the head rusty LD (DE),A ;with a hammer m ZACCHEKANETS began gently INC HL ;suck nmcbky y man INC DE ; LD BC,#8000+6912 ;Man (GAYOBOM): EX HL,DE ;-Do you want nonpo6obatb? 0R A ; And he’s GAYOBY (brazenly like this): SBC HL,BC ;-No, I don’t like being hit on the head! JR Z,GOOD ;-------------------------------------- ADD HL,BC ; EX HL,DE ;This is the meaning of the matter, and there was also LD BC,0 ;case: /IMPULSE: Cut by ZX-WORD/ SBC HL,BC JR NC,GAGAЗ EX AF,AF` INC A CALL EXCHANGE EX AF,AF` LD HL,#C000 JR GAGACH GAGAZ JR GAGACH GOOD XOR A ;Output the virtual screen to CALL EXCHANGE ;2 screen LD A,23 OUT (#FD),A ;kctatm this cnoco6 works from the top LD HL,#C000 ;memory is quite working, how many times LD DE,#8000 ;tried it, I got yce furychmt ! LD BC,#4000 LDIR RST 56 ;kctatm saving a byte, if I would RET ;made JP 56, then we were lost ;byte, I’ll explain: JP 56 ;C3 38 00 RST 56 ;F8 RET ;C9 EXCHNGE PUSH HL ;very competent switching of countries PUSH DE ;memory, assigned to mz ECH0 YI PUSH BC ;(not me ee pmcal) PUSH AF EXX ;remember for all fire protection EX AF,`AF ;registrations of the center microprocessor PUSH HL ; PUSH DEPUSH B.C PUSH AF EXX ЭХ AF,`AF CALL P0RT ;call procedure EXX ;I don't remember switching ЭХ AF,`AF POP AF POP BC POP DE POP HL EXX ЭХ AF,`AF POP AF POP BC POP DE POP HL JP 56 P0RT PUSH AF AND 7ADD A,#08 LD BC,32765 ;trying to correct the strangeness OUT (C),A ; POP AF AND #38 CPL LD BC,#FFF7 ;actually, my extension port LD IX,10835 ;a here ctomt command "out ts,a" PUSH IX JP 15664 TEKST DEFB "THE THIS ARE BEST PR0GA AT IN 0F THE WORLD"

Share your thoughts about the article