{"id":6241,"date":"2023-03-11T17:25:47","date_gmt":"2023-03-11T17:25:47","guid":{"rendered":"https:\/\/loadzx.com\/timexcomputerworld\/?page_id=6241"},"modified":"2023-12-15T19:01:02","modified_gmt":"2023-12-15T19:01:02","slug":"tos-secrets","status":"publish","type":"page","link":"https:\/\/loadzx.com\/timexcomputerworld\/tos-secrets\/","title":{"rendered":"TOS Secrets"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"6241\" class=\"elementor elementor-6241\">\n\t\t\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-8c07a5d elementor-section-stretched elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-eae-slider=\"81434\" data-id=\"8c07a5d\" data-element_type=\"section\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;,&quot;stretch_section&quot;:&quot;section-stretched&quot;}\">\n\t\t\t\t\t\t\t<div class=\"elementor-background-overlay\"><\/div>\n\t\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-no\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-080594e\" data-eae-slider=\"27480\" data-id=\"080594e\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-inner-section elementor-element elementor-element-690fb63 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-eae-slider=\"91139\" data-id=\"690fb63\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-inner-column elementor-element elementor-element-dc84625\" data-eae-slider=\"99327\" data-id=\"dc84625\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-ef3ff72 elementor-widget elementor-widget-heading\" data-id=\"ef3ff72\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h1 class=\"elementor-heading-title elementor-size-default\">TOS Secrets<\/h1>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4273339 elementor-widget elementor-widget-spacer\" data-id=\"4273339\" data-element_type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-869dd90 elementor-widget elementor-widget-image\" data-id=\"869dd90\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/loadzx.com\/timexcomputerworld\/wp-content\/uploads\/2023\/03\/2048withTOS-1024x768.gif\" class=\"attachment-large size-large wp-image-6660\" alt=\"\" srcset=\"https:\/\/loadzx.com\/timexcomputerworld\/wp-content\/uploads\/2023\/03\/2048withTOS-1024x768.gif 1024w, https:\/\/loadzx.com\/timexcomputerworld\/wp-content\/uploads\/2023\/03\/2048withTOS-300x225.gif 300w, https:\/\/loadzx.com\/timexcomputerworld\/wp-content\/uploads\/2023\/03\/2048withTOS-768x576.gif 768w, https:\/\/loadzx.com\/timexcomputerworld\/wp-content\/uploads\/2023\/03\/2048withTOS-1536x1152.gif 1536w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c6dbe92 elementor-widget elementor-widget-spacer\" data-id=\"c6dbe92\" data-element_type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-da80fb5 elementor-widget elementor-widget-text-editor\" data-id=\"da80fb5\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: center;\"><span style=\"font-size: 18px;\">by Wojciech Jab\u0142o\u0144ski, Jacek Troja\u0144ski<\/span><\/p><p>Most of the information contained here has been obtained empirically by analyzing machine code for many hours. Therefore, part of the described procedures and system variables have no names. If you have already used them and created your nomenclature for this purpose, you can fill in the blank spaces in the tables.<\/p><p>Due to the low usefulness of BASIC, good knowledge of the use of monitor and assembler programs is required, and all addresses are given in hexadecimal.<\/p><p><strong>Three words about the system:<\/strong><\/p><p>The TOS disk operating system (Timex Operating System) is used to operate the ZX Spectrum or Timex computer, connected via an interface with the Timex FDD 3000 disk drive.<\/p><p>The floppy drive includes a controller, power supply, and floppy drives. [There are two types of housing &#8211; one consists of three modules, and the other is one housing with space for two 3 &#8220;drives. The Controller includes a Z80A processor, ROM, 64 KB of RAM, a disk driver, and I \/ O chips. It is actually a separate computer. The interface consists of a 4KB ROM, 1KB RAM, and a chip electronic responsible for &#8220;addresses and contacts&#8221;.<\/p><p>Most of the TOS code is loaded during boot from a floppy disk and occupies the first 16 KB of RAM in the floppy disk drive controller. [In fact, the fixed code is 10kB, one of the 2kB overlays, and the rest is for buffers. It supports RS232C connectors and disk drives. The remaining 48 kB is free. The part responsible for the existence of new instructions in BASIC is in the ROM of the interface.<\/p><p><strong>How does the interface work?<\/strong><\/p><p>The aforementioned electronic system contained in the interface reacts to the appearance of three specific addresses on the address bus. At the time of detecting the execution of a program with the address #0000 or #0008, it disconnects the standard Spectrum ROM and reconnects the ROM and RAM of the interface in its place.<\/p><p>This process is referred to as &#8220;interface wakeup&#8221; hereinafter. After finding the address #0604 the opposite occurs.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8e9c488 elementor-widget elementor-widget-image\" data-id=\"8e9c488\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"382\" height=\"413\" src=\"https:\/\/loadzx.com\/timexcomputerworld\/wp-content\/uploads\/2023\/03\/TOSSecretsFIG1-e1679080837398.gif\" class=\"attachment-large size-large wp-image-6650\" alt=\"\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-75829c7 elementor-widget elementor-widget-text-editor\" data-id=\"75829c7\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: center;\">Fig. 1 &#8211; Computer memory map before and after activating the interface.<\/p><p style=\"text-align: left;\">Thanks to this structure, TOS can control the computer when it is restarted (RST 0; program named &#8220;START&#8221; is loaded), or when handling a syntax error (RST 8; asterisk, i.e. new instructions).<\/p><p style=\"text-align: left;\">For handling the interface memory, incomplete addressing is used, as a result of which it is visible in several places at once. [Except for TI-of-TTL which has fully<\/p><p style=\"text-align: left;\">addressed a sufficient amount of memory. The interface with a gate array logic layout is very easy to convert to 2kB RAM.]<\/p><p style=\"text-align: left;\">When programming, it must be remembered that the screen memory is physically in contact with the RAM area of the interface.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4c06d76 elementor-widget elementor-widget-image\" data-id=\"4c06d76\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"923\" height=\"777\" src=\"https:\/\/loadzx.com\/timexcomputerworld\/wp-content\/uploads\/2023\/03\/TOSSecretsFIG2-e1679080857322.gif\" class=\"attachment-large size-large wp-image-6651\" alt=\"\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4242858 elementor-widget elementor-widget-text-editor\" data-id=\"4242858\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: center;\">Figure 2 &#8211; General algorithm for handling RST 8 calls through the interface.<\/p><p style=\"text-align: left;\">\u00a0<\/p><p style=\"text-align: left;\"><strong>First steps<\/strong><\/p><p style=\"text-align: left;\">The creators of the TOS system wrote it very friendly and left a few gaps for programmers. It is clearly visible in the presented algorithm (Fig. 2.). It is not normal that when calling RST 8, the IY register is zero &#8211; in BASIC it is not possible &#8211; so the reaction to it is special, i.e. the RET command. [Normally IY points to the BASIC variable region. Thanks to this structure, you can easily activate the interface by calling the following subroutine:<\/p><p style=\"text-align: left;\">\u00a0<\/p><p style=\"text-align: left;\">\u00a0<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1404eef elementor-widget elementor-widget-text-editor\" data-id=\"1404eef\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\"><span style=\"font-size: 18px; text-align: left;\">DR_ON PUSH IY&nbsp; &nbsp; &nbsp;; storage of the contents of the IY register<br><\/span><span style=\"font-size: 18px;\">&nbsp; &nbsp; &nbsp; LD IY, 0&nbsp; &nbsp; ; load tag<br><\/span><span style=\"font-size: 18px;\">&nbsp; &nbsp; &nbsp; RST 8&nbsp; &nbsp; &nbsp; &nbsp;; interface activation<br><\/span><span style=\"font-size: 18px;\">&nbsp; &nbsp; &nbsp; POP IY&nbsp; &nbsp; &nbsp; ; restore the contents of the IY register<br><\/span><span style=\"font-size: 18px;\">&nbsp; &nbsp; &nbsp; RET&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; return<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f5e958a elementor-widget elementor-widget-text-editor\" data-id=\"f5e958a\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\"><span style=\"font-size: 18px;\">The DR_ON routine does not change the contents of registers and the only result of its operation is the conversion of the computer&#8217;s ROM to the interface memory and the disabling of masked interrupts. It is a staple of most programs, and its name will be repeated many times over.<\/span><\/p><p style=\"text-align: left;\">The computer&#8217;s ROM is now invisible and it is impossible to use its routines directly. The memory structure is shown on the right side of Figure 1, with a more detailed description you will find in the tables. Reactivation of the ZX Spectrum ROM is carried out, as already known, by executing the command from address # 0604. His neighborhood looks like this:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f0199b1 elementor-widget elementor-widget-text-editor\" data-id=\"f0199b1\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\"><span style=\"font-size: 18px;\">#0603 EI&nbsp; &nbsp; ; enable masked interrupts<br><\/span><span style=\"font-size: 18px;\">#0604 RET&nbsp; &nbsp;; return and activate computer ROM<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-bcfc6a5 elementor-widget elementor-widget-text-editor\" data-id=\"bcfc6a5\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\"><span style=\"font-size: 18px;\">So you can see that the standard ROM can be enabled in two ways: by jumping to # 0603 with interrupts enabled, or to # 0604 without enabling nonmaskable interrupts.<\/span><\/p><p style=\"text-align: left;\"><strong>Interface RAM (Table 1)<\/strong><\/p><p style=\"text-align: left;\">The first 256 bytes of the interface RAM are used as the buffer. All data transmitted to and from the disk drive travels through this area.<\/p><p style=\"text-align: left;\">The next 82 bytes are system variables. From the programmer&#8217;s point of view, the most important are those that are labeled in the table. In addition, the area from<\/p><p style=\"text-align: left;\">#210D deserves mention to #212C where the error message is stored, and address #213A containing system status flags. The latter is only set when executing TOS instructions,<\/p><p style=\"text-align: left;\">the remaining time they are zero and most of them are of no practical importance to us. Only bit 0 can be used: its setting causes the next call of RST 8,<\/p><p style=\"text-align: left;\">it will work like the DR_ON procedure.<\/p><p style=\"text-align: left;\">The remaining 684 bytes are free and you can put your program there. Although the instruction attached to the floppy drive says that the free memory starts with the address<\/p><p style=\"text-align: left;\">#2156, practice shows that the last used byte for system variables is # 2153.<\/p><p style=\"text-align: center;\">TABLE 1. RAM (# 2000- # 23FF), (# 2400- # 27FF), (# 2800- # 2BFF), &#8230;<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-304477e elementor-widget elementor-widget-text-editor\" data-id=\"304477e\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<table style=\"font-size: 14px; font-family: Arial, Helvetica, sans-serif;\" border=\"1\" width=\"1225\"><tbody><tr><td width=\"108\">Address<\/td><td width=\"49\">Name<\/td><td width=\"58\">Lenght<\/td><td width=\"982\">Description<\/td><\/tr><tr><td>#2000 &#8211; #20FF<\/td><td>bufdat<\/td><td>256<\/td><td>Data buffer<\/td><\/tr><tr><td>#2100<\/td><td>mod<\/td><td>1<\/td><td>The number of the operation to be performed<\/td><\/tr><tr><td>#2101 &#8211; #210C<\/td><td>\u00a0<\/td><td>12<\/td><td>Contents of processor registers when sending the command, successively: AF, BC, DE, HL, IX, IY<\/td><\/tr><tr><td>#210D &#8211; #212C<\/td><td>\u00a0<\/td><td>32<\/td><td>Error message text<\/td><\/tr><tr><td>#212D<\/td><td>\u00a0<\/td><td>1<\/td><td>Number of header bytes for SAVE or LOAD operations<\/td><\/tr><tr><td>#212E<\/td><td>chan<\/td><td>1<\/td><td>Channel number<\/td><\/tr><tr><td>#212F<\/td><td>\u00a0<\/td><td>1<\/td><td>Header for communication between the computer and the disk drive = block type: #CO-connection, #DO-buffer<\/td><\/tr><tr><td>#2130<\/td><td>\u00a0<\/td><td>1<\/td><td>Header for communication between the computer and the disk drive = length of the block to be transferred<\/td><\/tr><tr><td>#2131<\/td><td>\u00a0<\/td><td>1<\/td><td>Header for communication between the computer and the disk drive = marker for sending correctness: #BO-OK, #EO-error<\/td><\/tr><tr><td>#2132<\/td><td>\u00a0<\/td><td>1<\/td><td>Number of block transfer attempts<\/td><\/tr><tr><td>#2133<\/td><td>\u00a0<\/td><td>1<\/td><td>Type of file being written or read (DATA, CODE, etc.)<\/td><\/tr><tr><td>#2134 &#8211; #2139<\/td><td>\u00a0<\/td><td>6<\/td><td>Work variable area; they have different functions depending on the command being executed.<\/td><\/tr><tr><td>#213A<\/td><td>\u00a0<\/td><td>1<\/td><td>System state markers; setting the appropriate bit means:<br \/>0-the system will execute the RET command at RST 8,<br \/>1-the analyzed command is correct,<br \/>2-syntax analysis,<br \/>3-record length is given,<br \/>5-getting numbers from a stack<\/td><\/tr><tr><td>#213B<\/td><td>finit<\/td><td>2<\/td><td>Address of the error handler call procedure when the error in question is not a TOS instruction. Standard #0082.<br \/>By giving the address of your own procedures, we can expand the list of orders.<\/td><\/tr><tr><td>#213D<\/td><td>\u00a0<\/td><td>2<\/td><td>Address of the BASIC return procedure after the TOS instruction has been executed. Standard #06E3 (not to be confused with # 0603)<\/td><\/tr><tr><td><p>#213F<\/p><\/td><td>\u00a0<\/td><td>2<\/td><td>Stores the initial value of the CH_ADD system variable during parsing<\/td><\/tr><tr><td><p>#2141<\/p><\/td><td>\u00a0<\/td><td>2<\/td><td>To temporarily store the value of DE while calling the CBAS routine<\/td><\/tr><tr><td>#2143<\/td><td>\u00a0<\/td><td>2<\/td><td>Not used<\/td><\/tr><tr><td>#2145<\/td><td>prolen<\/td><td>2<\/td><td>Length of the block being read or written<\/td><\/tr><tr><td>#2147<\/td><td>prostr<\/td><td>2<\/td><td>Address of the block being read or written<\/td><\/tr><tr><td>#2149<\/td><td>\u00a0<\/td><td>2<\/td><td>Address of the string variable<\/td><\/tr><tr><td>#214B<\/td><td>\u00a0<\/td><td>2<\/td><td>The length or number of the record<\/td><\/tr><tr><td>#214D<\/td><td>filetype<\/td><td>1<\/td><td>The type of block to write<\/td><\/tr><tr><td>#214E<\/td><td>filelen<\/td><td>2<\/td><td>The length of this block<\/td><\/tr><tr><td>#2150<\/td><td>start<\/td><td>2<\/td><td>The starting address of this block<\/td><\/tr><tr><td>#2152<\/td><td>\u00a0<\/td><td>2<\/td><td>For LOAD &#8211; the length of the BASIC program<\/td><\/tr><tr><td>#2154 &#8211; #23FF<\/td><td>\u00a0<\/td><td>684<\/td><td>FREE MEMORY<\/td><\/tr><\/tbody><\/table>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3ed6ead elementor-widget elementor-widget-text-editor\" data-id=\"3ed6ead\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\"><strong><span style=\"font-size: 18px;\">Interface ROM (Table 2)<\/span><\/strong><\/p><p style=\"text-align: left;\">To be able to view the ROM, you must run the runway and transfer its contents to the computer&#8217;s operating memory. There you can already use the monitor program.<\/p><p style=\"text-align: left;\">The easiest way is to write SAVE * &#8220;ROM&#8221; CODE 0,4096: LOAD * &#8220;ROM&#8221; CODE 32768. A more elegant solution is a short machine program:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-39a4d95 elementor-widget elementor-widget-text-editor\" data-id=\"39a4d95\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\"><span style=\"font-size: 18px;\">CALL DR_ON&nbsp; &nbsp; &nbsp; ; activate the interface<\/span><\/p>\n<p style=\"text-align: left;\">LD HL, #0000&nbsp; &nbsp; ; first address<\/p>\n<p style=\"text-align: left;\">LD DE, #8000&nbsp; &nbsp; ; to<\/p>\n<p style=\"text-align: left;\">LD BC, #1000&nbsp; &nbsp; ; how many<\/p>\n<p style=\"text-align: left;\">LDIR&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; moving the ROM content to the address # 8000<\/p>\n<p style=\"text-align: left;\">CALL #0603&nbsp; &nbsp; &nbsp; ; activate the standard ROM<\/p>\n<p style=\"text-align: left;\">RET&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; return<\/p>\n<p style=\"text-align: left;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; instead of the last two commands JP # 0603 can be used<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9a7b9ae elementor-widget elementor-widget-text-editor\" data-id=\"9a7b9ae\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\"><span style=\"font-size: 18px;\">A detailed knowledge of the ROM is not necessary to be able to use it, but I think it is worth taking a look at a few places. You have to see for yourself what the RST 8 operation actually looks like. It is also instructive to decipher how the procedure works from address #031D (look for #831D !!). Above all, however, you need to see what is in the area #0605 &#8211; #0628 (now #8605 &#8211; #8628). You just need to know it well and then you can do practically everything in the TOS system &#8211; from recording programs to accessing the station&#8217;s memory. Just in month<\/span><\/p><p style=\"text-align: center;\">TABLE 2.ROM (# 0000- # 0FFF) and (# 1000- # 1FFF)<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-49697b7 elementor-widget elementor-widget-text-editor\" data-id=\"49697b7\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<table style=\"font-size: 14px; font-family: 'Times New Roman';\" border=\"1\" width=\"820\"><tbody><tr><td style=\"font-family: Arial, Helvetica, sans-serif;\" width=\"127\">Address<\/td><td width=\"677\"><p style=\"font-family: Arial, Helvetica, sans-serif;\">Description<\/p><\/td><\/tr><tr><td style=\"font-family: Arial, Helvetica, sans-serif;\">#0000 &#8211; #0007<\/td><td style=\"font-family: Arial, Helvetica, sans-serif;\">Jump to boot routine<\/td><\/tr><tr><td style=\"font-family: Arial, Helvetica, sans-serif;\">#0008 &#8211; #031C<\/td><td style=\"font-family: Arial, Helvetica, sans-serif;\">Support for EST 8 call, parsing tables and routines<\/td><\/tr><tr><td style=\"font-family: Arial, Helvetica, sans-serif;\">#031D &#8211; #0363<\/td><td style=\"font-family: Arial, Helvetica, sans-serif;\">Procedure for calling programs from computer ROM<\/td><\/tr><tr><td style=\"font-family: Arial, Helvetica, sans-serif;\">#0364 &#8211; #03D7<\/td><td style=\"font-family: Arial, Helvetica, sans-serif;\">Higher level communication routines; transferring a buffer or a command to and from a floppy drive<\/td><\/tr><tr><td style=\"font-family: Arial, Helvetica, sans-serif;\">#03D8 &#8211; #0494<\/td><td style=\"font-family: Arial, Helvetica, sans-serif;\">Error handling routines; printout of messages, testing of the BREAK key, return to BASIC<\/td><\/tr><tr><td style=\"font-family: Arial, Helvetica, sans-serif;\">#0495 &#8211; #05BD<\/td><td style=\"font-family: Arial, Helvetica, sans-serif;\">Lower level communication routines; forwarding blocks and single bytes<\/td><\/tr><tr><td style=\"font-family: Arial, Helvetica, sans-serif;\">#05BE &#8211; #0602<\/td><td style=\"font-family: Arial, Helvetica, sans-serif;\">Name of the file loaded at system startup &#8211; &#8220;START&#8221;<\/td><\/tr><tr><td style=\"font-family: Arial, Helvetica, sans-serif;\">#0603 &#8211; #0604<\/td><td style=\"font-family: Arial, Helvetica, sans-serif;\">Disconnect ROM interface, with or without interrupts<\/td><\/tr><tr><td style=\"font-family: Arial, Helvetica, sans-serif;\">#0605 &#8211; #0628<\/td><td style=\"font-family: Arial, Helvetica, sans-serif;\">Jump table to more important subroutines<\/td><\/tr><tr><td style=\"font-family: Arial, Helvetica, sans-serif;\">#0629 &#8211; #0EE0<\/td><td style=\"font-family: Arial, Helvetica, sans-serif;\">Subroutines that execute particular TOS instructions<\/td><\/tr><tr><td style=\"font-family: Arial, Helvetica, sans-serif;\">#0EE1 &#8211; #0FFF<\/td><td style=\"font-family: Arial, Helvetica, sans-serif;\">Boot routine and the text &#8220;\u00a9 TIMEX &#8211; TOS A.2&#8221;<\/td><\/tr><\/tbody><\/table>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a0e42b7 elementor-widget elementor-widget-text-editor\" data-id=\"a0e42b7\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\"><strong>TOS without secrets part. 2<\/strong><\/p><p style=\"text-align: left;\">In the second and third parts of the article, we will deal with the jump table in the ROM interface. It begins with address # 0605 and is twelve hops consecutively to virtually all usable operating system routines.<\/p><p style=\"text-align: left;\">There is some reason to refer to the jump table instead of directly to the addresses of the called procedures. It ensures the compatibility of the written program with the new operating system versions. A possible new interface ROM must follow the same procedures, but they can be in completely different places. [E.g. the TOS code was modified by Zebra Systems to cooperate with Timex Sinclair 2068 computers.] An appropriately modified jump table will enable, despite these changes, the correct operation of our programs.<\/p><p style=\"text-align: left;\">The appearance of a new interface design is unlikely, but it is a programmer&#8217;s good practice to use this type of structure.<\/p><p style=\"text-align: left;\"><strong>The main procedures of the system<\/strong><\/p><p style=\"text-align: left;\">The list of routines included in the jump table, their real addresses, names, tasks, and the method of invoking are presented in table 3. The main part of the entire system consists of the first three subroutines putdat, putcom, and getblock. Their importance is so great, and the amount of information so wide, that the entire third part of this series will be devoted to them. They all use them higher-level functions like wrtmem, rdblock, know, and even savep and loadp. The diagram of data transfer between these sub-programs is presented in Fig. 3.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-149e919 elementor-widget elementor-widget-image\" data-id=\"149e919\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"893\" height=\"776\" src=\"https:\/\/loadzx.com\/timexcomputerworld\/wp-content\/uploads\/2023\/03\/TOSSecretsFIG3-e1679080875943.gif\" class=\"attachment-large size-large wp-image-6652\" alt=\"\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e620197 elementor-widget elementor-widget-text-editor\" data-id=\"e620197\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Fig. 3. Graph of data flow between the TOS system routines of the interface in communication with the disk drive. The line connecting the two rectangles in the graph means that when contacting the station the given higher-level procedure uses the appropriate lower-level procedure. The arrows indicate the direction of data transfer: to or from the disk drive. Savep and loadp routines use many lower-level procedures, but in order not to complicate the drawing unnecessarily, it was only indicated by short arrows. As you can see the putdat, putcom, and getblock are most frequently invoked and are sort of the axis of the entire system.<\/p><p style=\"text-align: center;\">TABLE 3. Procedures in the jump table (# 0605- # 0628)<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-339e36b elementor-widget elementor-widget-text-editor\" data-id=\"339e36b\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<table style=\"font-size: 14px; font-family: Arial, Helvetica, sans-serif;\" border=\"1\" width=\"1219\"><tbody><tr><td width=\"57\">address<\/td><td width=\"55\">name<\/td><td width=\"930\">description<\/td><\/tr><tr><td><p>#0605<br \/>#0395<\/p><\/td><td>putdat<\/td><td>Data transfer to disk drive.<br \/>IN: data in buffer (# 2000- # 20FF)<br \/>A &#8211; number of bytes to be sent.<\/td><\/tr><tr><td><p>#0608<br \/>#0364<\/p><\/td><td>putcom<\/td><td>Send a command to the floppy drive.<br \/>IN: (mod) &#8211; command number; AF, BC, DE, HL, IX, IY &#8211; input data required for a given command<\/td><\/tr><tr><td>#060B<br \/>#03AC<\/td><td>\u00a0<\/td><td><p>Receive a command or a buffer from the floppy disk drive.<br \/>EC: irrelevant.<br \/>OUT: (# 2130) &#8211; length of the transferred block; NC &#8211; the data has been left and are in the buffer, C &#8211; the command was sent, then: (mod) &#8211; the number of the command, the registers are values sent by the FDD system. In the A register the error code, if different from zero, then at the address # 210D- # 212C there is an error message<\/p><\/td><\/tr><tr><td>#060E<br \/>#0495<\/td><td>\u00a0<\/td><td>Send a block of data to the floppy drive.<br \/>IN: HL &#8211; block start address; (type), (len) &#8211; type and length of this block.<br \/>OUT: Z &#8211; OK, NZ &#8211; sending error; stored values of registers BC, DE and HL<\/td><\/tr><tr><td>#0611<br \/>#04D6<\/td><td>\u00a0<\/td><td>Receive data block from floppy disk drive.<br \/>EC: irrelevant.<br \/>OUT: Z &#8211; OK, NZ &#8211; sending error; data in buffer (when data), or at address # 2100 (when command); (type), (len) &#8211; type and length of the block sent; stored values the BC, DE and HL registers<\/td><\/tr><tr><td>#0614<br \/>#0D94<\/td><td>\u00a0<\/td><td>Reading a record from a file into the interface buffer (256 bytes at most).<br \/>IN: (chan) &#8211; channel number, DE &#8211; number of bytes to be loaded.<br \/>OUT: Z &#8211; OK, NZ-error; A &#8211; error code, HL &#8211; data address, BC &#8211; number of bytes loaded, DE &#8211; stored<\/td><\/tr><tr><td>#0617<br \/>#0DBF<\/td><td>rdmem<\/td><td>Load data from a file into memory. The file must be open.<br \/>IN: (prolen) &#8211; number of bytes to be loaded, (prostr) &#8211; data destination address, (chan) &#8211; used channel number.<br \/>OUT: Z &#8211; OK, NZ-error; A &#8211; error code; stored values of registers BC, DE and HL<\/td><\/tr><tr><td>#061A<br \/>#0BS4<\/td><td>wrtmem<\/td><td>Saving data from memory to a file. The file must be open.<br \/>IN: (prolon) &#8211; number of bytes to be sent, (prostr) &#8211; data address, (chan) &#8211; number of the channel used.<br \/>OUT: Z &#8211; OK, NZ &#8211; error; A &#8211; error code; stored values of registers BC, DE and HL<\/td><\/tr><tr><td>#061D<br \/>#031D<\/td><td>cbas<\/td><td>Calling a subroutine from a ZX Spectrum ROM.<br \/>IN: address of the procedure to be called, needed values in registers. Directions for use:<br \/><span style=\"font-family: 'Courier New', Courier, monospace;\">CALL cbas<br \/>DEFW zx_add; routine address<\/span><\/td><\/tr><tr><td>#0620<br \/>#0A61<\/td><td>savep<\/td><td>Save program or data to disk.<br \/>IN: name in buffer (terminated with CHR $ (0)); A &#8216;- name length plus one; A &#8211; block type (0 &#8211; BASIC; 1, 2 &#8211; DATA; 3 &#8211; CODE); BC &#8211; length; DE &#8211; start address;<br \/>HL &#8211; number start line if it is a program. When HL = 0, the program does not start.<br \/>OUT: (# 2102) &#8211; error code, 0 &#8211; OK; stored values of HL, DE, BC and AF.<\/td><\/tr><tr><td>#0623<br \/>#0CC1<\/td><td>loadp<\/td><td>Reading program or data from disk.<br \/>IN: name in buffer (terminated with CHR $ (0)); B &#8211; name length plus one; (filetype) &#8211; type of the read file; (filelen) &#8211; its length, (start) &#8211; destination address.<br \/>OUT: Z &#8211; 0K, NZ &#8211; error; A &#8211; error code.<\/td><\/tr><tr><td>#0626<br \/>#0688<\/td><td>conv<\/td><td>Communication work mode. In this mode, the floppy drive controls the printing of messages on the screen, such as printing a floppy disk directory.<br \/>It invokes after the prior sending a command to the floppy drive.<\/td><\/tr><tr><td>\u00a0<\/td><td>\u00a0<\/td><td>Other useful routines included in the interface ROM<\/td><\/tr><tr><td>#0015<\/td><td>\u00a0<\/td><td>Keyboard test.<br \/>IN: A &#8211; code of a pressed key (always a capital letter)<\/td><\/tr><tr><td>#0033<\/td><td>\u00a0<\/td><td>Printout of the character with the code given in the A register. Same as RST 16<\/td><\/tr><tr><td>#03D8<\/td><td>pr_err<\/td><td>Print a string of characters on the screen. The &#8220;S&#8221; channel is used and the question &#8220;scroll?&#8221; Is disabled.<br \/>IN: HL &#8211; text address; B &#8211; text length, if H even; H odd, 33 characters are printed. Regardless of the contents of the B register, the procedure ends the<br \/>printout after when CHR $ (0) is encountered.<\/td><\/tr><tr><td>#0603<\/td><td>\u00a0<\/td><td>Enable the standard ZX Spectrum ROM with enable INT masked interrupts<\/td><\/tr><tr><td>#0604<\/td><td>\u00a0<\/td><td>Same, but without interrupts<\/td><\/tr><tr><td>#066D<\/td><td>\u00a0<\/td><td>Transfer text to buffer and terminate with CHR $ (0) end tag.<br \/>IN: DE &#8211; text address (usually the file name}, BC &#8211; its length.<br \/>OUT: A, B &#8211; length of the name with a tag, HL &#8211; address of the next character after the tag, DE &#8211; address of the next byte after the text<\/td><\/tr><\/tbody><\/table>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-fe417ee elementor-widget elementor-widget-text-editor\" data-id=\"fe417ee\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><strong>Disk procedures<\/strong><\/p><p>The easiest to use and perhaps the most useful disk handling routines are savep and loadp. They are the exact equivalents of the SAVE and LOAD instructions known from BASIC.<\/p><p>The required input data is described in the appropriate columns of table 1. The most important parameter is the file name: it should be in the interface buffer (address # 2000) and be terminated with CHR $ (0). This tag is important as it determines the length of the file name. The register A &#8216;should contain the length of the name including a trailing zero, but that is just what part of the buffer must be sent to the floppy disk. This value can be successfully larger &#8211; the part of the buffer that does not contain any will be transferred together with the name useful information. The most common use for the savep procedure is to write a CODE block to a floppy disk. Here is an example routine that executes the sequence SAVE *&#8221;data.cod&#8221; CODE 50000,100:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f16fd8b elementor-widget elementor-widget-text-editor\" data-id=\"f16fd8b\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\">\n<\/p><p><span style=\"font-size: 18px;\">PRZKD1 LD DE, NAME&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; file name address<\/span><\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp;LD BC, KON-NAME&nbsp; &nbsp; &nbsp;; its length<\/p>\n<p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">&nbsp; &nbsp; &nbsp; &nbsp;<\/span>CALL # 066D&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; transfer name to buffer<\/p>\n<p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">&nbsp; &nbsp; &nbsp; &nbsp;<\/span>EX AF, AF&#8217;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; name length +1 to A&#8217;<\/p>\n<p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">&nbsp; &nbsp; &nbsp; &nbsp;<\/span>LD A, 3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; block type; CODE<\/p>\n<p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">&nbsp; &nbsp; &nbsp; &nbsp;<\/span>LD DE, 50000&nbsp; &nbsp; &nbsp; &nbsp; ; block address<\/p>\n<p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">&nbsp; &nbsp; &nbsp; &nbsp;<\/span>LD BC, 100&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; its length.<\/p>\n<p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">&nbsp; &nbsp; &nbsp; &nbsp;<\/span>CALL SAVEP&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; save to floppy disk<\/p>\n<p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">&nbsp; &nbsp; &nbsp; &nbsp;<\/span>RET<\/p>\n<p>NAME&nbsp; &nbsp;DEFM &#8220;DATA.COD&#8221;&nbsp; &nbsp; &nbsp;; file name<\/p>\n<p>KON&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; label needed to calculate name length<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1971874 elementor-widget elementor-widget-text-editor\" data-id=\"1971874\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"font-size: 18px;\">The easiest way to put the name in the buffer is by the use of a ready-made subroutine from the interface ROM at address # 066D. The description of its operation is presented in table 2. If a file with the same name as the one being saved is encountered on the floppy disk, the savep procedure tests the contents of the TOS system variable with the address # 2134. If it contains zero, the user is asked for permission to save the new file in place of the old one. Otherwise, it will be done without asking.<\/span><\/p><p>Both when writing and reading data from a floppy disk, four types of blocks are distinguished (exactly as in the case of a tape), marked with consecutive numbers:<\/p><p><span style=\"font-size: 18px;\">0 &#8211; BASIC program,<br \/><\/span><span style=\"font-size: 18px;\">1 &#8211; number array,<br \/><\/span><span style=\"font-size: 18px;\">2 &#8211; character array,<br \/><\/span><span style=\"font-size: 18px;\">3 &#8211; CODE block.<\/span><\/p><p><span style=\"font-size: 18px;\">The block type is important not only as an input to the described procedure but it is also reflected in the record on a floppy disk, which will be described in more detail in one of the further parts of the article. While writing the program in BASIC from the assembler level is a bit pointless (in addition, you have to download and calculate the contents of the THRESHOLD and E_LINE), the reverse is sometimes useful and can be done with loadp:<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-89571f6 elementor-widget elementor-widget-text-editor\" data-id=\"89571f6\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\">\u00a0<\/p><p>PRZKD2 LD DE, NAME<\/p><p>\u00a0 \u00a0 \u00a0 \u00a0LD BC, CON-NAME<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>CALL # 066D\u00a0 \u00a0 \u00a0 \u00a0 ; name to the buffer<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>LD HL, FILETYP<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>LD A, 0<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>LD (FILETYP), A\u00a0 \u00a0 ; block type &#8211; BASIC<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>CALL LOADP\u00a0 \u00a0 \u00a0 \u00a0 \u00a0; recording to memory<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>LD HL, # 210D\u00a0 \u00a0 \u00a0 ; error message address<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>CALL NZ, PR_ERR\u00a0 \u00a0 ; if error &#8211; message<\/p><p>NAME DEFM &#8220;PROGRAM.BAS&#8221;\u00a0 \u00a0; name of the file (program)<\/p><p>KON<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2fa3a11 elementor-widget elementor-widget-text-editor\" data-id=\"2fa3a11\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\">\u00a0<\/p><p><span style=\"font-size: 18px;\">The loadp procedure will take care of setting the appropriate system variables, so much so that the self-starting program will start itself after returning to BASIC. If the variable system TOS with the address # 2138 will have a value other than zero, then the program recorded in the above way will be attached to the existing one in memory, in the same way as it does BASIC MERGE instruction. Note: the developers of the system have completely forgotten about the RAMTOP system variable, as a result of which longer programs load smoothly beyond the intended area and destroy the stack if it is set too low &#8211; with an unpredictable result. This is one of the major shortcomings of the TOS. You can also record blocks of code with the loadp routine. Here is the subroutine that reads the file created in Example 1.<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-278e804 elementor-widget elementor-widget-text-editor\" data-id=\"278e804\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\">\u00a0<\/p><p>PRZKD3 LD DE, NAME<\/p><p>\u00a0 \u00a0 \u00a0 \u00a0LD BC, CON-NAME<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>CALL # 066D\u00a0 \u00a0 \u00a0 \u00a0 ; name to the buffer<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>LD HL, FILETYPE\u00a0 \u00a0 ; see table 3<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>LD (HL), 3\u00a0 \u00a0 \u00a0 \u00a0 \u00a0; block type, CODE<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>LD HL, 100\u00a0 \u00a0 \u00a0 \u00a0 \u00a0; its length<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>LD (FILELEN), HL<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>LD HL, 50000\u00a0 \u00a0 \u00a0 \u00a0; block destination address<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>LD (START), HL<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>CALL LOADP\u00a0 \u00a0 \u00a0 \u00a0 \u00a0; block record<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>LD HL, # 2100\u00a0 \u00a0 \u00a0 ; continue as before<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>CALL NZ, PR_ERR<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>RET<\/p><p>NAME DEFM &#8220;DATA.COD&#8221;<\/p><p>KON<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f0fdfc2 elementor-widget elementor-widget-text-editor\" data-id=\"f0fdfc2\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\">\u00a0<\/p><p><span style=\"font-size: 18px;\">By resigning from the use of the jump table, the above subroutine can be shortened a bit. The fact that loadp refers to the input data (i.e. the FILETYP system variables, FILELEN and START &#8211; see Table 1) using the IX index register, having first set it to the address of the FILETYP variable. So we can put any other address in IX (where they will be provided the information you need) and jump into the procedure in the right place. Previous example after modification:<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d8ab132 elementor-widget elementor-widget-text-editor\" data-id=\"d8ab132\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\">\u00a0<\/p><p>PRZKD4 LD DE, NAME\u00a0 \u00a0 \u00a0 \u00a0 \u00a0; file name address<\/p><p>\u00a0 \u00a0 \u00a0 \u00a0LD BC, KON-NAME\u00a0 \u00a0 \u00a0; its length<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>CALL # 066D\u00a0 \u00a0 \u00a0 \u00a0 \u00a0; name to the buffer,<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>LD IX, DATA\u00a0 \u00a0 \u00a0 \u00a0 \u00a0; in IX, the address of the block description<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>CALL # 0CC5\u00a0 \u00a0 \u00a0 \u00a0 \u00a0; block recording,<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>OR A\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ; was there a mistake?<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>LD HL, # 210D\u00a0 \u00a0 \u00a0 \u00a0; error message address<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>CALL NZ, PR_ERR\u00a0 \u00a0 \u00a0; if error &#8211; message<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>RET<\/p><p>DATA\u00a0 \u00a0DEFB 3\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ; block type, CODE,<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>DEFW 100,50000\u00a0 \u00a0 \u00a0 ; block length and address,<\/p><p>NAME\u00a0 \u00a0DEFM &#8220;DATA.COD&#8221;\u00a0 \u00a0 \u00a0; file name<\/p><p>KON<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b41f797 elementor-widget elementor-widget-text-editor\" data-id=\"b41f797\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"font-size: 18px;\">If the given block length is smaller than the real one, only as many bytes as we wish will be loaded into the memory. Wanting to load the entire file without knowing its sizes, you just need to set the largest possible length, which is 0 (equivalent to 65536 in this case). An address equal to 0 causes the block to be loaded to the place it was written from. Even from BASIC, as few people know, the LOAD *&#8221; data.cod&#8221; CODE 0,50 instruction will load half of our duty block to the address 50000, that is where it was sent from. If so we want to execute LOAD *&#8221; data.cod&#8221; CODE, in the above subroutine, change the address value and the length itself to zero. Indeed, Table 1 shows that the set zero markers is the correct execution of the loadp procedure, but there is an exception to this rule &#8211; an error of the recorded file type. Therefore, it is safer to additionally check with the OR A command whether there is a zero in the A register, which means no error.<\/span><\/p><p>Note: to all those who have skipped the first part of the article, and have impatiently tried to run one of the above examples, I would like to inform you that the computer &#8220;reset&#8221; itself, because it is necessary to first activate the interface memory. Any of the following subroutines can be called as follows:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9ff9cda elementor-widget elementor-widget-text-editor\" data-id=\"9ff9cda\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\">\u00a0<\/p><p>FILETYP EQU # 214D\u00a0 \u00a0; see table 1<\/p><p>FILELEN EQU # 214E<\/p><p>START\u00a0 \u00a0EQU # 2150<\/p><p>SAVEP\u00a0 \u00a0EQU # 0620\u00a0 \u00a0; see table 2<\/p><p>LOADP\u00a0 \u00a0EQU # 0623<\/p><p>PR_ERR\u00a0 EQU # 03D8<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>ORG 60000<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>ENT 60000<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>CALL DR_ON\u00a0 \u00a0; activate the interface<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>CALL PRZKD1\u00a0 ; calling the example<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>JP # 0603\u00a0 \u00a0 ; enable standard ROM and return<\/p><p>DR_ON\u00a0 \u00a0PUSH IY\u00a0 \u00a0 \u00a0 ; see pt. 1<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD IY, 0<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>RST 8<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>POP IY<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>RET<\/p><p>PRZKD1\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ; here is one of the examples given<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-dc61f7d elementor-widget elementor-widget-text-editor\" data-id=\"dc61f7d\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\">\u00a0<\/p><p><span style=\"font-size: 18px;\">Finally, a small boot loader to analyze for yourself. It records two blocks of code and a BASIC program:<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a3dd893 elementor-widget elementor-widget-text-editor\" data-id=\"a3dd893\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\">\u00a0<\/p><p>PRZKD5 LD DE, TABLE<\/p><p>\u00a0 \u00a0 \u00a0 \u00a0LOOP LD A, (DE)<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>CP 255<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>RET Z<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>LD (FILETYPE), A<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>LD HL, 0<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>LD (FILELEN), HL<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>LD (START), HL<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>INC DE<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>LD BC, 12<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>CALL # 066D<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>PUSH DE<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>CALL LOADP<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>LD HL, # 210D<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>OR A<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>CALL NZ, PR_ERR<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>POP DE<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>JR LOOP<\/p><p>TABLE\u00a0 DEFB 3<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>DEFM &#8220;NAME1 .COD&#8221; ; 12 bytes !!<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>DEFB 3<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>DEFM &#8220;NAME2 .COD&#8221; ; 12 bytes !!<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>DEFB 0<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>DEFM &#8220;NAME\u00a0 .BAS&#8221; ; 12 bytes !!<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>DEFB 255<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-96a95c1 elementor-widget elementor-widget-text-editor\" data-id=\"96a95c1\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"font-size: 18px;\">The third part of the article, including a fairly large table with a description of the TOS system commands, a detailed description of how to use them, and almost <\/span><span style=\"font-size: 18px;\">everything about the interface communication with the FDD station. After reading it, you will be able to call from machine code all TOS instructions available in BASIC,\u00a0<\/span><span style=\"font-size: 18px;\">and even a little more.<\/span><\/p><p><strong>TOS from the inside part. 3<\/strong><\/p><p><strong>Computer communication &#8211; FDD<\/strong><\/p><p>In the TOS system, the computer and the interface from the master unit. It gives commands which are then carried out by the station. Communication is based on the &#8220;question &#8211; response &#8220;or&#8221; command &#8211; (execution) &#8211; confirmation. &#8220;You must remember that regardless of the task station ordered, the computer should wait for confirmation of its execution. The master unit communicates with the station via the command system, and the data is transferred via the buffer. There is a data buffer, analogous to the one existing in the interface and also in the disk drive. When a command that requires input data (such as a file name) is executed, it must be in the station buffer. If you&#8217;ve read the second part of this article, then you know how to move them there: put the name in the interface buffer and pass it through putcom. The next step is to send the command. After its execution, the disk drive sends data back to the buffer, but only when it&#8217;s needed. Finally, a command is sent from the station (called the return command) containing a series of information, including the correct execution of the command. A better understanding of the above-described computer and FDD communication mechanism will be enabled by the algorithm shown below (the conversion mode presented in it &#8211; a little further).<\/p><p>The list of system commands and their input and output parameters is presented in Table 4. Thanks to it, you can easily implement any TOS command using the following scheme:<\/p><ol><li>Enter the command number in the first column of the table into the system variable mod.<\/li><li>If a given command requires sending some data, we put it in the buffer and send it with the putdat procedure. We are reminded of this by the word &#8220;yes&#8221; in the third column table.<\/li><li>Before sending the command, appropriate input data, specified in the fourth column, should be placed in the registers.<\/li><li>We send the CALL PUTCOM command. We get the return command CALL GETBLOCK or CALL KONW. The fifth column of the table tells you where to apply the communications work and when to apply it expect data to be sent to the buffer.<\/li><li>If everything is correct, the return data given in the sixth column can be found in the registers or in the buffer.<\/li><\/ol><p>Examples<\/p><p>The simplest communication session consists of sending a command (putcom) and then receiving a return command (get-block). This is how CLOSE # * or DRAW * is executed, for example:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6a3e6b0 elementor-widget elementor-widget-text-editor\" data-id=\"6a3e6b0\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\">\u00a0<\/p><p>DRAW LD A, 9\u00a0 \u00a0 \u00a0 \u00a0 \u00a0; command number<\/p><p>\u00a0 \u00a0 \u00a0LD (MOD), A\u00a0 \u00a0 \u00a0; put in the variable MOD<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span>CALL PUTCOM\u00a0 \u00a0 \u00a0; send command<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span>CALL GETBLOCK\u00a0 \u00a0; receive a return command<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span>RET<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-904db44 elementor-widget elementor-widget-text-editor\" data-id=\"904db44\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\">\u00a0<\/p><p><span style=\"font-size: 18px;\">The MOD label is # 2100 &#8211; see the description of the interface system variables in the first part of the article.<\/span><\/p><p>When we need to send additional data, we put it in the buffer and send (putdat) before the command. Examples of such commands are OPEN # *, GOTO *, or save data on the disk. Here is the GOTO *:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7dbccdc elementor-widget elementor-widget-text-editor\" data-id=\"7dbccdc\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\">\u00a0<\/p><p>GOTO LD DE, NAME\u00a0 \u00a0 \u00a0 \u00a0 ; address of the subdirectory name<\/p><p>\u00a0 \u00a0 \u00a0LD BC, LENNAME\u00a0 \u00a0 \u00a0; name length<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span>CALL # 066D\u00a0 \u00a0 \u00a0 \u00a0 ; transfer to buffer<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span>CALL PUTDAT\u00a0 \u00a0 \u00a0 \u00a0 ; send buffer to FDD<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span>LD A, 7\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ; GOTO * command number<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span>LD (MOD), A\u00a0 \u00a0 \u00a0 \u00a0 ;<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span>XOR A\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ; A = 0 &#8211; name is a subdirectory<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span>CALL PUTCOM\u00a0 \u00a0 \u00a0 \u00a0 ; send command<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span>CALL GETBLOCK\u00a0 \u00a0 \u00a0 ; receive a return command<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span>RET\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ; return from subroutine<\/p><p>NAME DEFM &#8220;directory&#8221;\u00a0 \u00a0; name of the subdirectory<\/p><p>KON\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0; it&#8217;s just a label<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-42db002 elementor-widget elementor-widget-text-editor\" data-id=\"42db002\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"font-size: 18px;\">This subroutine can also be used to change the drive: you only need to replace the command XOR A with LD A, 1 (see table 4) and replace the name of the subdirectory with the name drive.<\/span><\/p><p>After executing commands such as reading a sector, or file, or retrieving a list of open channel information, the station transmits the required data before sending the return command. Pickup of both the contents of the buffer and the return command is done using the get-block procedure. Here is an example program that reads Sector zero from Track 4 of the floppy disk:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e80eabc elementor-widget elementor-widget-text-editor\" data-id=\"e80eabc\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\">\u00a0<\/p><p>SECTOR LD A, 27\u00a0 \u00a0 \u00a0 \u00a0 ; command number<\/p><p>\u00a0 \u00a0 \u00a0 \u00a0LD (MOD), A\u00a0 \u00a0 \u00a0; in the MOD variable<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>LD C, 0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0; drive A<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>LD D, 4\u00a0 \u00a0 \u00a0 \u00a0 \u00a0; track number<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>LD E, 0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0; sector number<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>CALL PUTCOM\u00a0 \u00a0 \u00a0; send command<\/p><p>TWO\u00a0 \u00a0 CALL GETBLOCK\u00a0 \u00a0; get buffer<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>JR NC, TWO\u00a0 \u00a0 \u00a0 ; and return command<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span>RET<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-bf56dc6 elementor-widget elementor-widget-text-editor\" data-id=\"bf56dc6\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"font-size: 18px;\">Pay attention to the JR NC, TWO loop which ensures that the buffer and the return command are received successively (if you don&#8217;t know how &#8211; see table 4, description of the getblock procedure). This design is a basic advantage: regardless of whether the buffer is sent or not (and it will not be sent if there is an error in reading the floppy disk), the entire routine will be executed correctly. Moreover, it works correctly when executing simple DRAW * commands, which makes it easier to write a universal communication procedure. If we want to execute a command that requires two names (ie LET, MOVE, or FORMAT), the sent buffer should contain them. Put them in the order they appear in the syntax BASIC, separating and ending with CHRS (0).<\/span><\/p><p><strong>Communicationsl work<\/strong><\/p><p>The conversational work consists of the fact that the station sends a series of messages to be printed (not about error messages) or waits for a key to be pressed. They are performed in this way, statements such as CAT *, LIST *, and FORMAT *. Thanks to the existence of a special know procedure, the operation of the conversational mode is very simple. The following subroutine executes the same as the CAT * command called from BASIC:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3790ae7 elementor-widget elementor-widget-text-editor\" data-id=\"3790ae7\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\">\u00a0<\/p><p>CAT LD A, 11\u00a0 \u00a0 \u00a0 \u00a0 ; as before<\/p><p>\u00a0 \u00a0 LD (MOD), A\u00a0 \u00a0 \u00a0;<\/p><p>\u00a0 \u00a0 CALL PUTCOM\u00a0 \u00a0 \u00a0; send command<\/p><p>\u00a0 \u00a0 CALL KONW\u00a0 \u00a0 \u00a0 \u00a0; calling the conversation work procedure<\/p><p>\u00a0 \u00a0 RET\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0; and back<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6e73a27 elementor-widget elementor-widget-text-editor\" data-id=\"6e73a27\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"font-size: 18px;\">Such a structure is sufficient in most applications, but sometimes it is necessary to know how to organize conversational work. In short, the return command includes in the mod variable your code. It is one of the four possible numbers from 128 to 131, the meaning of which is described in Table 5. In the case of the simple commands described above, it is always code 128 indicating that the station has carried out the command (not necessarily correctly). When the number contained in the variable mod is greater, it means a request to execute one of the ones described in Table 5 activities. After their implementation (or not), send a confirmation command (at this point it is worth looking at the algorithm again) with a special code 145 and you can receive the buffer again and return the command. And so until it is successful, that is, the station sends the code 128. As an example, it is worth analyzing the subroutine setting of the transmission parameters of the B channel of the serial interface.<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7244733 elementor-widget elementor-widget-text-editor\" data-id=\"7244733\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\">\u00a0<\/p><p>FORMAT\u00a0 \u00a0 LD DE, CH_TXT\u00a0 \u00a0; channel name address<\/p><p>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 LD BC, 5\u00a0 \u00a0 \u00a0 \u00a0 ; its length<\/p><p>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 CALL # 066D\u00a0 \u00a0 \u00a0; put into buffer<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span>CALL PUTDAT\u00a0 \u00a0 \u00a0; send to station<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span>LD A, 21\u00a0 \u00a0 \u00a0 \u00a0 ; FORMAT command code *<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span>LD (MOD), A\u00a0 \u00a0 \u00a0;<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span>LD HL, DATA\u00a0 \u00a0 \u00a0; addr of TI formatting parameters description<\/p><p>CONVERTER PUSH HL\u00a0 \u00a0 \u00a0 \u00a0 \u00a0; storage on the stack<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span>CALL PUTCOM\u00a0 \u00a0 \u00a0; send command<\/p><p>TWO\u00a0 \u00a0 \u00a0 \u00a0CALL GETBLOCK\u00a0 \u00a0; get buffer<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span>JR NC, TWO\u00a0 \u00a0 \u00a0 ; and return command<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span>POP HL\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ; data address recovery,<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span>LD A, (MOD)\u00a0 \u00a0 \u00a0;<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span>CP 128\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ; end of conversation work?<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span>RET Z\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0;<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span>LD A, 145\u00a0 \u00a0 \u00a0 \u00a0; confirmation code<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span>LD (MOD), A\u00a0 \u00a0 \u00a0;<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span>LD A, (HL)\u00a0 \u00a0 \u00a0 ; get parameter<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span>INC HL\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ; showing the data address<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span>JR CONVERTER\u00a0 \u00a0 ; revision<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 <\/span><span style=\"font-size: 18px;\">;<\/span><\/p><p>CH_TXT\u00a0 \u00a0 DEFM &#8220;: CH_B&#8221;\u00a0 \u00a0; channel name<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span>DEFB DATA 0, &#8220;B&#8221;; Text or bytes? B<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span>DEFB 0, &#8220;N&#8221;\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0<\/span>; XON \/ XOFF? N<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span>DEFB 0, &#8220;Y&#8221;\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0<\/span>; Input with wait? Y<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span>DEFB 0, &#8220;O&#8221;\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0<\/span>; Baud rate? ABOUT<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span>DEFB 0, &#8220;N&#8221;\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0<\/span>; parity? N<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span>DEFB 0, &#8220;A&#8221;\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0<\/span>; Stop bits? AND<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span>DEFB 0, &#8220;D&#8221;\u00a0 \u00a0 \u00a0; Bit \/ char? D<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-73b6675 elementor-widget elementor-widget-text-editor\" data-id=\"73b6675\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"font-size: 18px;\">During conversational work, the disk drive can wait a long time for confirmation and there is no time limit. The conversational work loop visible in the algorithm can also be found in Cancel at any time, i.e. give up, for example, the end of the floppy disk directory being sent. For this, it is sufficient to enter any command code from table 4 in place of the confirmation code 145. The Station will interpret this as wanting to abandon the execution of the previous TOS instruction and start executing the new one. It should also be added that the CONVERTER procedure is written in such a way that it can be used in place of the getblock procedure. In place of the sequence:<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c3893f7 elementor-widget elementor-widget-text-editor\" data-id=\"c3893f7\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\">\u00a0<\/p><p>TWO CALL GETBLOCK<\/p><p>\u00a0 \u00a0 JR NC,TWO<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-abe4441 elementor-widget elementor-widget-text-editor\" data-id=\"abe4441\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\">\u00a0<\/p><p><span style=\"font-size: 18px;\">you can successfully write CALL CONVERTER<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0f98d61 elementor-widget elementor-widget-image\" data-id=\"0f98d61\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"473\" height=\"973\" src=\"https:\/\/loadzx.com\/timexcomputerworld\/wp-content\/uploads\/2023\/03\/TOSSecretsFIG4-e1679080901614.gif\" class=\"attachment-large size-large wp-image-6653\" alt=\"\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-11d4cca elementor-widget elementor-widget-text-editor\" data-id=\"11d4cca\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: center;\">Fig. 4. The algorithm shows a diagram of the structure of a subroutine that executes one of the TOS instructions given in Table 4.<\/p><p><strong>Error handling<\/strong><\/p><p><span style=\"font-size: 18px;\">The command is sent by sending 13 bytes starting with the address # 2100. There is its number and the values of all registers in sequence. The command is structured in the same way return. However, in the event of an error, which is 32 bytes long, the station additionally sends a message about the irregularities encountered. Register A, which in the case of correct execution of the command is 0, now contains the error code (in the case of calling the CONVERTER procedure, the contents of register A are destroyed and the error code is only found under address # 2102). Here is a universal routine that prints the error message on the screen when it occurs:<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8e4b106 elementor-widget elementor-widget-text-editor\" data-id=\"8e4b106\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\">\u00a0<\/p><p>ERROR LD A, (12102)\u00a0 \u00a0; error code<\/p><p>\u00a0 \u00a0 \u00a0 OR A\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ; O.K.?<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span>RET Z\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0; return if no error<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span>LD HL, # 21OD\u00a0 \u00a0; address of the sent message<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span>CALL PR_ERR\u00a0 \u00a0 \u00a0; its printout<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span>RET<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a59415c elementor-widget elementor-widget-text-editor\" data-id=\"a59415c\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>It can be called each time after the station executes the command, i.e. both after downloading the return command and after executing the conv.<\/p><p>Traditionally, it&#8217;s better to activate the interface ROM, before trying to run the given sample programs. How it&#8217;s done, you can read in the previous parts of the article.<\/p><p style=\"text-align: center;\"><span style=\"font-size: 18px;\">TABLE 4. Return commands<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-fcb9780 elementor-widget elementor-widget-text-editor\" data-id=\"fcb9780\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<table style=\"font-size: 14px; font-family: 'Times New Roman';\" border=\"1\" width=\"1222\"><tbody><tr><td width=\"35\"><span style=\"font-family: Arial, Helvetica, sans-serif;\">code<\/span><\/td><td width=\"307\"><span style=\"font-family: Arial, Helvetica, sans-serif;\">command<\/span><\/td><td width=\"304\"><span style=\"font-family: Arial, Helvetica, sans-serif;\">output<\/span><\/td><td width=\"35\"><span style=\"font-family: Arial, Helvetica, sans-serif;\">code<\/span><\/td><td width=\"507\"><span style=\"font-family: Arial, Helvetica, sans-serif;\">input<\/span><\/td><\/tr><tr><td>128<\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">End of command execution<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">Described in table 5.<\/span><\/td><td>\u00a0<\/td><td>\u00a0<\/td><\/tr><tr><td>129<\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">Requesting a message to be printed<\/span><\/td><td rowspan=\"3\"><span style=\"font-family: Arial, Helvetica, sans-serif;\">The message text is in the buffer (address #2000) and it is terminated with chr (0)<\/span><\/td><td>145<\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">none Code 145 Is a confirmation of the will to continue<br \/>execute the command<\/span><\/td><\/tr><tr><td>130<\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">Request to print the message and wait for pressing ENTER<\/span><\/td><td>145<\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">A = 13 &#8211; ENTER key code<\/span><\/td><\/tr><tr><td>131<\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">Request to print the message and wait for pressing a key<\/span><\/td><td>145<\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">A &#8211; code of the pressed key<\/span><\/td><\/tr><\/tbody><\/table>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1af0684 elementor-widget elementor-widget-text-editor\" data-id=\"1af0684\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: center;\">TABLE 5. Description of system commands<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e7cc6d4 elementor-widget elementor-widget-text-editor\" data-id=\"e7cc6d4\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<table style=\"font-size: 14px; font-family: 'Times New Roman';\" border=\"1\" width=\"1224\"><tbody><tr><th scope=\"col\" width=\"38\"><span style=\"font-family: Arial, Helvetica, sans-serif;\">code<\/span><\/th><th scope=\"col\" width=\"217\"><span style=\"font-family: Arial, Helvetica, sans-serif;\">command<\/span><\/th><th scope=\"col\" width=\"25\"><span style=\"font-family: Arial, Helvetica, sans-serif;\">buf<\/span><\/th><th scope=\"col\" width=\"497\"><span style=\"font-family: Arial, Helvetica, sans-serif;\">input data<\/span><\/th><th scope=\"col\" width=\"65\"><span style=\"font-family: Arial, Helvetica, sans-serif;\">received<\/span><\/th><th scope=\"col\" width=\"342\"><span style=\"font-family: Arial, Helvetica, sans-serif;\">return data<\/span><\/th><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">0<\/span><\/td><td style=\"font-family: Arial, Helvetica, sans-serif;\">Opening channel<br \/>OPEN # * no .; &#8230;<\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">yes<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">A &#8211; channel number (1-16):<br \/>1-4 fast channels<br \/>5-16 channels free<br \/>D &#8211; channel operating mode:<br \/>D = 0 &#8211; append<br \/>D = 1 &#8211; input<br \/>D = 2 &#8211; output<br \/>D = 3 &#8211; random<br \/>E &#8211; data access mode:<br \/>E = 0 &#8211; record-breaking, in IX length of the record<br \/>E = 1 &#8211; random access<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">norm<\/span><\/td><td rowspan=\"3\"><span style=\"font-family: Arial, Helvetica, sans-serif;\">(# 2102) or A &#8211; error code.<br \/>A = 0 &#8211; OK,<br \/>A&gt; 0 &#8211; error message at the address (# 210D- # 212C)<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">1<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">CLOSE#*nr<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">no<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">A &#8211; channel number<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">norm<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">2<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">Creation file or directory:<br \/>DIM * &#8220;name&#8221;<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">yes<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">A = 0 name means a file or subdirectory,<br \/>A = 1 file only (used with SAVE).<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">norm<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">3<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">Stack printout subdirectories<br \/>LIST*<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">no<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">lack<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">comm<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">(# 2102) &#8211; error code<br \/>(# 2104) or B &#8211; the number of items in the stack subroutines (1-8)<br \/>(# 2107) or L &#8211; the number of the current drive.<br \/>(# 2108) or H &#8211; number of the current subdirectory<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">4<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">Deleting the file or catalog:<br \/>ERASE * &#8220;name&#8221;<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">yes<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">A = 0 &#8211; question if you really want to delete.<br \/>A = 1 &#8211; removes without asking<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">comm<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">(# 2102) &#8211; error code. If there is a mistake, at the address<br \/>(# 210D- # 212C) error message<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">5<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">Name change<br \/>LET * &#8220;n1&#8221; TO &#8220;n2&#8221;<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">yes<\/span><\/td><td rowspan=\"2\"><span style=\"font-family: Arial, Helvetica, sans-serif;\">Before sending the buffer, there should be the old and the new one in sequence name, separated and followed by CHRS (0).<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">norm<\/span><\/td><td rowspan=\"3\"><span style=\"font-family: Arial, Helvetica, sans-serif;\">(# 2102) or A &#8211; error code.<br \/>A = 0 &#8211; OK,<br \/>A&gt; 0 &#8211; a message at the address (# 210D- # 212C)<br \/>error.<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">6<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">MOVE*&#8221;nl&#8221; TO &#8220;n2&#8221;<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">yes<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">norm<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">7<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">Change sub-directory or drive:<br \/>GOTO * &#8220;name&#8221;<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">yes<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">A &#8211; information about the given name:<br \/>A = 0 &#8211; subdirectory,<br \/>A = 1 &#8211; drive names<\/span><\/td><td>\u00a0<\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">8<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">A printout of the current subdirectory.<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">no<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">lack<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">comm<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">(# 2102) &#8211; error code.<br \/>(# 2107) or L &#8211; the number of the current drive.<br \/>(# 2108) or H &#8211; number of the current subdirectory<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">9<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">DRAW*<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">no<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">lack<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">norm<\/span><\/td><td rowspan=\"2\"><span style=\"font-family: Arial, Helvetica, sans-serif;\">As for command no. 0<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">10<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">Pushes the current subdirectory onto the stack.<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">no<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">NOTE: This command is not equivalent to GOSUB *. It&#8217;s necessary to still execute command number 7 (GOTO *).<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">norm<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">11<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">CAT*<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">no<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">lack<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">comm<\/span><\/td><td rowspan=\"4\"><span style=\"font-family: Arial, Helvetica, sans-serif;\">As for command no. 4<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">12<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">CAT*&#8221;name&#8221;<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">yes<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">lack<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">comm<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">13<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">LIST*#nr<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">no<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">B &#8211; channel number.<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">comm<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">14<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">LIST&#8221;*<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">no<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">lack<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">comm<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">15<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">Save to file<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">yes<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">B &#8211; channel number<br \/>In record mode:<br \/>DE &#8211; record number (1-65536)<br \/>DE = 0 and C = 0 &#8211; next.<br \/>In random access:<br \/>DE &#8211; number of bytes to write (1-256).<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">norm<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">(# 2102) or A &#8211; error code.<br \/>A = 0 &#8211; OK,<br \/>A&gt; 0 &#8211; error message at the address (# 210D- # 212C)<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">16<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">Reading from a file<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">no<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">As above, and with random access:<br \/>DE = 0 and C = 255 successive text words are read from the file<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">buff.<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">(# 2102) or A &#8211; error code.<br \/>A = 0 &#8211; loaded record is in the buffer, DE &#8211; length record.<br \/>A&gt; 0 &#8211; error message at the address (# 210D- # 212C)<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">17<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">Formatting a floppy disk<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">yes<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">A = 0 &#8211; 40 tracks,<br \/>A = 1 &#8211; 80 tracks.<br \/>Data in buffer as for LET * (command 5)<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">comm<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">(# 2102) &#8211; error code. If the error is at (# 210D- # 212C) error message.<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">18<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">Sending information about channels<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">no<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">lack<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">norm<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">B &#8211; no. of a free channel<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">19<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">It sent information about an open channel<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">no<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">A &#8211; channel number<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">buff.<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">(# 2002) &#8211; operating mode:<br \/>0 &#8211; append<br \/>1 &#8211; input<br \/>2 &#8211; output<br \/>3 &#8211; random<br \/>(# 2004) &#8211; access mode:<br \/>0 &#8211; record-breaking<br \/>1 &#8211; random access<br \/>(# 2005) &#8211; channel number<br \/>(# 2006-8) &#8211; file length (3 bytes!)<br \/>(# 2009-A) &#8211; number of the next record (element)<br \/>(# 200C) &#8211; dl. record<br \/>(# 200D-F) &#8211; byte number in the file (counted from 0)<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">20<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">Securing and hiding files<br \/>ATTR * &#8220;name&#8221;<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">yes<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">A = 0 &#8211; deprotection (U)<br \/>A = 1 &#8211; securing (P)<br \/>A = 2 &#8211; visualization (V)<br \/>A = 3 &#8211; hiding (I)<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">norm<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">As for command no. 0<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">21<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">RS232C formatting<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">yes<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">lack<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">comm<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">As for command no. 4<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">22<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">RESTORE#nr<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">no<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">A &#8211; channel number<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">norm<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">As for command no. 0<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">23<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">Sending the TOS version number<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">no<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">lack<\/span><\/td><td>\u00a0<\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">For version A.2: H =% 00010001<br \/>&#8211; older 4 bits &#8211; &#8220;A&#8221;<br \/>&#8211; lower 4 bits &#8211; &#8220;2&#8221;<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">24<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">Running a subroutine in memory<br \/>Timex FDD 3000 station<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">no<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">IY &#8211; address of the subroutine to be run.<br \/>A, BC, DE, HL &#8211; passed to the subroutine.<\/span><\/td><td>\u00a0<\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">Register values after subroutine execution<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">25<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">Transfer of data block from station memory<br \/>to the interface buffer.<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">no<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">A &#8211; dl. block being sent.<br \/>DE &#8211; block address in station memory<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">buff.<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">(# 2102) or A &#8211; error code.<br \/>A = 0 &#8211; the block sent is in the buffer.<br \/>A&gt; 0 &#8211; (# 210D- # 212C) error message.<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">26<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">It will stop the data block from the buffer<br \/>interface to the station memory.<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">no<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">Due to a TOS bug, you have to manually construct the o command<br \/>length such as the block being transferred.<br \/>(# 2105) &#8211; destination address in the station memory.<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">norm<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">DE -address of the end of the transferred block + 1<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">27<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">Loading a sector from a floppy disk<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">no<\/span><\/td><td rowspan=\"2\"><span style=\"font-family: Arial, Helvetica, sans-serif;\">C &#8211; drive number,<br \/>C = 0 A drive, 1-B etc.<br \/>D &#8211; track number,<br \/>E &#8211; sector number.<br \/>Sequentially E = 0, 7, 14, 5, 12, 3, 10, 1, 8, 15, 6, 13, 4, 11, 2, 9.<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">buff.<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">(# 2102) or A &#8211; error code.<br \/>A = 0 &#8211; the sector read is in the buffer.<br \/>A&gt; 0 &#8211; error message at the address (# 210D- # 212C)<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">28<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">Record a sector on a floppy disk<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">yes<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">norm<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">As for command no. 0<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">29<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">CLOSE*<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">no<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">lack<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">norm<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">As for command no. 0<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">30<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">Requesting the address of a service function<br \/>in the disk drive.<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">no<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">A &#8211; number of auxiliary function.<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">norm<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">HL &#8211; address of the auxiliary function<\/span><\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">31<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">?<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">no<\/span><\/td><td>\u00a0<\/td><td>\u00a0<\/td><td>\u00a0<\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">32<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">?<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">yes<\/span><\/td><td>\u00a0<\/td><td>\u00a0<\/td><td>\u00a0<\/td><\/tr><tr><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">33<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">Equivalent to GOSUB * &#8220;path&#8221;<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">yes<\/span><\/td><td>\u00a0<\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">norm<\/span><\/td><td><span style=\"font-family: Arial, Helvetica, sans-serif;\">As for command no. 0<\/span><\/td><\/tr><\/tbody><\/table>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-480e026 elementor-widget elementor-widget-text-editor\" data-id=\"480e026\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><strong>What&#8217;s next?<\/strong><\/p><p>In the next part of this cycle, I will show you how to use the disk drive memory and run programs in it. There are also some interesting uses for the interface, including a simple way of extending the BASIC interpreter instruction list and self-executing CODE programs. To the impatient, I inform you that all necessary to complete these ideas, information has already been provided and can be found in the tables included in this part of the article or the previous ones.<\/p><p><strong>TOS from the inside part. 4<\/strong><\/p><p>The entire fourth part of the &#8220;Tos without secrets&#8221; series is devoted to two system variables of the interface: jump and finit, which give the programmer a lot of possibilities. Reading this article will answer a series of questions about a few common software tricks that shouldn&#8217;t work at first glance on the ZX Spectrum.<\/p><p>In the first part of the series, I wrote that the creators of TOS left several gates for programmers. The algorithm presented there was by definition general, so it could not show how to use them.<\/p><p>Fig. 5 shows its new version, which includes two places where we can change the course of the disk command interface saved in the ROM.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9a2d6fd elementor-widget elementor-widget-image\" data-id=\"9a2d6fd\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"923\" height=\"777\" src=\"https:\/\/loadzx.com\/timexcomputerworld\/wp-content\/uploads\/2023\/03\/TOSSecretsFIG5-e1679080919170.gif\" class=\"attachment-large size-large wp-image-6654\" alt=\"\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-876db8f elementor-widget elementor-widget-text-editor\" data-id=\"876db8f\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: center;\">Fig. 5. Algorithm showing how the interface handles RST 8.<\/p><p>Among the interface system variables (see Table 1) there are two variables jump and finit, which contain the address of the BASIC return procedure after the TOS command and the address of the syntax error handler. As the algorithm shows, the handling of each TOS command ends with the sequence: LD HL, (JUMP): JP (HL), which allows us to change the content of the jump system variable, to run another (your own) program before going back, or even instead of going back to BASIC. A similar situation occurs when a syntax error is encountered: usually, the routine from address # 0082 is executed, as this is what the finit variable originally has. However, by changing the address it contains, you can execute your own program recognizing and executing new, manually defined BASIC statements.<\/p><p><strong>Self-starting programs<\/strong><\/p><p>As an example of using the jump variable, it is worth analyzing and running the following program:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5b77d7b elementor-widget elementor-widget-text-editor\" data-id=\"5b77d7b\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\">\u00a0<\/p><p>\u00a010:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ; Program: DONE!<\/p><p>\u00a020:\u00a0 \u00a0 \u00a0 \u00a0 ORG 60000<\/p><p>\u00a030:\u00a0 \u00a0 \u00a0 \u00a0 ENT 60000<\/p><p>\u00a040: JUMP\u00a0 \u00a0EQU # 213D<\/p><p>\u00a050: CBAS\u00a0 \u00a0EQU # 061D<\/p><p>\u00a060: BEEP\u00a0 \u00a0EQU # 03B5<\/p><p>\u00a070: PR_ERR EQU # 03D8<\/p><p>\u00a080:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ; Program installation:<\/p><p>\u00a090:\u00a0 \u00a0 \u00a0 \u00a0 PUSH IY\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0; activate interface<\/p><p>100:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0\u00a0<\/span>LD IY, 0<\/p><p>110:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0\u00a0<\/span>RST 8<\/p><p>120:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0\u00a0<\/span>POP IY<\/p><p>130:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0<\/span><span style=\"font-size: 18px;\">; New address for JUMP variable:<\/span><\/p><p>140:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0\u00a0<\/span>LD HL, RUN<\/p><p>150:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0\u00a0<\/span>LD (JUMP), HL<\/p><p>160:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0\u00a0<\/span>JP # 0603\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0\u00a0<\/span>; End of installation.<\/p><p>170:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0<\/span><span style=\"font-size: 18px;\">; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/span><\/p><p>171:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px;\">; Main program writing text DONE !:<\/span><\/p><p>180: RUN\u00a0 \u00a0 LD HL, MESSAGE\u00a0 \u00a0 \u00a0 \u00a0 ; text address<\/p><p>190:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0\u00a0<\/span>CALL #PR_ERR\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ; write text<\/p><p>200:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0\u00a0<\/span>JP # 06E3\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0; jump to standard return procedure<\/p><p>210: NAPIS\u00a0 DEFM WORDS &#8220;DONE!&#8221;\u00a0 \u00a0 ;text<\/p><p>220:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0\u00a0<\/span>DEFB 0<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9b1dabf elementor-widget elementor-widget-text-editor\" data-id=\"9b1dabf\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\">It consists of two parts: the installation and the main part. It needs to be compiled and then run (in the case of GENS with the R directive). This will install the program, i.e. changing the value of the variable jump to the address of the RUN label. Now go back to BASIC and check its operation: after executing each TOS command, the computer will write &#8220;DONE!&#8221;.<\/p><p style=\"text-align: left;\">Although this thing is not very effective and useless, it is an important step in understanding the methods and learning the skills of programming the station. The use of this mechanism enables, in a way that can be safely called a trick, to create self-launching CODE programs.<\/p><p style=\"text-align: left;\">The main thing to be aware of is that the interface is active during TOS operations, so also when writing to and reading from the floppy disk. Command SAVE * &#8220;ROM&#8221;\u00a0<span style=\"font-size: 18px;\">CODE 0,16384 will not write the ZX Spectrum ROM on the floppy disk at all, but visible in this ROM and RAM address space of the interface! Similarly, reading the data to address # 2100 will result in modifying the contents of interface system variables. It is easy to predict that such action will usually result in the system freezing. However, it can be created specifically <\/span><span style=\"font-size: 18px;\">a crafted file, which, after being loaded into the # 213D address, will only change the value of the variable jump and a dozen or so others that are not recorded during recording (accidentally and after certain conditions are met!) any meaning. If, for example, we assume that 100 bytes are read, the first 24 will be in the system variable area, and the remaining 76\u00a0<\/span><span style=\"font-size: 18px;\">(containing the program to run) will be in the free RAM area of the interface. Now the variable jump contains the address of this program and thanks described at the beginning\u00a0<\/span><span style=\"font-size: 18px;\">the mechanism will be started. Here is a program that, after typing and running, will create a self-booting file on the disk called &#8220;START.COD&#8221;:<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e6eccb1 elementor-widget elementor-widget-text-editor\" data-id=\"e6eccb1\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\">\u00a0<\/p><p>.10:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0; A program that creates a file on a floppy disk<\/p><p>.11:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0; self-starting CODE type.<\/p><p>.20:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ORG 60000<\/p><p>.30:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ENT 60000<\/p><p>.40: FINIT\u00a0 \u00a0 EQU #213B<\/p><p>.50: JUMP\u00a0 \u00a0 \u00a0EQU #213D<\/p><p>.60: RAM\u00a0 \u00a0 \u00a0 EQU #2154<\/p><p>.70: SAVEP\u00a0 \u00a0 EQU #0620<\/p><p>.80: PR_ERR\u00a0 \u00a0EQU #03D8<\/p><p>.90:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0; Activate the interface:<\/p><p>100:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 PUSH IY\u00a0 \u00a0 \u00a0 \u00a0 ; activate interface<\/p><p>110:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD IY, 0<\/p><p>120:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>RST 8<\/p><p>130:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>POP IY<\/p><p>140:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px;\">; Sets variable jump to the auto-start address<\/span><\/p><p>141:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px;\">; and transferring his program there<\/span><\/p><p>142:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px;\">; handling:<\/span><\/p><p>150:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD HL, #0082<\/p><p>160:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD (FINIT), H\u0141<\/p><p>170:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD HL, RAM<\/p><p>180:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD (JUMP), HL<\/p><p>190:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>EX DE, HL<\/p><p>200:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD HL, START<\/p><p>210:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD BC, KON-START<\/p><p>220:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LDIR<\/p><p>230:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0<\/span><span style=\"font-size: 18px;\">; SAVE * &#8220;START.COD&#8221; CODE JUMP, KON-START + 24<\/span><\/p><p>240:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD DE, NAME<\/p><p>250:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD BC, END-NAME<\/p><p>260:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>CALL #66D<\/p><p>270:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>EX AF, AF &#8216;<\/p><p>280:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD A, 3<\/p><p>290:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD DE, JUMP<\/p><p>300:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD BC, KON-START + 24<\/p><p>310:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>CALL SAVEP<\/p><p>320:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>JP #603<\/p><p>330: NAME\u00a0 \u00a0 \u00a0DEFM &#8220;START.COD&#8221;<\/p><p>340: END<\/p><p>350:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p><p>351:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ; Code of the self-start-up program.<\/p><p>360: START\u00a0 \u00a0 LD HL, #06E3\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ; in the JUMP variable belongs<\/p><p>370:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD (JUMP), HL\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0; put previous address<\/p><p>380:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD HL, LETTERS-START+RAM\u00a0 ; text address<\/p><p>490:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>CALL PR_ERR\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0<\/span><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 <\/span><span style=\"font-size: 18px;\">; write message<\/span><\/p><p>400:\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>JP #06E3\u00a0\u00a0<span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>; return to BASIC<\/p><p>410 LETTERS\u00a0 \u00a0DEFM &#8220;HERE AUTOSTART. WELCOME!&#8221;<\/p><p>420 DEFB 0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ; text<\/p><p>430 KON\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0; end label<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-31b4325 elementor-widget elementor-widget-text-editor\" data-id=\"31b4325\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Most of the instructions of the above program are only intended to install the procedure and save it to disk. The proper part is at the end of it and only this part will be found in the file. After entering the LOAD * &#8220;START.COD&#8221; CODE command from BASIC, the message &#8220;HERE AUTOSTART! WELCOME!&#8221; will appear on the screen. This is not a &#8220;DONE!&#8221; trick, which is easy to be sure of turning off the computer for a while. If you want to create self-booting files using the above method, remember that the code contained in them must be relocatable. You must also absolutely remember to set jump to the standard value (lines 360 &#8211; 370). To remove any ambiguities I will add that although the &#8220;START.COD&#8221; program will run itself after recording, it is still a CODE program and in no case will it be automatically launched when the computer is turned on, i.e. system startup, even got to name it &#8220;START&#8221;.<\/p><p>The use of the above method allows you to obtain completely new and unusual effects. One of the readers sent us a very nicely made program for compressing files on the disk.<\/p><p>The packed file contains a decompression procedure inside, which by running in the above way loads the data into the memory, unpacking it at the same time. If we receive consent\u00a0<span style=\"font-size: 18px;\">author, we will include this program in the ongoing ZX-SHAREWARE.<\/span><\/p><p>\u00a0<\/p><p><strong><span style=\"font-size: 18px;\">New instructions<\/span><\/strong><\/p><p>The subroutine that supports new BASIC instructions is conveniently placed in the interface RAM, because it is an area quite well protected against changing the contents, and even not available for the NEW command. It is not easy to write such a program and it is difficult even for moderately experienced programmers. It must consist of two parts:<\/p><p>parsing and executing individual commands. The former usually causes the most problems. Not only is it necessary to recognize the operating mode of the computer (parsing or executing the program), the stack is still &#8220;cluttered&#8221; with some addresses, the number of which depends on the command code. The interface ROM contains quite good and workable use mechanisms for parsing the syntax, by means of which you can, by creating a special table and a small programmer, implement a number of new commands with quite complicated syntax. The description of this method would be addressed to a narrow group of people, too long and difficult to include in Bajtek. For those interested in this problem, I can provide information by correspondence.<\/p><p>The simplest method of appending a new instruction is to use an unused CAT instruction. Its advantage is that its syntax is checked and accepted by the interpreter, so it doesn&#8217;t you have to take care of her. This fact simplifies the handler considerably, as can be seen in the example below. The parsing part is only lines 180 to 220. After typing it should compile it, and then run it with the R assembler directive.<\/p><div>\u00a0<\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9e2bb8e elementor-widget elementor-widget-text-editor\" data-id=\"9e2bb8e\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\">\u00a0<\/p><p>\u00a010:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ; Installing a new BASIC instruction.<\/p><p>\u00a020:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ORG 60000<\/p><p>\u00a030:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ENT 60000<\/p><p>\u00a040: FINIT\u00a0 \u00a0 EQU #213B<\/p><p>\u00a050: MOD\u00a0 \u00a0 \u00a0 EQU #2100<\/p><p>\u00a060: PUTCOM\u00a0 \u00a0EQU #0608<\/p><p>\u00a070: GETBLCK\u00a0 EQU #060B<\/p><p>\u00a080:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ; Installing part:<\/p><p>\u00a090:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 PUSH IY<\/p><p>100:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 LD IY, 0<\/p><p>110:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 RST 8<\/p><p>120:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 POP IY<\/p><p>130:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ; In the variable FINIT, the new address:<\/p><p>140:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 LD HL, RUN<\/p><p>150:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 LD (FINIT), HL<\/p><p>160:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 JP #0603\u00a0 \u00a0 \u00a0 ; end of installation.<\/p><p>170:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p><p>171:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ; New CAT instruction handler:<\/p><p>180: RUN\u00a0 \u00a0 \u00a0 LD HL, (23645); address of the command to be interpreted,<\/p><p>190:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 DEC HL<\/p><p>200:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 LD A, (HL)\u00a0 \u00a0 ; code of this command<\/p><p>210:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 CP 207\u00a0 \u00a0 \u00a0 \u00a0 ; is it CAT?<\/p><p>220:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 JP NZ, #0082\u00a0 ; if not &#8211; return<\/p><p>230:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 POP HL\u00a0 \u00a0 \u00a0 \u00a0 ; &#8220;clean&#8221; the stack<\/p><p>240:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 LD A, 11\u00a0 \u00a0 \u00a0 ; CAT command code *<\/p><p>250:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 LD (MOD), A<\/p><p>260: PETLA0\u00a0 \u00a0CALL PUTCOM\u00a0 \u00a0; send command.<\/p><p>270:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ; Support for conversational mode:<\/p><p>280: PETLA1\u00a0 \u00a0CALL GETBLCK\u00a0 ; receive buffer<\/p><p>290:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 JR NC, PETLA1 ; and callback<\/p><p>300:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 LD A, (MOD)\u00a0 \u00a0; callback code<\/p><p>310:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 CP #80\u00a0 \u00a0 \u00a0 \u00a0 ; end?<\/p><p>320:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 JP Z, #0603\u00a0 \u00a0; yes &#8211; return<\/p><p>330:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 XOR A\u00a0 \u00a0 \u00a0 \u00a0 \u00a0; shortened text to<\/p><p>340:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 LD (#2014), A ; 14 characters<\/p><p>350:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 CALL #06D5\u00a0 \u00a0 ; write text from buffer<\/p><p>360:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 LD A, #91\u00a0 \u00a0 \u00a0; continuation code<\/p><p>370:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 LD (MOD), A<\/p><p>380:\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 JR PETLA0\u00a0 \u00a0 \u00a0; close loop<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-eee7fbb elementor-widget elementor-widget-text-editor\" data-id=\"eee7fbb\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>The installer places an address equal to the value of the RUN label in the finit variable. Back in BASIC, you can type CAT and instead of the usual &#8220;lnvalid stream&#8221; you will see the floppy directory. To distinguish it from the traditional one, it is a bit modified. The above program is located at 60000, which proves that it can be anywhere in the memory. However, when you put it in the interface memory, you can then save on a floppy disk (as one block) a fragment of memory from address # 213B (address of the finit variable) until the end of the program. To reinstall this new manual, just upload the resulting file to your computer. The same principle works in Bytie 2\/92 program EXX.COD. The curious can use his example to see how to easily write a syntax analysis for three new, completely unusual commands.<\/p><p><strong>The disk<\/strong><\/p><p>For starters &#8211; a handful of information on how to save data on a floppy disk. The standard drive has two sides, called A and B. On a 3-inch floppy disk, the appropriate letters are displayed and the change of the side consists in taking the disc out of the drive and inserting it oppositely. In 5.25 &#8220;drives with two heads, the matter is as simple &#8211; just use a switch, which the station should be equipped with. With 80-track drives, you don&#8217;t need to switch anything as the TOS can format to 640K using both sides.<\/p><p>The surface of each side of the floppy disk is divided into tracks, which are 40 or 80 depending on the type of drive. There are sixteen sectors in each of them.<\/p><p>It is easy to calculate that the track contains 4 kB and the sector is 256 B. Sectors are grouped by fours in the so-called allocation units, numbered from zero. There are four of them on each path. In 640 kB format, the allocation unit contains 4 kB, which is exactly the entire track. From a simple calculation, we get the capacity of an ordinary floppy disk: 2 sides * 40 tracks * 4 kB = 2 * 160 kB = 320 kB, and dense: 2 sides * 80 tracks * 4 kB = 640 kB. All tracks and sectors are zero-based.<\/p><p>Tracks 0 to 3 contain the operating system (16 KB) that is automatically loaded into the station&#8217;s memory after it is turned on or reset. On track 4 there is a directory on the disk it is the most interesting from a programmer&#8217;s point of view. This area is divided into 128 fields (records), 32 bytes each. Each field describes the entire file or sometimes only part of it. Meaning individual bytes is explained in figure 6a. Since a single directory record describes a maximum of 16 allocation units, for files longer than 16 KB (or 64 KB in the format (dense), more than one such record is created. The directory is contained in allocation units with numbers from 0 to 3 (in dense format &#8211; only 0). The directory structure imposes a maximum of 127 files that can be on a floppy disk.<\/p><p>If we create a subdirectory on the disk, information about it will also be placed in the disk directory. The description of the subdirectory record is shown on the fig. 6b. At the beginning of the directory track there is always a disk name, written in the same way as a subdirectory record.<\/p><p>Figure 7 shows the numbering of sectors and allocation blocks. The allocation block is the basic accounting area of floppy disk memory. Its length defines the smallest space that the file may take up. If you write 100 bytes on a regular drive, a 1KB area will be reserved for them anyway. In a dense drive where the allocation unit has 4 kB, the resulting waste is even greater. On a rare floppy disk, each side is numbered separately. The dense drive numbers both sides of the floppy disk alternately. Feeding an allocation block is always at the beginning of a directory track. There is no information in the directory about the types of files on the floppy disk. The TOS system, as in the case of recording on the tape, distinguishes between four types. Whether it is a program or a drawing is decided by the header placed at the beginning of the file. Figure 3 shows its structure in all four cases. So it is obvious that the picture is saved <span style=\"font-size: 18px;\">on a floppy disk it is not 6912 but 6917 bytes.<\/span><\/p><p>[The method of organizing a floppy disk is basically the same as in the CP\/M 2.2 system. Sparse disks can be read without any problems under CP \/ M, after appropriate configuration\u00a0<span style=\"font-size: 18px;\">parameters and interleaving. The files in the TOS subdirectories will appear in the USER CP\/M areas (only 15 subdirectories can be created under TOS). Saving files under CP\/M is also possible, but the exact length of the file (in the range of the last 256 bytes), which was solved differently in TOS and CP\/M, will be incorrectly written. At least, using a rare broker floppy disks, we transferred a large number of files from TOS to 820 kB disks, from which you can read programs using a simplified version of TOS &#8211; the TOSQ1.COM program under CP\/M. ]<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3271f5d elementor-widget elementor-widget-text-editor\" data-id=\"3271f5d\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"font-family: Arial, Helvetica, sans-serif; font-size: medium; font-style: normal; font-weight: 400;\">\u00a0<\/p><table style=\"font-family: 'Times New Roman';\" border=\"1\" width=\"1000\"><tbody><tr><th scope=\"col\"><div align=\"center\"><span style=\"font-family: 'Courier New', Courier, monospace;\">0<\/span><\/div><\/th><th scope=\"col\"><div align=\"center\"><span style=\"font-family: 'Courier New', Courier, monospace;\">1-8<\/span><\/div><\/th><th scope=\"col\"><div align=\"center\"><span style=\"font-family: 'Courier New', Courier, monospace;\">9-B<\/span><\/div><\/th><th scope=\"col\"><div align=\"center\"><span style=\"font-family: 'Courier New', Courier, monospace;\">C<\/span><\/div><\/th><th scope=\"col\"><div align=\"center\"><span style=\"font-family: 'Courier New', Courier, monospace;\">D<\/span><\/div><\/th><th scope=\"col\"><div align=\"center\"><span style=\"font-family: 'Courier New', Courier, monospace;\">E<\/span><\/div><\/th><th scope=\"col\"><div align=\"center\"><span style=\"font-family: 'Courier New', Courier, monospace;\">F<\/span><\/div><\/th><th scope=\"col\"><div align=\"center\"><span style=\"font-family: 'Courier New', Courier, monospace;\">10-1F<\/span><\/div><\/th><\/tr><tr><td><div align=\"center\"><strong><span style=\"font-family: 'Courier New', Courier, monospace;\">K<\/span><\/strong><\/div><\/td><td><div align=\"center\"><strong><span style=\"font-family: 'Courier New', Courier, monospace;\">N<\/span><\/strong><\/div><\/td><td><div align=\"center\"><strong><span style=\"font-family: 'Courier New', Courier, monospace;\">E<\/span><\/strong><\/div><\/td><td><div align=\"center\"><strong><span style=\"font-family: 'Courier New', Courier, monospace;\">O<\/span><\/strong><\/div><\/td><td><div align=\"center\"><strong><span style=\"font-family: 'Courier New', Courier, monospace;\">L<\/span><\/strong><\/div><\/td><td><div align=\"center\"><strong><span style=\"font-family: 'Courier New', Courier, monospace;\">R<\/span><\/strong><\/div><\/td><td><div align=\"center\"><strong><span style=\"font-family: 'Courier New', Courier, monospace;\">R<\/span><\/strong><\/div><\/td><td><div align=\"center\"><strong><span style=\"font-family: 'Courier New', Courier, monospace;\">A<\/span><\/strong><\/div><\/td><\/tr><\/tbody><\/table>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1587a8a elementor-widget elementor-widget-text-editor\" data-id=\"1587a8a\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>K &#8211; number of the subdirectory in which the file is;<br \/><span style=\"font-size: 18px;\">N &#8211; 8 bytes of name (capital letters);<br \/><\/span><span style=\"font-size: 18px;\">E &#8211; 3 bytes of extension; additionally:<br \/><\/span><span style=\"font-size: 18px;\">bit 7 E1 &#8211; hidden file<br \/><\/span><span style=\"font-size: 18px;\">bit 7 E2 &#8211; file protected against deletion;<br \/><\/span><span style=\"font-size: 18px;\">O &#8211; number of the next record when describing a long file;<br \/><\/span><span style=\"font-size: 18px;\">L &#8211; number of bytes in the last sector of the file;<br \/><\/span><span style=\"font-size: 18px;\">R &#8211; number of 128-byte records used by the file;<br \/><\/span><span style=\"font-size: 18px;\">A &#8211; 16 bytes describing the unit assignment allocative.<\/span><\/p><p style=\"text-align: center;\"><span style=\"font-size: 18px;\">Fig. 6a. File record<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c8c1b60 elementor-widget elementor-widget-text-editor\" data-id=\"c8c1b60\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<table style=\"font-size: 14px; font-family: 'Times New Roman';\" border=\"1\" width=\"1000\"><tbody><tr><th scope=\"col\"><div align=\"center\"><strong><span style=\"font-family: 'Courier New', Courier, monospace;\">0<\/span><\/strong><\/div><\/th><th scope=\"col\"><div align=\"center\"><strong><span style=\"font-family: 'Courier New', Courier, monospace;\">1-8<\/span><\/strong><\/div><\/th><th scope=\"col\"><div align=\"center\"><strong><span style=\"font-family: 'Courier New', Courier, monospace;\">9AB<\/span><\/strong><\/div><\/th><th scope=\"col\"><div align=\"center\"><strong><span style=\"font-family: 'Courier New', Courier, monospace;\">C<\/span><\/strong><\/div><\/th><th scope=\"col\"><div align=\"center\"><strong><span style=\"font-family: 'Courier New', Courier, monospace;\">D<\/span><\/strong><\/div><\/th><th scope=\"col\"><div align=\"center\"><strong><span style=\"font-family: 'Courier New', Courier, monospace;\">E<\/span><\/strong><\/div><\/th><th scope=\"col\"><div align=\"center\"><strong><span style=\"font-family: 'Courier New', Courier, monospace;\">F<\/span><\/strong><\/div><\/th><th scope=\"col\"><div align=\"center\"><strong><span style=\"font-family: 'Courier New', Courier, monospace;\">10-1F<\/span><\/strong><\/div><\/th><\/tr><tr><td><div align=\"center\"><strong><span style=\"font-family: 'Courier New', Courier, monospace;\">K<\/span><\/strong><\/div><\/td><td><div align=\"center\"><strong><span style=\"font-family: 'Courier New', Courier, monospace;\">N<\/span><\/strong><\/div><\/td><td><div align=\"center\"><strong><span style=\"font-family: 'Courier New', Courier, monospace;\">E<\/span><\/strong><\/div><\/td><td><div align=\"center\"><strong><span style=\"font-family: 'Courier New', Courier, monospace;\">00<\/span><\/strong><\/div><\/td><td><div align=\"center\"><strong><span style=\"font-family: 'Courier New', Courier, monospace;\">00<\/span><\/strong><\/div><\/td><td><div align=\"center\"><strong><span style=\"font-family: 'Courier New', Courier, monospace;\">00<\/span><\/strong><\/div><\/td><td><div align=\"center\"><strong>D<\/strong><\/div><\/td><td><div align=\"center\"><strong><span style=\"font-family: 'Courier New', Courier, monospace;\">00<\/span><\/strong><\/div><\/td><\/tr><\/tbody><\/table>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-173e89c elementor-widget elementor-widget-text-editor\" data-id=\"173e89c\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>K &#8211; number of the subdirectory in which this subdirectory is (FF for the disk name);<br \/><span style=\"font-size: 18px;\">N &#8211; 8 bytes of name (capital letters);<br \/><\/span><span style=\"font-size: 18px;\">E &#8211; 3 extension bytes (DIR); additionally:<br \/><\/span><span style=\"font-size: 18px;\">bit 7 El &#8211; hidden directory<br \/><\/span><span style=\"font-size: 18px;\">bit 7 E2 &#8211; directory protected against deletion;<br \/><\/span><span style=\"font-size: 18px;\">D &#8211; byte specifying the number assigned to the subdirectory (0 for the disk name).<\/span><\/p><p style=\"text-align: center;\"><span style=\"font-size: 18px;\">Fig. 6b. Subdirectories record<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7a378c0 elementor-widget elementor-widget-image\" data-id=\"7a378c0\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"987\" height=\"334\" src=\"https:\/\/loadzx.com\/timexcomputerworld\/wp-content\/uploads\/2023\/03\/TOSSecretsFIG7-e1679080939245.gif\" class=\"attachment-large size-large wp-image-6655\" alt=\"\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5bbaa31 elementor-widget elementor-widget-text-editor\" data-id=\"5bbaa31\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: center;\">Fig. 7. Track numbering for a) plain disk (320 kB), b) dense disk (640 kB).<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-cc930f1 elementor-widget elementor-widget-image\" data-id=\"cc930f1\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"558\" height=\"200\" src=\"https:\/\/loadzx.com\/timexcomputerworld\/wp-content\/uploads\/2023\/03\/TOSSecretsFIG8-e1679080961625.gif\" class=\"attachment-large size-large wp-image-6656\" alt=\"\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3860c2e elementor-widget elementor-widget-text-editor\" data-id=\"3860c2e\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: center;\">Fig. 8. Structure of file headers: a) BASIC language program, b) numeric array, c) character array, d) CODE type.<\/p><p><strong>Station memory<\/strong><\/p><p>In the list of system commands (Table 5), there are three commands (with codes 24, 25, and 26) that help operate the memory of the Timex FDD 3000 station.<\/p><p>One runs the program in the disk drive, and the next two are responsible for transferring data between it and the computer. Unfortunately, broadcasting to station memory does not work due to an error made by TOS developers. There was a hint in the table on how to deal with this, but too crude to be easily used. However, we are glad that we did not take previously this topic because yesterday there was a completely new idea to work around this error.<\/p><p>The new method is more effective and two times faster than the one used so far. In short, it looks like this: the data block should be transferred to the station buffer with putdat routines, and then run a subroutine:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7ff834e elementor-widget elementor-widget-text-editor\" data-id=\"7ff834e\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\">\u00a0<\/p><p>LDIR<\/p><p>RET<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6ef1d1e elementor-widget elementor-widget-text-editor\" data-id=\"6ef1d1e\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>found by luck in the memory of the station at #1879. It enables the transfer of data from the station&#8217;s buffer to any place in its memory. In the frame shown here, three fully relocatable routines will make it easier for you to access these 48 hidden kilobytes. The use of subroutines is obvious, and the usage is shown in the following simple example:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-205f0d1 elementor-widget elementor-widget-text-editor\" data-id=\"205f0d1\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p style=\"text-align: left;\">\u00a0<\/p><p>; Sample program showing how to use<\/p><p>; ZX_FDD and FDD_ZX procedures.<\/p><p>\u00a0 \u00a0 \u00a0 \u00a0 ORG 60000<\/p><p>; Saving the screen in the memory of the disk drive.<\/p><p>ISAVE\u00a0 \u00a0CALL DR_ON<\/p><p>\u00a0 \u00a0 \u00a0 \u00a0 LD HL, 16384<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD DE, 20000<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD BC, 6912<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>CALL ZX_FDD<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>JP #0603<\/p><p>; Restore the screen content.<\/p><p>PLAY\u00a0 \u00a0 CALL DR_ON<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD HL, 20000<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD DE, 16384<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD BC, 6912<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>CALL FDD_ZX<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>JP #0603<\/p><p>DR_ON\u00a0 \u00a0PUSH IY<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD IY, 0<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>RST 8<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>POP IY<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>RET<\/p><p>; Place the procedures FDD_ZX and ZX_FDD here.<\/p><p>PUTCOM\u00a0 EQU # 0608<\/p><p>CONV\u00a0 \u00a0 EQU # 0688<\/p><p>MOD\u00a0 \u00a0 \u00a0EQU # 2100<\/p><p>PUTDAT\u00a0 EQU # 0605<\/p><p>GETBLCK EQU # 060B<\/p><p>BUFDAT\u00a0 EQU # 2000<\/p><p>FDDBUF\u00a0 EQU # 3E22<\/p><p>; FDD3000 -&gt; ZX SPECTRUM<\/p><p>; IN: AS IN LDIR<\/p><p>FDD_ZX\u00a0 LD A, B<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>OR C<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>RET Z<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>PUSH HL<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>PUSH BC<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>PUSH DE<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>EX DE, HL<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD A, # 19<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD (MOD), A<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>XOR A<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>CALL PUTCOM<\/p><p>Pl\u00a0 \u00a0 \u00a0 CALL GETBLCK<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>JR NZ,P1<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>POP DE<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>POP HL<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD BC,256<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>XOR A<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>SBC HL,BC<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>JR NC,P2<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>INC H<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD B,H<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD C,L<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD L,0<\/p><p>P2\u00a0 \u00a0 \u00a0 PUSH HL<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD HL,BUFDAT<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LDIR<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>POP BC<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>POP HL<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>INC H<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>JR FDD_ZX<\/p><p>; SPECTRUM &#8211;&gt; FDD3000<\/p><p>; IN: AS IN LDIR<\/p><p>ZX_FDD\u00a0 LD A,B<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>OR C<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>RET Z<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>PUSH HL<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD H,B<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD L,C<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD BC,256<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>XOR A<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>SBC HL,BC<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>JR NC,P3<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>INC H<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD B,H<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD C,L<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD HL,0<\/p><p>P3\u00a0 \u00a0 \u00a0 EX (SP),HL<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>PUSH DE<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>PUSH BC<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD DE,BUFDAT<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LDIR<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>PUSH HL<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>CALL PUTDAT<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>POP HL<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>POP BC<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>POP DE<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>PUSH HL<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD HL,FDDBUF<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>PUSH IY<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD IY,#1879<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD A,24<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD (#2100),A<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>CALL PUTCOM<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>POP IY<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>INC D<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>POP HL<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>POP BC<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>JR ZX_FDD<\/p><p>; RUN THE PROGRAM ON THE DISC STATION<\/p><p>; IN: IY-START ADDRESS<\/p><p>RUNFDD\u00a0 LD A,24<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>LD (#2100),A<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>CALL PUTCOM<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>CALL KONW<\/p><p><span style=\"font-size: 18px; font-style: normal; font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span>RET<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9c02f10 elementor-widget elementor-widget-text-editor\" data-id=\"9c02f10\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>After compiling, two programs are created in memory: USR 60000 remembers the appearance of the computer screen in the disk drive memory, and USR 60018 restores it. For a RAM disk, this is too free, but already suitable for presenting drawings.<\/p><p><strong>And this is it!<\/strong><\/p><p>The five-part series of articles, which is just ending, contains practically all the knowledge of a programmer who wants to use TOS from the level of machine code.<\/p><p>He can write his loader in machine language, and also make the game a version that works with disk. Everything is a matter of practice and experience. You can (what a trivial idea)<\/p><p>use the station as an intelligent buffer for the printer. Or have core wars. There is nothing to prevent you from writing a program that turns your station into a software coprocessor<\/p><p>math to Spectrum. It is worth knowing how to program and it is a great adventure. Try and you, not just games, games, and games &#8230;<\/p><p>The original text appeared in Bajtek magazine. It was scanned in November 2001 and was waiting for better times as it was. Converting to text (HTML) has been done made in April 2010. All episodes were put in one HTML file. Comments have been added. For greater clarity, the numbering of tables and figures has been changed.<\/p><p>The content of the programs has been checked, and all hexadecimal addresses are written with four digits (except for pictures). Since I received several requests to translate to English, there will probably also be an English version, after the editing work is completed.<\/p><p>I publish the text in good faith, for archiving and education purposes, without the consent, knowledge, and knowledge of the will of the authors and the publisher Bajtek.<\/p><p><strong>ZXVGS reference (by Jarek Adamski)<\/strong><\/p><p>Files created with TOS A.2 can also be used with ZXVGS. The minimum compatibility of the BASIC syntax (in the form of LOAD * and SAVE * support) is in the BZX.RZX extension &#8211; if the programs do not use other BASIC statements, the program name should end with BZX. The BA2.RZX extension is supposed to support the broader syntax, but it will not operate low-level disk drives (with interface activation). The CZX extension is recommended for CODE files, and DZX for tables.<\/p><p>When copying TOS files to another system to use them under ZXVGS (also TOSQ1.COM under CP \/ M), pay attention to converting file headers from 5 and 7 bytes to 9 bytes.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-cf2f83f elementor-widget elementor-widget-spacer\" data-id=\"cf2f83f\" data-element_type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<div class=\"elementor-element elementor-element-454c18d elementor-widget elementor-widget-spacer\" data-id=\"454c18d\" data-element_type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8086521 elementor-widget elementor-widget-html\" data-id=\"8086521\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<a class=\"top-link hide\" href=\"\" id=\"js-top\">\r\n  <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 12 6\"><path d=\"M12 6H0l6-6z\"\/><\/svg>\r\n  <span class=\"screen-reader-text\">Back to top<\/span>\r\n<\/a>\r\n\r\n<style>\r\n\r\n\r\n.intro-copy {\r\n  padding: 1em;\r\n  margin: 50vh auto;\r\n  max-width: 15em;\r\n  font-family: Helvetica;\r\n  font-weight: lighter;\r\n  font-size: 2em;\r\n  line-height: 1.2;\r\n  text-align: center;\r\n}\r\n\r\n.top-link {\r\n    z-index: 99999;\r\n  transition: all .25s ease-in-out;\r\n  position: fixed;\r\n  bottom: 0;\r\n  right: 0;\r\n  display: inline-flex;\r\n  cursor: pointer;\r\n  align-items: center;\r\n  justify-content: center;\r\n  margin: 0 3em 3em 0;\r\n  border-radius: 50%;\r\n  padding: .25em;\r\n  width: 50px;\r\n  height: 50px;\r\n  background-color: #F8F8F8;\r\n}\r\n.top-link.show {\r\n  visibility: visible;\r\n  opacity: 1;\r\n}\r\n.top-link.hide {\r\n  visibility: hidden;\r\n  opacity: 0;\r\n}\r\n.top-link svg {\r\n  fill: #000;\r\n  width: 24px;\r\n  height: 12px;\r\n}\r\n.top-link:hover {\r\n  background-color: #E8E8E8;\r\n}\r\n.top-link:hover svg {\r\n  fill: #000000;\r\n}\r\n\r\n.screen-reader-text {\r\n  position: absolute;\r\n  clip-path: inset(50%);\r\n  margin: -1px;\r\n  border: 0;\r\n  padding: 0;\r\n  width: 1px;\r\n  height: 1px;\r\n  overflow: hidden;\r\n  word-wrap: normal !important;\r\n  clip: rect(1px, 1px, 1px, 1px);\r\n}\r\n.screen-reader-text:focus {\r\n  display: block;\r\n  top: 5px;\r\n  left: 5px;\r\n  z-index: 100000;\r\n  clip-path: none;\r\n  background-color: #eee;\r\n  padding: 15px 23px 14px;\r\n  width: auto;\r\n  height: auto;\r\n  text-decoration: none;\r\n  line-height: normal;\r\n  color: #444;\r\n  font-size: 1em;\r\n  clip: auto !important;\r\n}\r\n<\/style>\r\n\r\n<script>\r\n    \/\/ Set a variable for our button element.\r\nconst scrollToTopButton = document.getElementById('js-top');\r\n\r\n\/\/ Let's set up a function that shows our scroll-to-top button if we scroll beyond the height of the initial window.\r\nconst scrollFunc = () => {\r\n  \/\/ Get the current scroll value\r\n  let y = window.scrollY;\r\n  \r\n  \/\/ If the scroll value is greater than the window height, let's add a class to the scroll-to-top button to show it!\r\n  if (y > 0) {\r\n    scrollToTopButton.className = \"top-link show\";\r\n  } else {\r\n    scrollToTopButton.className = \"top-link hide\";\r\n  }\r\n};\r\n\r\nwindow.addEventListener(\"scroll\", scrollFunc);\r\n\r\nconst scrollToTop = () => {\r\n  \/\/ Let's set a variable for the number of pixels we are from the top of the document.\r\n  const c = document.documentElement.scrollTop || document.body.scrollTop;\r\n  \r\n  \/\/ If that number is greater than 0, we'll scroll back to 0, or the top of the document.\r\n  \/\/ We'll also animate that scroll with requestAnimationFrame:\r\n  \/\/ https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/window\/requestAnimationFrame\r\n  if (c > 0) {\r\n    window.requestAnimationFrame(scrollToTop);\r\n    \/\/ ScrollTo takes an x and a y coordinate.\r\n    \/\/ Increase the '10' value to get a smoother\/slower scroll!\r\n    window.scrollTo(0, c - c \/ 10);\r\n  }\r\n};\r\n\r\n\/\/ When the button is clicked, run our ScrolltoTop function above!\r\nscrollToTopButton.onclick = function(e) {\r\n  e.preventDefault();\r\n  scrollToTop();\r\n}\r\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c5c47a0 elementor-widget elementor-widget-spacer\" data-id=\"c5c47a0\" data-element_type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>TOS Secrets by Wojciech Jab\u0142o\u0144ski, Jacek Troja\u0144ski Most of the information contained here has been obtained empirically by analyzing machine code for many hours. Therefore, part of the described procedures and system variables have no names. If you have already used them and created your nomenclature for this purpose, you can fill in the blank [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"no-sidebar","site-content-layout":"page-builder","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"disabled","footer-sml-layout":"","theme-transparent-header-meta":"enabled","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"wf_page_folders":[17],"class_list":["post-6241","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>TOS Secrets - LOAD ZX - TIMEX COMPUTER World<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/loadzx.com\/timexcomputerworld\/tos-secrets\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"TOS Secrets - LOAD ZX - TIMEX COMPUTER World\" \/>\n<meta property=\"og:description\" content=\"TOS Secrets by Wojciech Jab\u0142o\u0144ski, Jacek Troja\u0144ski Most of the information contained here has been obtained empirically by analyzing machine code for many hours. Therefore, part of the described procedures and system variables have no names. If you have already used them and created your nomenclature for this purpose, you can fill in the blank [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/loadzx.com\/timexcomputerworld\/tos-secrets\/\" \/>\n<meta property=\"og:site_name\" content=\"LOAD ZX - TIMEX COMPUTER World\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-15T19:01:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/loadzx.com\/timexcomputerworld\/wp-content\/uploads\/2023\/03\/2048withTOS.gif\" \/>\n\t<meta property=\"og:image:width\" content=\"1598\" \/>\n\t<meta property=\"og:image:height\" content=\"1199\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/gif\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"49 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/loadzx.com\/timexcomputerworld\/tos-secrets\/\",\"url\":\"https:\/\/loadzx.com\/timexcomputerworld\/tos-secrets\/\",\"name\":\"TOS Secrets - LOAD ZX - TIMEX COMPUTER World\",\"isPartOf\":{\"@id\":\"https:\/\/loadzx.com\/timexcomputerworld\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/loadzx.com\/timexcomputerworld\/tos-secrets\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/loadzx.com\/timexcomputerworld\/tos-secrets\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/loadzx.com\/timexcomputerworld\/wp-content\/uploads\/2023\/03\/2048withTOS-1024x768.gif\",\"datePublished\":\"2023-03-11T17:25:47+00:00\",\"dateModified\":\"2023-12-15T19:01:02+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/loadzx.com\/timexcomputerworld\/tos-secrets\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/loadzx.com\/timexcomputerworld\/tos-secrets\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/loadzx.com\/timexcomputerworld\/tos-secrets\/#primaryimage\",\"url\":\"https:\/\/loadzx.com\/timexcomputerworld\/wp-content\/uploads\/2023\/03\/2048withTOS.gif\",\"contentUrl\":\"https:\/\/loadzx.com\/timexcomputerworld\/wp-content\/uploads\/2023\/03\/2048withTOS.gif\",\"width\":1598,\"height\":1199},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/loadzx.com\/timexcomputerworld\/tos-secrets\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/loadzx.com\/timexcomputerworld\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"TOS Secrets\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/loadzx.com\/timexcomputerworld\/#website\",\"url\":\"https:\/\/loadzx.com\/timexcomputerworld\/\",\"name\":\"LOAD ZX - TIMEX COMPUTER World\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/loadzx.com\/timexcomputerworld\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/loadzx.com\/timexcomputerworld\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/loadzx.com\/timexcomputerworld\/#organization\",\"name\":\"LOAD ZX - TIMEX COMPUTER World\",\"url\":\"https:\/\/loadzx.com\/timexcomputerworld\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/loadzx.com\/timexcomputerworld\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/loadzx.com\/timexcomputerworld\/wp-content\/uploads\/2021\/05\/tcwlzx.png\",\"contentUrl\":\"https:\/\/loadzx.com\/timexcomputerworld\/wp-content\/uploads\/2021\/05\/tcwlzx.png\",\"width\":2208,\"height\":435,\"caption\":\"LOAD ZX - TIMEX COMPUTER World\"},\"image\":{\"@id\":\"https:\/\/loadzx.com\/timexcomputerworld\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"TOS Secrets - LOAD ZX - TIMEX COMPUTER World","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/loadzx.com\/timexcomputerworld\/tos-secrets\/","og_locale":"en_US","og_type":"article","og_title":"TOS Secrets - LOAD ZX - TIMEX COMPUTER World","og_description":"TOS Secrets by Wojciech Jab\u0142o\u0144ski, Jacek Troja\u0144ski Most of the information contained here has been obtained empirically by analyzing machine code for many hours. Therefore, part of the described procedures and system variables have no names. If you have already used them and created your nomenclature for this purpose, you can fill in the blank [&hellip;]","og_url":"https:\/\/loadzx.com\/timexcomputerworld\/tos-secrets\/","og_site_name":"LOAD ZX - TIMEX COMPUTER World","article_modified_time":"2023-12-15T19:01:02+00:00","og_image":[{"width":1598,"height":1199,"url":"https:\/\/loadzx.com\/timexcomputerworld\/wp-content\/uploads\/2023\/03\/2048withTOS.gif","type":"image\/gif"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"49 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/loadzx.com\/timexcomputerworld\/tos-secrets\/","url":"https:\/\/loadzx.com\/timexcomputerworld\/tos-secrets\/","name":"TOS Secrets - LOAD ZX - TIMEX COMPUTER World","isPartOf":{"@id":"https:\/\/loadzx.com\/timexcomputerworld\/#website"},"primaryImageOfPage":{"@id":"https:\/\/loadzx.com\/timexcomputerworld\/tos-secrets\/#primaryimage"},"image":{"@id":"https:\/\/loadzx.com\/timexcomputerworld\/tos-secrets\/#primaryimage"},"thumbnailUrl":"https:\/\/loadzx.com\/timexcomputerworld\/wp-content\/uploads\/2023\/03\/2048withTOS-1024x768.gif","datePublished":"2023-03-11T17:25:47+00:00","dateModified":"2023-12-15T19:01:02+00:00","breadcrumb":{"@id":"https:\/\/loadzx.com\/timexcomputerworld\/tos-secrets\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/loadzx.com\/timexcomputerworld\/tos-secrets\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/loadzx.com\/timexcomputerworld\/tos-secrets\/#primaryimage","url":"https:\/\/loadzx.com\/timexcomputerworld\/wp-content\/uploads\/2023\/03\/2048withTOS.gif","contentUrl":"https:\/\/loadzx.com\/timexcomputerworld\/wp-content\/uploads\/2023\/03\/2048withTOS.gif","width":1598,"height":1199},{"@type":"BreadcrumbList","@id":"https:\/\/loadzx.com\/timexcomputerworld\/tos-secrets\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/loadzx.com\/timexcomputerworld\/"},{"@type":"ListItem","position":2,"name":"TOS Secrets"}]},{"@type":"WebSite","@id":"https:\/\/loadzx.com\/timexcomputerworld\/#website","url":"https:\/\/loadzx.com\/timexcomputerworld\/","name":"LOAD ZX - TIMEX COMPUTER World","description":"","publisher":{"@id":"https:\/\/loadzx.com\/timexcomputerworld\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/loadzx.com\/timexcomputerworld\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/loadzx.com\/timexcomputerworld\/#organization","name":"LOAD ZX - TIMEX COMPUTER World","url":"https:\/\/loadzx.com\/timexcomputerworld\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/loadzx.com\/timexcomputerworld\/#\/schema\/logo\/image\/","url":"https:\/\/loadzx.com\/timexcomputerworld\/wp-content\/uploads\/2021\/05\/tcwlzx.png","contentUrl":"https:\/\/loadzx.com\/timexcomputerworld\/wp-content\/uploads\/2021\/05\/tcwlzx.png","width":2208,"height":435,"caption":"LOAD ZX - TIMEX COMPUTER World"},"image":{"@id":"https:\/\/loadzx.com\/timexcomputerworld\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/loadzx.com\/timexcomputerworld\/wp-json\/wp\/v2\/pages\/6241","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/loadzx.com\/timexcomputerworld\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/loadzx.com\/timexcomputerworld\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/loadzx.com\/timexcomputerworld\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/loadzx.com\/timexcomputerworld\/wp-json\/wp\/v2\/comments?post=6241"}],"version-history":[{"count":61,"href":"https:\/\/loadzx.com\/timexcomputerworld\/wp-json\/wp\/v2\/pages\/6241\/revisions"}],"predecessor-version":[{"id":8081,"href":"https:\/\/loadzx.com\/timexcomputerworld\/wp-json\/wp\/v2\/pages\/6241\/revisions\/8081"}],"wp:attachment":[{"href":"https:\/\/loadzx.com\/timexcomputerworld\/wp-json\/wp\/v2\/media?parent=6241"}],"wp:term":[{"taxonomy":"wf_page_folders","embeddable":true,"href":"https:\/\/loadzx.com\/timexcomputerworld\/wp-json\/wp\/v2\/wf_page_folders?post=6241"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}