ZX Review #11-12
26 ноября 1997 |
|
Forum - On the Russification of game programs.
FORUM Music by MITCHELL (C) 1996 Alexei Pichugin, Saratov And about Russification INTRODUCTION History with Spectrum in Russia already passed for ten years. Much has changed since the emergence of the first computer "because of the hill" and now many reputable plant produces clones ZX-Spectrum-compatible machines, and many programmers are already in Russia write new programs for the beloved computer. However, Strangely enough, the most important a problem that befalls for the novice programmer, learn the basics of BASIC, so has not been solved. Of course, we talking about Russification. To date, there are several ways of Russification, the well-known a little more sophisticated users. Quite the uninformed can be sent to books (1) and (2) from a list end of the article. I also note that All these methods have two major disadvantages that make impossible to use a computer novice (in particular, important in education): 1. Completely unreadable listing. As you are, for example, like a typical text of the program: 10 GO SUB rus: PRINT "Menq zowut"; 20 GO SUB eng: PRINT "ZX-Spectrum" But at a set of Russian letters This program looks even worse becomes similar to a rebus: 10 GO SUB Rus: PRINT "My Name"; 20 GO SUB Yeung: PRINT 'SQL-Spetstrum " I'm not talking about Russification with UDG: Although listed and looks decent, but the restriction in the number of letters makes typing in the puzzle (the number 3 instead of the letter W and other such tricks), not allowing for Besides, change case of letters. 2. Significant loss of performance: at Russification of additional fonts is the time spent on GOSUB'y and POKE'i; method as described in the book (2) requires a deliberate delay (which is also decorated with the program text): 10 CLS: PRINT AT SQR 1,0 ;"..." In view of the above facts, a new crack for the Spectrum, which firstly allows entry and editing programs that use two fonts, without artifice, and, second, supports the work of an editor and interpreter BASIC with Russian letters, without burdensome requirements for the programmer. So, we turn to the description of the program. Softonic TypeEasy The very way of Russification, used in the program, far is not new. Crack reconfigures the standard input channels and O itself and adds two control code to the existing: 4 - Activate the English font, 5 - to activate the Russian font. As has already been written in the collection of ZX-FORUM 2, this a great way to have one significant disadvantage. The point that their work with the BASIC interpreter periodically updates the channel tuning, and so the work of such localization can be extended to perform one of the commands: RUN, CLS, CLEAR, or even just before pressing the <Enter> key in obtaining Automatic listing. A highlight of the new method of Russification is that TypeEasy fully captures management system and, in essence, is a BASIC interpreter, "nadstroennym" over standard (on this principle running a series of interpreters Beta Basic, Laser Basic and utility Blast toolkit). This allows replace virtually all critical procedures and achieve very convenient Russification. "Down to business!" To get a working version of the program, you will need to fill a dump codes. Dump contains the compressed version TypeEasy (this will allow you to save few minutes), and all instructions are given, based on the unpacked version, so the program decompresses the team RANDOMIZE USR 32000. Save the resulting code block instruction SAVE "te" CODE 63000,2368 (Or any other, according to the requirements of your storage media). Before all these manipulations do not forget to RAMTOP below the program code command CLEAR 31999. Now you only provide crack loader: 1 INK VAL "7": PAPER NOT PI: BORDER NOT PI: CLEAR VAL "62999": LOAD "te" CODE: RANDOMIZE USR VAL "63E3" Now you can hold your breath and run the program. Go explain that the only (?) Difference from the standard BASIC will replace the functions Key <TrueVideo> and. The first is to turn the English font, the second - for including Russian. Enough is enough, and now I want to describe the numerous ... DISADVANTAGES OF THE PROGRAMME Deficiencies abound. The core is a conflict with some versions of the TR-DOS. He appears in complete disregard of TR-DOS commands that are executed from BASIC. Programmers firm "Technology Research" very actively used the routines of the Spectrum ROM, and such "Technology" has led to an incredible degree of peevish TR-DOS. The only way to combat this lack of seems to intercept teams to the disk at the level of interpreter and their implementation at the file level. But this story I still wanted to dedicate the problems of Russification, and not the disk. For the same holders were able to drive to work with TypeEasy and opportunities TR-DOS, in Russifier intercepted komanlda NEW. Now this team is not destroy the program, but simply transfers control to the main BASIC. Of course, it spoiled the look of the program, but then again become available Team TR-DOS. Back in the crack at any moment, using RANDOMIZE USR 63000. The second, much less a serious drawback is that algorithms that listing and interpretation of different programs handle text, and there are a number of situations in which correctly written program gives incorrect result. Here is an example: 10 PRINT "My Name" 'TAB 10; "ZX-Spectrum" will print "ZX-Spectrum" Russian letters. Without going into details, but explain that to address these problems just add a control code corresponding to the font early printed incorrectly line. Third (do not worry, last) deficiency may be considered incomplete interception of interrupt printing characters, and specifically, the procedure is not handled automatic scrolling. Therefore, printing invitations Scroll? leads to a loss russificator control over the lower (official) screen, of course, is not fatal, and any of the commands: CLS, CLEAR, INPUT, RUN, remedy the situation. However, it still is desirable to avoid the appearance of this situation in general, for which we can recommend the use of cell SCR_CT (23,692). It contains a number one greater than the number of rows that left to move to a query "Scroll?". Therefore, diluting your program teams POKE 23692.255, you can achieve non-stop scrolling. COMMENTS Besides shortcomings, the program has some useful and useless features. In order to create programs that run independently of TypeEasy, has a special entrance for at 63,062. Starting on the address will automatically enforceable command RUN (already running localization) - You just need that first line of your program was a team move to the starting line. Interception BASIC allows absolute protection from pressing BREAK. Zeroing of the cell locations from 64,263 to 64,268, you liquidate hit testing BREAK in the interpreter. Can assume that this key is more does not exist. It is better not to use this opportunity to debugging - it will save You lots of time to reboot is not that hung, but obviously hung machine. About fonts. If you are not satisfied with the quality styling of the Russian font, you can preload any other to address 64600. Replacement of the same style will require more substantial alterations, and it - you have to release another 768 bytes somewhere below TypeEasy, put there and the English font to write in cells with the addresses of 63421 and 63422 address the English font, reduced to 256. Using the following assembly code program, a little more sophisticated readers will be able to produce special dvuhshriftovuyu version (I use it myself so). Maybe I had saved a few seconds of happy owners computers with 128 kilobytes memory, if I note that the work localization is possible only in the regime of 48 basic. This is due to that TypeEasy actively using ROM routines 48 (As well as criticized higher than TR-DOS). Theoretically, there may be flash ROM incompatible with TypeEasy; I have not had the opportunity to explore a variety of firmware compatibility, but those parts of the ROM referenced crack, are rarely changed. The most "dangerous" in the sense of compatibility are heaped Russified firmware like the one in your computer Delta-CA. I can not give a universal council eliminate the incompatibility of your firmware and crack, with each such piercing should be dealt individually (and better dismantle all such computers, and flash again). In conclusion, I want to warn everyone (especially beginners) programmers from one typical error when dealing with TypeEasy. The fact that Russification is control codes, and should not be surprised if the team PRINT LEN "String" will print the number 7, and or more. Similarly, desperately hoping that the program: 10 LET a $ = INKEY $: IF a $ <> "D" THEN GO TO 10 somehow respond to pressing different from BREAK. This should be considered in any string manipulation. "And how does it work?" If you've read this places, and, moreover, know how to write programs in assembler then perhaps you wondered how it all works. I will try in the most general terms comment on the assembly program text. I note that no sense to go into the intricacies of the interpreter, because this has been done in books (3) (5). Therefore, all that is written on only explains the differences from Rom. When writing software I used assembler Zeus (I easy editing more Guests compilation) and by its inherent intolerance program compiled with bias: it is efficient to Address 63000, and placed with 49152. Lines 30-220 contain command, which clears the screen and print the name of the program. Then, in lines 230-410 Line editing initialized with the introduction of the value of "1" or "RUN" (code - 247). In the first If it serves to remove Line 1 of the program, the second - to "run with the autostart. Next, clean the stack and starts the main program. Lines 420-1880 contains almost a complete copy of the program MAIN EXECUTION of the ROM. This program provides all cycle entry and editing line. It intercepted calls to those routines that can change the channel tuning. Procedures SETR and SETE set accordingly Russian or English font. It here you can ask the right address font for the version with two fonts. CHANR - it's routine to service channels output screen. I will explain the mysterious manipulation at its beginning. Lines 20902170 check, whether the printing of the printing procedure of key words and messages. Thanks to this test all the tokens and the error messages are printed in English letters (and No GO SUB!). Then CHANR catches and processes the control codes to switch fonts. If you want you can add here and other control codes, or even create your own tokens (in the Beta-Basic'e they replace characters pseudographics). Routines ALIST, CLSUP, INIT, CLSDN and program team CLS (CCLS) contain a command which reconfigures the channels on Rom. All of them are intercepted until the mention of the address maintenance procedures channels address is replaced by CHANR, and then control is transferred to the ROM. STRED - Program Editor line, and is used as in editing program, and when entering the command INPUT. In It had to rework the handling routine of Governors Codes 10 and 11 (the cursor down and up the listing) and the procedure READS (she reads the next character from the keyboard). In line 3590 established English font, it is necessary for the unique work routines # 111D print the contents of the string buffer. Next is the program team INPUT. To ensure proper operation of its localization had to duplicate the whole, despite the significant costs of memory. And it needed to intercept calls to the editor of the line. Subroutine commands and RUN CLEAR refer to the procedure CCLS localization, thereby violating the channel tuning. SYNTAX program and INTER - parser and an interpreter - are separated from each another is rather arbitrary, at the call from MAIN EXECUTION. On In fact, these programs have set of linkages and cross-references. Most interesting is the line 5630-5830 in They realized the substitution of standard commands NEW, REM, INPUT, RUN, IF, CLS, CLEAR. This method and you can replace BASIC commands, or even add new to the place of characters pseudographics (especially useful include the processing of commands line 5850, here # 1C8A - jump address at the syntactic error). CIF - program commands IF. It may seem strange to intercept this command does not seem to unrelated to the treatment channels. Interception was required in Due to the fact that routine IF the team comprises the team transitions directly into the interpreter / parser. In this TypeEasy loses control over the execution of the program, and all substitutions Command CLEAR, CLS, etc. become inactive. With the same goal was intercepted by a team REM (all of its program - a label CREM in the interpreter). The last piece of software - a procedure command NEW. As mentioned earlier, the purpose of This team TypeEasy - return to the standard BASIC free destruction program. Therefore, CNEW initializes the stack, clears the screen (setting up the program flows from the ROM), and then passes control to the ROM 48. Next after that is termed TABLE class command, it contains a type codes arguments and addresses of subroutines commands. This is a fairly complicated mechanism, and to understand it, I would advised to refer to the book (3). I understand that it is not in all, I myself have enjoyed a much more general description (4). Even after writing TypeEasy I found in the ZX-REVIEW for 1991 excellent series of articles "Secrets ROM, "and regretted that he did not get my hands before. By its quality material ZXREVYU lies somewhere in between books (3) and (4). In any case, the maximum amount of information can be obtained having a disassembler (any), and a good description of the system variables (eg, such as in (1)). CONCLUSION So, I finished the description TypeEasy. This crack, as I think it can be a great help to all those who working on BASIC. For more skilled programmers this program can serve as a basis for an unlimited expansion of the functions of standard BASIC, for example, complete replacement commands to work with a tape recorder into teams to work with the drive (without any RANDOMIZE USR 15619: REM:, etc.) REFERENCES 1. A. Larchenko, N. Rodionov. "ZX-Spectrum 'TR-DOS users and programmers, SPb.: Peter, 1994. 2. Collection "ZX-FORUM 2, Moscow: Inforkom, 1994. 3. Logan I., O'Hara F. "The Complete Spectrum ROM Disassembly ", UK: Melbourne House Ltd., 1983. 4. Brochure Monitor 16K - User's Guide ". Book has no links to the author or publisher. 5. Journal ZX-REVIEW, 1991. Series of articles "Secrets Rom, M.: Inforkom, 1991. Source code 1414. 00010 ORG 63000 00020 DISP 49152 - $ 00030; 00040; 00050; initialization commands 00060; 00070 LD (IY +49), 2 00080 CALL CCLS 00090 LD BC, 32 00100 LD DE, TEXT 00110 CALL # 203C 00120 WAIT BIT 5, (IY +1) 00130 JR Z, WAIT 00140 RES 5, (IY +1) 00150 DEL LD A, "a 00160 JR SLF0 00170 TEXT DEFB 4 00180 DEFM "TypeEasy 00190 DEFM "V1.0 00200 DEFB 32,127 00210 DEFM "1995 A. 00220 DEFM "Pichugin 00230; 00240; 00250; Entry for self- 00260; 00270 LD A, 247 00280 SLF0 LD HL, (23641) 00290 LD (HL), A 00300 INC HL 00310 CALL # 16B3 00320 LD HL, (23730) 00330 LD (HL), 62 00340 DEC HL 00350 LD SP, HL 00360 DEC HL 00370 DEC HL 00380 LD (23613), HL 00390 LD A, 32 00400 LD (DEL +1), A 00410 JR START 00420; 00430; 00440; Main Execution 00450; 00460 L12A2 LD (IY +49), 2 00470 CALL ALIST 00480 CALL # 16B0 00490 L12AC XOR A 00500 CALL # 1601 00510 CALL STRED 00520 START CALL SYNTAX 00530 BIT 7, (IY +0) 00540 JR NZ, L12CF 00550 BIT 4, (IY +48) 00560 JR Z, L1303 00570 LD HL, (23641) 00580 CALL # 11A7 00590 LD (IY +0), 255 00600 JR L12AC 00610 L12CF LD HL, (23641) 00620 LD (23645), HL 00630 CALL # 19FB 00640 LD A, B 00650 OR C 00660 JP NZ, L155D 00670 RST 24 CP 00680 1913 00690 JR Z, L12A2 00700 BIT 0, (IY +48) 00710 CALL NZ, CLSUP 00720 CALL CLSDN 00730 LD A, 25 00740 SUB (IY +79) 00750 LD (23692), A 00760 SET 7, (IY +1) 00770 LD (IY +0), 255 00780 LD (IY +10), 1 00790 CALL INTER 00800 L1303 HALT 00810 RES 5, (IY +1) 00820 LD A, (23610) 00 830 INC A 00840 L1313 PUSH AF 00850 LD HL, 0 00860 LD (IY +55), H 00870 LD (IY +38), H 00880 LD (23563), HL 00890 INC HL 00900 LD (23574), HL 00910 CALL # 16B0 00920 RES 5, (IY +55) 00930 CALL CLSDN 00940 SET 5, (IY +2) 00950 POP AF 00960 CALL SETE 00970 LD B, A 00980 CP 10 00990 JR C, L133C 01000 ADD A, 7 01010 L133C CALL # 15EF 01020 LD A, 32 01030 RST 16 01040 LD A, B 01050 LD DE, # 1391 01060 CALL # 0C0A 01070 XOR A 01080 LD DE, # 1536 01090 CALL # 0C0A 01100 LD BC, (23,621) 01110 CALL # 1A1B 01120 LD A, ": 01130 RST 16 01140 LD C, (IY +13) 01150 LD B, 0 01160 CALL # 1A1B 01170 CALL # 1097 01180 LD A, (23610) 01 190 INC A 01200 JR Z, L1386 01210 CP 9 01220 JR Z, L1373 CP 01230 1921 01240 JR NZ, L1376 01250 L1373 INC (IY +13) 01260 L1376 LD BC, 3 01270 LD DE, 23664 01280 LD HL, 23620 01290 BIT 7, (HL) 01300 JR Z, L1384 01310 ADD HL, BC 01320 L1384 LDDR 01330 L1386 LD (IY +10), 255 01340 RES 3, (IY +1) 01350 JP L12AC 01360 L1555 LD A, 16 01370 LD BC, 0 01380 JP L1313 01390 L155D LD (23625), BC 01400 LD HL, (23645) 01410 EX DE, HL 01420 LD HL, L1555 01430 PUSH HL 01440 LD HL, (23649) 01450 SCF 01460 SBC HL, DE 01470 PUSH HL 01480 LD H, B 01490 LD L, C 01500 CALL # 196E 01510 JR NZ, L157D 01520 CALL # 19B8 01530 CALL # 19E8 01540 L157D POP BC 01550 LD A, C 01560 DEC A 01570 OR B 01580 JR Z, L15AB 01590 PUSH BC 01600 INC BC 01610 INC BC 01620 INC BC 01630 INC BC 01640 DEC HL 01650 LD DE, (23635) 01660 PUSH DE 01670 CALL # 1655 01680 POP HL 01690 LD (23635), HL 01700 POP BC 01710 PUSH BC 01720 INC DE 01730 LD HL, (23649) 01740 DEC HL 01750 DEC HL 01760 LDDR 01770 LD HL, (23625) 01780 EX DE, HL 01790 POP BC 01800 LD (HL), B 01810 DEC HL 01820 LD (HL), C 01830 DEC HL 01840 LD (HL), E 01850 DEC HL 01860 LD (HL), D 01870 L15AB POP AF 01880 JP L12A2 01890; 01900; 01,910, incl. Russian font 01920; 01930 SETR PUSH HL 01940 LD HL ,64600-256 01950 JR SEE0 01960; 01970; 01,980, incl. Latin alphabet 01990; 02000 SETE PUSH HL 02010 LD HL ,15616-256 02020 SEE0 LD (23606), HL 02030 POP HL 02040 RET 02050; 02060; 02070; service channel 02080; 02090 CHANR LD HL, 8 02100 ADD HL, SP 02110 LD E, (HL) 02120 INC HL 02130 LD D, (HL) 02140 LD HL, # 0C28 02150 OR A 02160 SBC HL, DE 02170 JR NZ, CHLR0 02180 CALL SETE 02190 CHLR0 CALL # 0B03 02200 CP 4 02210 JR NZ, CHLR1 02220 JR SETE 02230 CHLR1 CP 5 02240 JR NZ, CHLR2 02250 JR SETR 02260 CHLR2 CP 1916 02270 JP C, # 09FC CP 02280 1924 02290 JP NC, # 09F7 02300 LD HL, CNTR1 CP 02310 1922 02320 JR C, CHLR3 02330 LD HL, CNTR2 02340 CHLR3 PUSH HL 02350 JP # 0B03 02360 CNTR1 LD DE, CNTR3 02370 JP # 0A7D 02380 CNTR2 LD DE, CNTR4 02390 JP # 0A7D 02400 CNTR3 LD DE, CHANR 02410 JP # 0A8A 02420 CNTR4 LD DE, CNTR3 02430 JP # 0A70 02440; 02450; 02460; Program Listing 02470; 02480 ALIST LD (23615), SP 02490 LD (IY +2), 16 02500 CALL CLSUP 02510 JP # 17A0 02520; 02530; 02540; Cleaning upper screen 02550; 02560 CLSUP LD HL, 0 02570 LD (23677), HL 02580 RES 0, (IY +48) 02590 CALL INIT 02600 LD A, 254 02610 CALL # 1601 02620 CALL # 0D4D 02630 LD B, 24 02640 CALL # 0E44 02650 LD HL, (23633) 02660 LD DE, CHANR 02670 JP # 0DCF 02680; 02690; 02700; Setting Flow 02710; 02720 INIT LD A, 253 02730 CALL # 1601 02740 LD HL, (23633) 02750 LD DE, CHANR 02760 JP # 0D9F 02770; 02780; 02790; command "CLS" 02800; 02810 CCLS CALL CLSUP 02820; 02830; 02840; cleaning the bottom screen 02850; 02860 CLSDN LD HL, 23612 02870 RES 5, (HL) 02880 SET 0, (HL) 02890 CALL # 0D4D 02900 LD B, (IY +49) 02910 CALL # 0E44 02920 LD HL, 23232 02930 LD A, (23693) 02 940 DEC B 02950 JR CLD2 02960 CLD0 LD C, 32 02970 CLD1 DEC HL 02980 LD (HL), A 02990 DEC C 03000 JR NZ, CLD1 03010 CLD2 DJNZ CLD0 03020 LD (IY +49), 2 03030 LD A, 253 03040 CALL # 1601 03050 LD HL, (23633) 03060 LD DE, CHANR 03070 JP # 0D9F 03080; 03090; 03100; line editor 03110; 03120 STRED LD HL, (23613) 03130 PUSH HL 03140 STE0 LD HL, STE4 03150 PUSH HL 03160 LD (23613), SP 03170 STE1 LD DE, READS 03180 CALL # 1113 03190 CALL # 15D4 03200 PUSH AF 03210 LD HL, 200 03220 LD D, H 03230 LD E, (IY-1) 03240 CALL # 03B5 03250 POP AF 03260 LD HL, STE1 03270 PUSH HL CP 03280 1911 03290 JR Z, STE2 03300 CP 10 03310 JP NZ, # 0F4C 03320 BIT 5, (IY +55) 03330 JP NZ, # 1001 03340 LD HL, 23625 03350 CALL # 190F 03360 JR STE3 03370 STE2 BIT 5, (IY +55) 03380 RET NZ 03390 LD HL, (23625) 03400 CALL # 196E 03410 EX DE, HL 03420 CALL # 1695 03430 LD HL, 23626 03440 CALL # 191C 03450 STE3 CALL ALIST 03460 JP # 1071 03470 STE4 BIT 4, (IY +48) 03480 JP Z, # 1026 03490 LD (IY +0), 255 03500 LD D, 0 03510 LD E, (IY-2) 03520 LD HL, 6800 03530 CALL # 03B5 03540 JP STE0 03550; 03560; 03570: Reading from a stream 03580; 03590 READS CALL SETE 03600 BIT 3, (IY +2) 03610 CALL NZ, # 111D 03620 OR A 03630 LD HL, 23611 03640 BIT 5, (HL) 03650 RET Z 03660 LD A, (23560) 03670 RES 5, (HL) 03680 PUSH AF 03690 INC HL 03700 BIT 5, (HL) 03710 CALL NZ, CLSDN 03720 POP AF CP 03730 1932 03,740 CCF 03750 RET C CP 03760 1916 03770 JP NC, # 10FA 03780 CP 6 03790 JP NC, # 10DB 03800 CP 4 03,810 CCF 03820 RET C 03830 LD B, A 03840 AND 1 03850 JP # 10D4 03860; 03870; 03880; command "INPUT" 03890; 03900 CINPUT CALL # 2530 03910 JR Z, CIN0 03920 LD A, 1 03930 CALL # 1601 03940 CALL CLSDN 03950 CIN0 LD (IY +2), 1 03960 CALL CINSUB 03970 CALL # 1BEE 03980 LD BC, (23,688) 03990 LD A, (23659) 04000 CP B 04010 JR C, CIN1 04020 LD C, 33 04030 LD B, A 04040 CIN1 LD (23688), BC 04050 LD A, 25 04060 SUB B 04070 LD (23692), A 04080 RES 0, (IY +2) 04090 CALL # 0DD9 04100 JP CLSDN 04110 CINSUB CALL # 204E 04120 JR Z, CINSUB 04130 CP "( 04140 JR NZ, CS00 04150 RST 32 04160 CALL # 1FDF 04170 RST 24 04180 CP ") 04190 JP NZ, # 1C8A 04200 RST 32 04210 JP CS13 04220 CS00 CP 202 1414.04230 JR NZ, CS01 04240 RST 32 04250 CALL # 1C1F 04260 SET 7, (IY +55) 04270 BIT 6, (IY +1) 04280 JP NZ, # 1C8A 04290 JR CS02 04300 CS01 CALL # 2C8D 04310 JP NC, CS12 04320 CALL # 1C1F 04330 RES 7, (IY +55) 04340 CS02 CALL # 2530 04350 JP Z, CS13 04360 CALL # 16BF 04370 LD HL, 23665 04380 RES 6, (HL) 04390 SET 5, (HL) 04400 LD BC, 1 04410 BIT 7, (HL) 04420 JR NZ, CS04 04430 LD A, (23611) 04440 AND # 40 04450 JR NZ, CS03 04460 LD C, 3 04470 CS03 OR (HL) 04480 LD (HL), A 04490 CS04 RST 1948 04500 LD (HL), 13 04510 BIT 1, C 04520 JR Z, CS05 04530 LD A, 34 04540 LD (DE), A 04550 DEC HL 04560 LD (HL), A 04570 CS05 LD (23643), HL 04580 BIT 7, (IY +55) 04590 JR NZ, CS08 04600 LD HL, (23645) 04610 PUSH HL 04620 LD HL, (23613) 04630 PUSH HL 04640 CS06 LD HL, CS06 04650 PUSH HL 04660 BIT 4, (IY +48) 04670 JR Z, CS07 04680 LD (23613), SP 04690 CS07 LD HL, (23649) 04700 CALL # 11A7 04710 LD (IY +0), 255 04720 CALL STRED 04730 RES 7, (IY +1) 04740 CALL # 21B9 04750 JR CS09 04760 CS08 CALL STRED 04770 CS09 LD (IY +34), 0 04780 CALL # 21D6 04790 JR NZ, CS10 04800 CALL # 111D 04810 LD BC, (23,682) 04820 CALL # 0DD9 04830 CS10 LD HL, 2366 04840 RES 5, (HL) 04850 BIT 7, (HL) 04860 RES 7, (HL) 04870 JR NZ, CS11 04880 POP HL 04890 POP HL 04900 LD (23613), HL 04910 POP HL 04920 LD (23647), HL 04930 SET 7, (IY +1) 04940 CALL # 21B9 04950 LD HL, (23647) 04960 LD (IY +38), 0 04970 LD (23645), HL 04980 JR CS13 04990 CS11 LD HL, (23651) 05000 LD DE, (23649) 05010 SCF 05020 SBC HL, DE 05030 LD B, H 05040 LD C, L 05050 CALL # 2AB2 05060 CALL # 2AFF 05070 JR CS13 05080 CS12 CALL # 1FFC 05090 CS13 CALL # 204E 05100 JP Z, CINSUB 05110 RET 05120; 05130; 05140; command "RUN" 05150; 05160 CRUN CALL # 1E67 05170 LD BC, 0 05180 CALL # 1E45 05190 JR CCL0 05200; 05210; 05220; command "CLEAR" 05230; 05240 CCLEAR CALL # 1E99 05250 CCL0 LD A, B 05260 OR C 05270 JR NZ, CCL1 05280 LD BC, (23,730) 05290 CCL1 PUSH BC 05300 LD DE, (23627) 05310 LD HL, (23641) 05320 DEC HL 05330 CALL # 19E5 05340 CALL CCLS 05350 JP # 1EC6 05360; 05370; 05380; syntax analyzer 05390; 05400 SYNTAX RES 7, (IY +1) 05410 CALL # 19FB 05420 XOR A 05430 LD (23623), A 05440 DEC A 05450 LD (23610), A 05460 JR SYN1 05470 SYN0 RST 1932 05480 SYN1 CALL SETE 05490 CALL # 16BF 05500 INC (IY +13) 05510 JP M, # 1C8A 05520 RST 24 05530 LD B, 0 CP 05540 1913 05550 JP Z, INT1 05560 CP ": 05570 JR Z, SYN0 05580 LD HL, SYN4 05590 PUSH HL 05600 LD C, A 05610 RST 32 05620 LD A, C 05630 CP 230 05640 LD HL, TNEW 05650 JR Z, SYN3 05660 CP 234 05670 LD HL, TREM 05680 JR Z, SYN3 05690 CP 238 05700 LD HL, TINPUT 05710 JR Z, SYN3 05720 CP 247 05730 LD HL, TRUN 05740 JR Z, SYN3 05750 CP 250 05760 LD HL, TIF 05770 JR Z, SYN3 05780 CP 251 05790 LD HL, TCLS 05800 JR Z, SYN3 05810 CP 253 05820 LD HL, TCLEAR 05830 JR Z, SYN3 05840 SUB 206 05850 JP C, # 1C8A 05860 LD C, A 05870 LD HL, # 1A48 05880 ADD HL, BC 05890 LD C, (HL) 05900 ADD HL, BC 05910 JR SYN3 05920 SYN2 LD HL, (23668) 05930 SYN3 LD A, (HL) 05940 INC HL 05950 LD (23668), HL 05960 LD BC, SYN2 05970 JP # 1B5D 05980 SYN4 CALL # 1F54 05990 JP NC, # 1B7B 06000 BIT 7, (IY +10) 06010 JR NZ, INT6 06020 LD HL, (23618) 06030 BIT 7, H 06040 JR Z, INT0 06050; 06060; 06070; Interpreter 06080; 06090 INTER LD HL, 65534 06100 LD (23621), HL 06110 LD HL, (23649) 06120 DEC HL 06130 LD DE, (23641) DEC DE 06140 06150 LD A, (23620) 06160 JR INT4 06170 INT0 CALL # 196E 06180 LD A, (23620) 06190 JR Z, INT2 06200 AND A 06210 JR NZ, INT5 06220 LD B, A 06230 LD A, (HL) 06240 AND 192 06250 LD A, B 06260 JR Z, INT2 06270 RST 8 06280 DEFB 255 06290 CREM POP BC 06300 INT1 CALL # 2530 06310 RET Z 06320 LD HL, (23637) 06330 LD A, 192 06340 AND (HL) 06350 RET NZ 06360 XOR A 06370 INT2 CP 1 06380 ADC A, 0 06390 LD D, (HL) 06400 INC HL 06410 LD E, (HL) 06420 LD (23621), DE 06430 INC HL 06440 LD E, (HL) 06450 INC HL 06460 LD D, (HL) 06470 EX DE, HL 06480 ADD HL, DE 06490 INC HL 06500 INT4 LD (23637), HL 06510 EX DE, HL 06520 LD (23645), HL 06530 LD D, A 06540 LD E, 0 06550 LD (IY +10), 255 06560 DEC D 06570 LD (IY +13), D 06580 JP Z, SYN0 06590 INC D 06600 CALL # 198B 06610 JR Z, INT6 06620 INT5 RST 8 06630 DEFB 22 06640 INT6 RST 1924 CP 06650 1913 06660 JR Z, INT1 06670 CP ": 06680 JP Z, SYN0 06690 RST 8 06700 DEFB 11 06710; 06720; 06730; command "IF" 06740; 06750 CIF POP BC 06760 CALL # 2530 06770 JR Z, CIF0 06780 RST 40 06790 DEFB # 02, # 38 06800 EX DE, HL 06810 CALL # 34E9 06820 JR C, INT1 06830 CIF0 JP SYN1 06840; 06850; 06860; Team "NEW" 06870; 06880 CNEW LD HL, (23730) 06890 LD (HL), 62 06900 DEC HL 06910 LD SP, HL 06920 DEC HL 06930 DEC HL 06940 LD (23613), HL 06950 CALL # 0D6B 06960 JP # 12A9 06970; 06980; 06990; Table command classes 07000; 07010 TNEW DEFB 0 07020 DEFW CNEW 07030 TREM DEFB 5 07040 DEFW CREM 07050 TINPUT DEFB 5 07060 DEFW CINPUT 07070 TRUN DEFB 3 07080 DEFW CRUN 07090 TIF DEFB 6,203,5 07100 DEFW CIF 07110 TCLS DEFB 0 07120 DEFW CCLS 07130 TCLEAR DEFB 3 07140 DEFW CCLEAR 07150; 07160; 07170; End of program 2 *
Other articles:
Similar articles:
В этот день... 21 November