Library?

ZXNet echo conference «code.zx»

From Kirill Frolov To All 6 May 2000

Press RESET immediately, All! The subject is over, is the project dead? Well, as I expected... Help is here, the list is further. Send interesting things or echo them. === Cut === X-FAQ is used for distribution via NETMAIL in the FIDONET network - Algorithms and source codes for Z80 and ZX-SPECTRUM - F.A.Q. on various modifications of ZX-SPECTRUM Additionally, if you would like to be included on the mailing list new files, you can send them to the server. Files are sent as text whenever possible and may be split for several letters. Some files are sent to UUE only. If you live in St. Petersburg, then requests from you by netmail are extremely NOT DESIRED. Files placed on the mailing list are available to file request. For ZX-SPECTRUM users with Vicomm-compatible modems have X-BBS, where all these files are also available. If possible all available files for distribution will also be sent to POST-STATION BBS which also works with a Vicomm modem. FILE REQUEST RULES: If you write a letter to the address 2:5030/827.2 for X-FAQ, and in subj indicate file name then it will be sent to UUE, but no more than 48kb per day. List of aliases: %help - How to use FileServer %list - The latest FileList The file list is sent without UUE encoding. You should not request many files at once!RULES FOR SENDING FILES: The address is also 2:5030/827.2, letters are processed by X-Libr, in his name and you need to write a letter into which you can insert a text file or UUE. Receipt of the letter will be confirmed. It's not worth writing long (more than 60kb) letters, it is better to break them into several small ones. You only need to send: - Source texts of programs in the form of text in 866 encoding. If your compilers use other storage methods BE SURE TO DECODE program texts into TEXT. Any programming language. A clear description is required texts sent (what is needed for, requested resources, build script for large projects, compilers used...) - Diagrams and descriptions of various modifications of the ZX-SPECTRUM. Text only in 866 encoding and preferably only text, but you can also use various graphic files or other methods presentation of information. - Descriptions of the algorithms of various programs for the Z80 or ZX-SPECTRUM text in 866 encoding. Graphic formats are not recommended. It is advisable to use only Russian or English. === Cut ===

From Kirill Frolov To All 29 May 2000

Press RESET immediately, All! X-FAQ is used for distribution via NETMAIL in the FIDONET and *ZXNET* networks - Algorithms and source codes for Z80 and ZX-SPECTRUM - F.A.Q. on various modifications of ZX-SPECTRUM If you write a letter to 2:5030/827.2 or 500:812/5.7 for X-FAQ, a in subj specify the file name, then it will be sent to UUE, but no more than 48kb in day. List of aliases: %help - How to use FileServer %list - The latest FileList If you have anything to add, write.

From Yura Nazarenko To Kirill Frolov 30 May 2000

Hello, Kirill! Somehow 05/29/00 at 02:06:42 Kirill Frolov wrote to All on the topic "Library?"... KF> X-FAQ is used for distribution via NETMAIL in the FIDONET and *ZXNET* networks KF> - Algorithms and source texts of programs for Z80 and ZX-SPECTRUM KF> - F.A.Q. on various improvements ZX-SPECTRUM KF> If you write a letter to the address 2:5030/827.2 or 500:812/5.7 for X-FAQ, KF> a in subj specify the file name, then it will be sent to UUE, but no more than 48kb KF> day. KF> List of aliases: KF> %help - How to use FileServer KF> %list - The latest FileList KF> If you have something to add, write. Well, finally! At least someone has moved from words to action!!! Thank you... And at the same time I want to ask All! I've been sitting on this for over a year now yes, but I don’t know some of the commands and haven’t used them anywhere... Can anyone tell me their practical purpose? These are these commands: CCF, CPD, CPDR (or CPI, CPIR), DAA, INDR (INIR), NEG, OTDR (OTIR), RETI, RETN, SCF. There’s no need for angry ones: “Well, you fool!" and all that. I'm serious! I asked everyoneThey explain this in a peculiar way that doesn’t make any sense... Thanks in advance... All the best to you, Kirill! Yuri Nazarenko/Rezident/N-Discovery

From Aleksandr Majorov To Yura Nazarenko 31 May 2000

Hello Yura! 30 May 00 13:21, Yura Nazarenko -> Kirill Frolov: [skipped] KF>> X-FAQ is used for distribution via NETMAIL in the FIDONET network and KF>> *ZXNET* [skipped] KF>> If you have something to add, write. YN> Hey finally! At least someone moved from words to action!!! Thank you... Do you think someone sent him something? All this was pulled out of... YN> And at the same time I want to ask All! I've been sitting onfor more than a year now YN> yes, but I don’t know some of the commands and haven’t used them anywhere... YN> Can anyone tell me their practical purpose? The best advice: run these commands in a debugger and see what happens it will work out. And one more thing - the commands were introduced for a reason! They are all practically necessary! CCF, DAA SCF are actually commands for the 8080, and ZILOG introduced the rest for a reason! YN> These commands are: CCF, CPD, CPDR (or CPI, CPIR), DAA, INDR (INIR), YN> NEG, OTDR (OTIR), RETI, RETN, SCF. SCF - set the CY flag to "1" CCF - inverts the carry flag. (i.e. it was “0” - it will become “1” and vice versa) What is this for? Well, do you know why the carry flag is needed at all? This is the first application. The second is some kind of indicator, such as if they returned from the p/p with CY=1, then somethinghappened. And thirdly, for the operations of “rotating” the accumulator. DAA - binary decimal correction of the accumulator after addition/subtraction. Do you know what a binary decimal number is? So: if in [A] there was this very number, and you added/subtracted something to it, then in [A] you will get incomprehensible nonsense. But DAA will make a correction. Example: in [A] there was #12. Attention! This is not the number 18, but the number 12! (BCD format!) If we add... well 8 to it, then we get what? - #1A! And after DAA there will be #20. Let's check 12+8=20! CPDR, CPIR - search for the first occurrence of a byte. You have a chain of bytes, the start address is in [HL], the length of the chain is in [BC] You need to find in this line a byte equal to the contents of the battery. These teams do just that! CPIR does this: cpir CP (HL) INC HL DEC B.C. RET Z EX AF, AF' LD A,B OR C RET Z EX AF, AF' JP cpir Of course it doesn't touch AF, it's just hard to portray it otherwise :) And CPDR does the same thing, but instead of INC HL it does DEC HL When the command ends: Z=1 - we found such a byte! Z=0 - bummer! And the CPI and CPD commands are the same commands, only without a loop. Those. they end with RET Z And the flags are like this: Z - see above P/V=0 - reached the end of the line! P/V=1 - we can look further NEG - works like this: A = 0 - A INDR (INIR) - reading from ports INI command IN A, (C) LD(HL),A INC HLDEC B IND team IN A, (C) LD(HL),A DEC HL DEC B Z=0 - B=1 Z=1 - B<>1 INIR command inir IN A, (C) LD(HL),A INC HL DJNZ inir RET INDR team indr IN A, (C) LD(HL),A DEC HL DJNZ indr. RET Of course, the BATTERY is not actually touched! OTDR (OTIR) output to ports, completely analogous to IN????, current LD A,(HL) OUT(C),A RETI - return after interruption. In theory, the interrupt handler should end with this command. So that other computer systems understand that interrupt processing is completed. Can't be used on Spec. RETN - return from a non-maskable interrupt. If NMI has arrived and you processed, then to continue executing the main program you do RETN YN> No need for angry ones: “You’re a fool!” and all that. We need Fed... we need it! You take a book and a debugger - and study! YN> I'm serious! No one asked everyone to explain it somehow YN> it’s peculiar that nothing is clear... Have you yourself tried to explain something to anyone? To teach is not to send you two bytes :) Alexand

From Kirill Frolov To Yura Nazarenko 1 June 2000

Press RESET immediately, Yura! 30 May 00 13:21, Yura Nazarenko wrote to Kirill Frolov: YN> And at the same time I want to ask All! I've been onfor over a year now YN> yes, but I don’t know some of the commands and haven’t used them anywhere... YN> Can anyone tell me their practical purpose? These are YN> commands: CCF, CPD, CPDR (or CPI, CPIR), DAA, INDR (INIR), NEG, YN> OTDR (OTIR), RETI, RETN, SCF. :-( ) Did you do AON and don’t know? CCF -- invert the carry flag. SCF -- setting the carry flag. How is it possible to write something in ASMA without these commands? I can't imagine! CPD, CPDR, CPI, CPIR are Compare and Decrement or Increment. INDR, INIR, INI, IND, OUTI, OUTD, OTIR, OTDR -- commands for working with automatically changing ports (dec B) port address and memory address (inc, dec). With an R on it at the end -- work in a loop until B<>0. DAA -- correction of numbers in BCD format (in region A) after addition or subtraction. NEG - receiving an additional (or reverse?) code. A=0-A RETI -- return from a maskable interrupt. RETN -- return from a non-maskable interrupt. For more detailed information RTFM Larchenko and Rodionova, or better yet, something more specialized.

From Stanislav Udin To Yura Nazarenko 2 June 2000

Hello Yura! Yura Nazarenko (500:812/2.51) wrote 13:21 05/30/00 to Kirill Frolov YN> Can anyone tell me their practical purpose? These are YN> commands: CCF, CPD, CPDR (or CPI, CPIR), DAA, INDR (INIR), NEG, YN> OTDR (OTIR), RETI, RETN, SCF. There’s no need for angry ones: “Well, you I don’t know about others, but I regularly use the CCF and SCF commands. There is a team (SBC) which subtracts a register pair with a carryover, and there are cases (most often) when it is necessary to perform a simple subtraction of the register pairs, in this case I set the carry flag (SCF), then invert it (CCF) and subtract. The second case when it is necessary to set and reset the transfer flag these are all kinds of rotation commands that affect the flag in one way or another transfer. And I also use the carry flag as an indicator of the result after exiting subprograms, i.e. before exiting the subroutine depending on the result operations I set or clear the transfer flag, and after exiting I check this flag is the result of subroutine execution. RETI and RETN are the return from maskable and non-maskable interrupts. And the meaning is also not entirely clear to me, since instead of them you can easily use the RET command. Although from interruptions of the 2nd kind you need to return byRETI team. But unmasked interruptions are rare on the Spectrum (modem, all sorts of magic, etc.), so the scope of application of the RETN command is limited. I can’t say anything about other commands, since I don’t use them myself. Best regards, Stanislav.

From Eugene Stahov To Aleksandr Majorov 7 June 2000

Hello Alexander. 06 Jun 00 19:08, you wrote to Stanislav Udin: SU>> RETI and RETN are the return from the masked and SU>> non-maskable interrupt. And the meaning is not entirely clear to me either SU>> since you can easily use the RET command instead. AM> not allowed! AM> From unmasked, return via RETN! IT IS POSSIBLE! After all, what happens according to NMI: IFF1=0 call 066h and according to RETN: IFF1=IFF2 RET The Z80 has two interrupt triggers. DI, EI, and maskable interrupt instructions change both flags. The first directly controls interrupt enable, and the second, in addition to being copied via RETN to the first, can be read by command LD A,I(R) to the PV flag, and then by command JP PO(PE) skip or execute EI. I did just that in my debugger, and received a bonus - a status indication interrupts at the time of NMI. Eugene

From Eugene Stahov To Slavik Tretiak 9 June 2000

Hello Slavik. 05 Jun 00 00:32, you wrote to Kirill Frolov: KF>>> The OUTI command has pre-decremental port addressing! ST> Fuck you!!!!!!!!!!!!!!! You can break off and no longer Don't write without checking. OUTI/OUTD have pre-decrement addressing port. Right now, I’ll find you a company description and write, once and for all: === Cut === OUTI Operation: (C) <- (HL), B <- B - 1, HL <- HL + 1 Format: [skip] Description: 1) The contents of the HL register pair are placed on the address bus to select a location in memory. The byte contained in this memory location is temporarily stored in the CPU. 2) Then, after the byte counter (B) is decremented, the contents of register C are placed on the bottom half (A7 through A0) of the address bus to select the I/O device at one of 256 possible ports. The decremented value of register B is placed on the top half (A15 through A8) of the address bus. 3) The byte to be output is placed on the data bus and written into selected peripheral device. 4) Finally the register pair HL is incremented. === Cut === Eugene

From Valerij Kozhevnikoff To Slavik Tretiak 11 June 2000

Hello, Slavik! 05 Jun 00 00:32, Slavik Tretiak -> Kirill Frolov: KF>>> But the figs! KF>>> The OUTI command has pre-decremental port addressing! ST> Fuck you!!!!!!!!!!!!!!! You can break off and no longer ST> appear in the field of view. Keep the attacks to yourself. The OUTI command first does DEC B and then OUT (C),(HL). I was convinced of this when I wrote the screw driver. Can I show you a piece of the source code? ST> P.S. Have you ever looked at the Z-80 doc ???? I remember it by heart since 1994. WBR, Jason. [Team Obituary][Team Friday 13th][Team Evil Maniacs][Team Huge Axes]