ZX Pilot #38
31 мая 2000 |
|
Coding - write a simple news ticker.
C O D I N G (C) Z-ZERO In order to dispel ignorance, Split ignorance and darkness - Take a picture of the universe, And stupid we look, what's what ... Brothers Strugatsky "Monday begins on Saturday. " "... It's just Marasmus! Z-Zero SYSTEMS inc. O-e-s! What am I, he wondered, was the clever phrases raskidyvatsya? God forbid a the night is! In other matters clever phrases and so good that they're smart ... Stop, stop, stop! Imagine how (well, we assume, Sergius Puzzler) raised his hands to heaven, with a prayer ... Well, something in the style: "Again!" Or anyone else, but with the words: "Etis you - a failure!" I have them chudestno understand, but when the "itching" - should be given yield to emotions, that meanders not overheated! OOPS! I forgot what vacancies section! Get started! Every time I open the next, taken from priyatelelya do not know how many times, Room Revyuhi - I shudder with horror! You know, it seems that it engaged in drafting or rebyatnya from elementary school or full marazmatik. "Well All right, "- someone will say of the matter coder'ov - for us this is the last century." Well for you it might be the last, and for your neighbor (brother, friend - the right highlight) everything is just beginning, and he too reads the newspaper and thereby shall not throw rotten eggs ... God forgive me ... (Does anyone forgive) but I'll take today's conversation about "lines - begulkah", or rather their foundations, principles, and sizes. All running lines are divided into four form: - The simplest with the conclusion of familiarity, rolliruyuschiesya either, but each new letter appears from the bay floundering, or derived the invisible familiarity. - Standard with varying size letters, and the way O (scr / attr). - Complicated. Can be very unpredictable effects such as sin'usoida, jump series, outlining the subject of on-screen (see my version of War In Middle Earth " it can be ordered from me (mouse)), moving in a stream of water, precipitation from the bag and much else, just do not go bust. - Ultra sophisticated. At this level you can include running stitch, which is used to create the border, scaling a vector of letters, creating lines MuLtIcOlOr'nymi effects. All the above listed will be considered in our digression. For some it becomes a kind of textbook, and someone fairly ponostalgiruet about the past. Simple. This is the simplest form of running stitches, and he realized as follows: program print byvodit line from the address # XXXX, at # YY letters. Produced a delay by HALT'a or withdrawal of the sprite (s). Incremented beginning of the text. Checked on his end, and if so - set # XXXX at the beginning and move into beginning of the paragraph. If not end, just Go to the beginning of the paragraph. Or another option, which otlichaestsya from the previous one, which displays not all line and only the next letter, and then is 8 (16, 32, 64 ...) rolling. After that all the standard scheme-checking the end of the cycle. After reading this paragraph, some of the newbies who are on the front ASSEMBLER'nom exclaim: - Did not stick familiarity - invisibility, and at the limit? The answer is - NOT! Primarily because it would be bad form, and secondly, Imagine that you draw this nonsense in frame in the center of the screen ... br-rr! Standard. Arrived! That's because of that I gave all this fuss is about. Take a look at any issue of ZX-REVIEW, and you will find darkness standard lines, each of which claims to be conciseness and ease of execution, but everywhere there is a lot of variables koi must be filled, so this whole circus began to dance Now look at them and show size'y me one more or less short!? One gets the impression that we have a country innovators, inventors bike (Shaw Ride - then I think)! "The beginning of a line specified in pixel koordinatatah ... " Or again: "The beginning of a line is calculated ...", and then goes on a program BASIC'e, rows such things at 200. That laugh was so (Where - I do not remember). This means in order that we may know where this is I pritknul line, it is necessary to fill a hefty prog and an hour and a half wait, that prog report something like: "You lain disposet of sistem varaibles! "In short, 107-byte line and ready to ... ORG # 61A8 INIT LD HL, TXT LD (TEKST), HL; initializer text INIT2 LD A, # 01 LD (TEKBY), A; Reset bit RET SYM LD HL, (TEKST) LD A, (HL) CP # FF RET Z INC HL LD (TEKST), HL LD L, A LD H, # 2000 ADD HL, HL ADD HL, HL ADD HL, HL LD DE, FONT-# 0100 ADD HL, DE LD (TEKSY), HL; address of the current. symbol RET LETER LD HL, (TEKSY) LD DE, # 4073; left edge of the text LD C, # 08; character height (MAX8) PIP2 RLC (HL) PUSH DE EX DE, HL LD B, # 08; length of the string PIP1 RL (HL) DEC HL DJNZ PIP1 EX DE, HL POP DE INC HL INC D DEC C XOR A OR C JR NZ, PIP2 RET STEPS LD A, (TEKBY) CP # 09; bit counter JR NC, NEXT; output by the end of the letter STEPSES CALL LETER LD A, (TEKBY) INC A LD (TEKBY), A LD B, # 02 HALT DJNZ $ RET NEXT CALL SYM; new letter CALL Z, INIT; Text ended JR Z, NEXT CALL INIT2; not the end, reset. bat JR STEPSES TEKST DEFW FONT-1 pointer to # FF bytes TEKSY DEFW # 0000 Address of the current letter in the ; Fonte TEKBY DEFB # 09; bit counter, the first ; Startup 9. ; Text Message TXT DEFM "In a small marazmatiruem?" DEFB # FF FONT INCBIN "font"; Font, not ROM! For each of the next step lines (in including the first) do CALL STEPS. In the "left edge of the text, the address of the left edge of the line up to familiarity. The line "string length" to indicate its length in familiarity. Everything! The simplest line of crawling on your screen, if the rate is low - remove HALT. For symmetry allow bowed. To be continued ... Alex Merkulow Sewerodwinsk Z-Zero SYSTEMS inc. 03/III-00 - No, I think it's ... - Yes, it's insanity, marasmus! Z-Zero SYSTEMS inc. with someone.
Other articles:
Similar articles:
В этот день... 3 December