| |
en:disquete_3_pulgadas [2022/06/19 09:43] – created jevicac | en:disquete_3_pulgadas [2022/06/19 09:50] (current) – jevicac |
---|
{{ :otros:Discos de 3 pulgadas.jpg?nolink&600 }} | {{ :otros:Discos de 3 pulgadas.jpg?nolink&600 }} |
| |
__**¿QUÉ ES UN DISCO?**__ | __**WHAT IS A DISC?**__ |
| |
A estas alturas todo el mundo debe haber visto alguna vez un disco de música (disco de vinilo). Su forma peculiar lo define claramente: plano, redondo y con un agujero central. Pues bien, la apariencia externa de un disco de ordenador o disquete es básicamente la misma. Los usuarios de discos de tres pulgadas pueden no creerlo, ya que sus disquetes están encapsulados en una estructura plástica rectangular que los protege, pero por dentro siguen siendo redondos. | By now everyone must have seen a music record (vinyl record). Its peculiar shape clearly defines it: flat, round and with a central hole. Well, the external appearance of a computer disk or floppy disk is basically the same. Three-inch drive users may not believe it, as their floppies are encased in a rectangular plastic shell that protects them, but inside they're still round. |
| |
{{ :otros:Disco_vinilo.jpg?nolink&600 }} | {{ :otros:Disco_vinilo.jpg?nolink&600 }} |
| |
Si embargo, el parecido entre un disco musical y otro de ordenador acaban aquí. Los discos de ordenador no guardan la información sobre un único surco espiral, y el material con el que están hechos no es el vinilo, sino una superficie plástica flexible recubierta de una capa adhesiva que sirve para fijar una sustancia magnetizable. Es ésta la que guarda la información digital bajo la forma de distintas orientaciones magnéticas de sus partículas. | However, the resemblance between a music disc and a computer disc ends here. Computer disks do not store information on a single spiral groove, and the material from which they are made is not vinyl, but a flexible plastic surface covered with an adhesive layer that serves to fix a magnetizable substance. It is this that stores the digital information in the form of different magnetic orientations of its particles. |
| |
El disco apareció como sustituto de las cintas magnéticas, que por su lentitud en el acceso, debido principalmente a la forma de colocar la información, no daban las suficientes prestaciones a los usuarios de ordenadores. | The disk appeared as a substitute for magnetic tapes, which due to their slow access, mainly due to the way of placing the information, did not provide sufficient benefits to computer users. |
| |
En principio, tal y como está un disco recién fabricado, no es en absoluto utilizable de un modo práctico por un ordenador. Esto se debe a que, para poder guardar la información y luego poder acceder fácilmente a ella, necesitamos una cierta organización previa. Para que se entienda, podemos comprar un disco virgen (tal y como está recién fabricado) con un armario-estantería en el que nos faltan precisamente los estantes. Por muy grande y robusto que sea el armario, sino podemos agrupar, separar y clasificar las cosas que queramos guardar en él, a la hora de buscar algo podemos tener serios problemas. | In principle, as is a newly manufactured disk, it is not at all usable in a practical way by a computer. This is because, in order to be able to save the information and then be able to easily access it, we need a certain prior organization. So that it is understood, we can buy a blank record (just as it is newly manufactured) with a cupboard-shelf in which the shelves are precisely missing. No matter how big and robust the closet is, if we can't group, separate and classify the things we want to store in it, when looking for something we can have serious problems. |
| |
__**MODOS DE PROTECCIÓN DE UN DISCO**__ | __**DISK PROTECTION MODES**__ |
| |
Los discos llevan unos orificios de protección contra escritura, cuando se cierra un orificio de protección contra escritura, puede escribirse sobre esa cara del disco y el disco se llama desprotegido contra escritura. Por el contrario si el orificio está abierto estará protegido contra escritura. | Disks have write protect holes, when a write protect hole is closed, that side of the disk can be written to and the disk is called write unprotected. On the contrary, if the hole is open, it will be protected against writing. |
| |
Estas protecciones según el formato del disco pueden activarse con la uña desplazando la pestaña del obturador hacia arriba (desprotegido) o hacia abajo (protegido). En otros necesitaremos la ayuda de de un bolígrafo u otro objeto para desplazar la pestaña lateralmente para proteger o desproteger el disco. | Depending on the format of the disc, these protections can be activated with your fingernail by moving the shutter tab up (unprotected) or down (protected). In others we will need the help of a pen or other object to move the tab laterally to protect or unprotect the disc. |
| |
{{ :otros:Modos de proteccion de un disco.jpg?nolink&800 }} | {{ :otros:Modos de proteccion de un disco.jpg?nolink&800 }} |
| |
__**FORMATEAR UN DISCO**__ | __**FORMAT A DISK**__ |
| |
Pues bien, formatear o inicializar un disco no es más que poner estanterías en el armario y etiquetar dichas estanterías, de forma que podamos acceder con rapidez y de forma organizada a lo que estemos buscando. En un disco no hablamos de estanterías, sino de sectores, y en lugar de etiquetas hablaremos de marcas de índice y del campo de identificación de los sectores o campo ID. | Well, formatting or initializing a disk is nothing more than putting shelves in the closet and labeling these shelves, so that we can access what we are looking for quickly and in an organized way. In a disc we are not talking about shelves, but about sectors, and instead of labels we will talk about index marks and the identification field of the sectors or ID field. |
| |
La superficie magnética del disco es físicamente continua, por lo que necesitaremos realizar una cierta versión de ella. La primera consideración que realizamos es la del disco como un conjunto de pistas concéntricas. Normalmente, tanto en los disquetes de tres pulgadas como en los de cinco y cuarto se delimitan cuarenta pistas por cada cara, numeradas de cero a cuarenta y nueve. Como excepción, los discos formateados en la unidad B de un PCW 8512 o PCW 8256 ampliado constarán de ochenta pistas por cada cara. En cualquier caso, siempre se considera la pista más exterior como la pista cero y la más interior como la de numeración más elevada. | The magnetic surface of the disk is physically continuous, so we will need to make a certain version of it. The first consideration we make is that of the disk as a set of concentric tracks. Typically, both three-inch and five-and-a-quarter-inch floppy disks have forty tracks on each side, numbered zero through forty-nine. As an exception, disks formatted in drive B of a PCW 8512 or PCW 8256 Extended will have eighty tracks per side. In any case, the outermost track is always considered as the zero track and the innermost as the highest numbered track. |
| |
La siguiente división que realizaremos será la de partir cada pista en varios fragmentos que llamaremos sectores. De este modo, cada disco se divide en pistas, y cada pista en sectores. Volviendo al ejemplo de nuestro armario, cada estantería horizontal equivaldría a una pista, y cada separación vertical que pongamos en una estantería horizontal marcaría la separación entre dos sectores. | The next division that we will make will be to divide each track into several fragments that we will call sectors. In this way, each disk is divided into tracks, and each track into sectors. Returning to the example of our closet, each horizontal shelf would be equivalent to a track, and each vertical separation that we put in a horizontal shelf would mark the separation between two sectors. |
| |
{{ :otros:Estructura de un disco.jpg?nolink&800 }} | {{ :otros:Estructura de un disco.jpg?nolink&800 }} |
| |
Toda esta complicación persigue un fin práctico que vamos a explicar con nuestro armario. Supongamos que lo vamos a utilizar para guardar discos. Para ello, contamos con una lista con los nombres de los cantantes de los cuales poseemos algún disco. Junto al nombre de cada cantante consta el número de estantería horizontal (pista) y el número de separación vertical (sector) en la que podremos encontrar un disco de ese cantante. De este modo, si pretendemos separar toda la colección de Plácido Domingo para dejársela a un amigo, no necesitaremos recorrer toda nuestra discoteca buscando de disco en disco. Lo que haremos será recurrir a nuestra lista y dirigirnos directamente a los estantes donde se encuentra alguno de sus discos. Si el número de discos que caben en cada estante es lo bastante reducido, la búsqueda nos llevará poco tiempo. Sin embargo, hacer los estantes demasiado pequeños puede representar inconvenientes que trataremos más adelante. | All this complication pursues a practical purpose that we are going to explain with our wardrobe. Suppose we are going to use it to store disks. For this, we have a list with the names of the singers of which we have a record. Next to the name of each singer is the number of the horizontal shelf (track) and the number of vertical separation (sector) in which we can find a record by that singer. In this way, if we intend to separate the entire Plácido Domingo collection to leave it to a friend, we will not need to go through our entire disco searching from disc to disc. What we will do is use our list and go directly to the shelves where one of his records is located. If the number of disks that fit on each shelf is small enough, the search will take little time. However, making the shelves too small can present drawbacks that we will discuss later. |
| |
Los discos flexible poseen un agujero llamado //perforación de índice//, que permite situar el comienzo de una pista. Un diodo luminoso y un sensor óptico permiten determinar cuándo se ha localizado dicha perforación. | Floppy disks have a hole called //index hole//, which allows you to locate the beginning of a track. A light diode and an optical sensor allow to determine when said perforation has been located. |
| |
__**ESTRUCTURA DE UN DISCO**__ | __**STRUCTURE OF A DISC**__ |
| |
Todos los discos tienen dos estructuras: física y lógica. La estructura física es el propio disco, es decir, qué forma tiene, tipo de material magnético, etc. Y la lógica, es como realmente queda estructurado el disco después de haberlo formateado. | All disks have two structures: physical and logical. The physical structure is the disk itself, that is, what shape it has, type of magnetic material, etc. And the logic, is how the disk is really structured after having formatted it. |
| |
{{ :otros:Despiece de un disco de 3 pulgadas.jpg?nolink&600 }} | {{ :otros:Despiece de un disco de 3 pulgadas.jpg?nolink&600 }} |
| |
| |
* //__La estructura física del disco__// | * //__The physical structure of the disk__// |
| |
Un disco flexible es el medio magnético en el que guardamos nuestros programas. datos, textos, etc. Su forma es la de una corona circular. Al inicializarlo se divide en una serie de zonas concéntricas, a las que llamaremos pistas, cada una de las cuales se subdivide a su vez en subzonas llamadas sectores. Con los formatos de disco que utilizan los CPC y PCW cada sector puede contener 512 bytes de información, aunque este número puede alterarse, como veremos más adelante. | A floppy disk is the magnetic medium on which we store our programs. data, text, etc. Its shape is that of a circular crown. When initializing it, it is divided into a series of concentric zones, which we will call tracks, each of which is subdivided into sub-zones called sectors. With the disk formats used by CPC and PCW, each sector can contain 512 bytes of information, although this number can be altered, as we will see later. |
| |
El número de pistas y sectores de un disco es variable: los disco de 3" de simple densidad con formato CPC o PCW tienen 40 pistas y 9 sectores por pista (aunque también estos números pueden ser modificados), con lo que consta de 360 sectores en total y su capacidad es de 180 K (por cara). | The number of tracks and sectors on a disk is variable: single-density 3" disks in CPC or PCW format have 40 tracks and 9 sectors per track (although these numbers can also be changed), thus consisting of 360 sectors in total and its capacity is 180K (per side). |
| |
Las pistas están numeradas del 0 al 39 y los sectores del 0 al 8 (la pista 0 es la exterior), aunque a nivel físico las pistas tienen distinta numeración para distinguir los formatos. Pero esto no afecta al manejo lógico, como veremos a continuación. | The tracks are numbered from 0 to 39 and the sectors from 0 to 8 (track 0 is the outer one), although on a physical level the tracks have different numbers to distinguish the formats. But this does not affect the logical handling, as we will see next. |
| |
{{ :otros:El interior de un disco de 3 pulgadas.jpg?nolink&600 }} | {{ :otros:El interior de un disco de 3 pulgadas.jpg?nolink&600 }} |
| |
A veces no todo el espacio disponible en el disco puede ser utilizado por el usuario, sino que la primera o primeras pistas contienen un programa cargador del sistema operativo. Estas pistas reciben el nombre de pistas reservadas. | Sometimes not all available disk space can be used by the user, but the first or first tracks contain an operating system loader program. These tracks are called reserved tracks. |
| |
El conjunto de características que distinguen a unos discos de otros (número de pistas, número de sectores por pista, etc). recibe el nombre de formato de disco. Los ordenadores CPC reconocen dos formatos de disco: | The set of characteristics that distinguish some discs from others (number of tracks, number of sectors per track, etc). is called the disk format. CPC computers recognize two disk formats: |
| |
* Formato de sistema. | * System format. |
* Formato de datos. | * Data format. |
| |
Además de éstos, el PCW reconoce también los siguientes: | In addition to these, the PCW also recognizes the following: |
| |
* Formato de sistema disco A. | * Disk A system format. |
* Formato de sistema disco B. | * System format disk B. |
* Formato disco M. | * M disk format. |
| |
En la siguiente tabla damos las características de casi todos estos formatos de disco. | In the following table we give the characteristics of almost all these disk formats. |
| |
{{ :otros:Estructura del DPB1.jpg?nolink&800 }} | {{ :otros:Estructura del DPB1.jpg?nolink&800 }} |
| |
Sobre este punto hay que hacer la siguiente aclaración: Si inicializamos un disco en el PCW con el programa DISCKIT, obtendremos un disco con formato de sistema (ya sea de simple o doble densidad). Si embargo, el sistema operativo también puede leer y escribir en discos con los formatos CPC. Todos estos formatos pueden ser también utilizados por el LocoScript. | On this point, the following clarification must be made: If we initialize a disk in the PCW with the DISCKIT program, we will obtain a disk with a system format (either single or double density). However, the operating system can also read and write to disks with the CPC formats. All of these formats can also be used by LocoScript. |
| |
* //__La estructura lógica__// | * //__The logical structure__// |
| |
Como es bien sabido, el CP(M (excluido el CPC) se divide en dos partes: el BIOS y el BDOS. Desde ambas se puede manejar el disco, pero de dos formas muy distintas. | As is well known, the CP(M (excluding the CPC) is divided into two parts: the BIOS and the BDOS. From both the disk can be managed, but in two very different ways. |
| |
El BIOS es la parte de bajo nivel y usa la división en pistas y sectores. En el CP/M 2.2 el BIOS no usa sectores físicos, sino sectores lógicos, que reciben el nombre de registros y tienen siempre 128 bytes; en el CP/M plus usa los sectores físicos. En la siguiente tabla se pueden ver subrutinas del BIOS para el manejo de discos. | The BIOS is the low level part and uses the division into tracks and sectors. In the CP/M 2.2 the BIOS does not use physical sectors, but logical sectors, which are called registers and always have 128 bytes; in the CP/M plus it uses the physical sectors. In the following table you can see BIOS subroutines for disk management. |
| |
{{ :otros:Funciones del BDOS 2.jpg?nolink&800 }} | {{ :otros:Funciones del BDOS 2.jpg?nolink&800 }} |
| |
El BDOS maneja el disco usando bloques o registros. Los bloques pueden tener de 1K a 16K (en el caso de los discos de simple densidad de PCW y CPC tienen 1K y el doble densidad del PCW tienen 2K). Los registros tienen siempre 128 bytes, por razones de compatibilidad con versiones anteriores de CP/M (antiguamente los sectores físicos de los discos solían ser de 128 bytes). | BDOS manages the disk using blocks or registers. Blocks can be from 1K to 16K (PCW and CPC single density disks are 1K and PCW double density are 2K). Registers are always 128 bytes long, for compatibility reasons with earlier versions of CP/M (physical disk sectors used to be 128 bytes in the past). |
| |
Los bloques se numeran empezando por el 0 a partir de la primera pista no reservada: los primeros bloques (dos en los discos de simple densidad y cuatro en los de doble densidad) contienen el directorio, cuya estructura describiremos más adelante. | The blocks are numbered starting with 0 from the first unreserved track: the first blocks (two on single-density disks and four on double-density disks) contain the directory, whose structure we will describe later. |
| |
El directorio contiene el nombre de los ficheros que existen en el disco, junto con los bloques que ocupan cada uno. | The directory contains the name of the files that exist on the disk, along with the blocks that each one occupies. |
| |
Para leer o escribir en un fichero se usan registros de 128 bytes. El CP/M tiene funciones para hacer lectura y escritura tanto aleatoria como secuencial; no obstante, este método sólo permite el acceso a los registros que componen un fichero y nunca se puede acceder ni a las pistas reservadas ni a la zona del directorio, ni a los bloques no ocupados, por lo que si queremos acceder a dichas zonas hemos de usar el BIOS, por lo que no hablaremos aquí de las funciones del BDOS para el manejo de discos. Sí que hay que utilizar el BDOS, sin embargo, para llamar al BIOS, porque, al estar distribuido el sistema operativo en diferentes bancos de memoria, no se puede hacer directamente (este problema no existe en el CP/M 2.2, ya que el sistema operativo y la TPA están en un sólo banco). La función del BDOS que tenemos que utilizar es la de 32 hexadecimal, cuyas condiciones de entrada y salida se pueden ver en la siguiente tabla. | To read or write to a file, 128-byte registers are used. The CP/M has functions to do both random and sequential reading and writing; however, this method only allows access to the records that make up a file and it is never possible to access the reserved tracks or the directory area, or the unoccupied blocks, so if we want to access these areas we have of using the BIOS, so we won't talk here about the BDOS functions for disk management. You do have to use BDOS, however, to call the BIOS, because, as the operating system is distributed in different memory banks, it cannot be done directly (this problem does not exist in the CP/M 2.2, since the operating system and the TPA are in a single bank). The BDOS function that we have to use is 32 hexadecimal, whose input and output conditions can be seen in the following table. |
| |
{{ :otros:Funciones del BDOS 1.jpg?nolink&800 }} | {{ :otros:Funciones del BDOS 1.jpg?nolink&800 }} |
| |
Un editor de sectores se usa principalmente para acceder directamente a la zona del directorio, por lo que vamos a estudiarla con más detalle. | A sector editor is mainly used to directly access the directory zone, so let's study it in more detail. |
| |
El editor de sectores e sun programa que mediante unas instrucciones cambia el contenido de un disco. De esta forma podremos, por ejemplo, poner vidas infinitas a un juego, recuperar información perdida y otras muchas utilidades. Un ejemplo de editor de discos es el extendido y conocido Knife. | The sector editor is a program that, by means of some instructions, changes the content of a disk. In this way we can, for example, add infinite lives to a game, recover lost information and many other uses. An example of a disc editor is the widespread and well-known Knife. |
| |
Cada bloque de directorio se divide en entradas de 32 bytes, cada una de las cuales tiene la estructura detallada en la siguiente tabla. | Each directory block is divided into 32-byte entries, each of which has the structure detailed in the following table. |
| |
{{ :otros:Estructura del FCB.jpg?nolink&800 }} | {{ :otros:Estructura del FCB.jpg?nolink&800 }} |
| |
Destacaremos varias cosas en ella: | We will highlight several things in it: |
| |
**A)** El número de usuario puede valer de 0 a 15; esto permite tener los ficheros divididos en 16 zonas distintas (LocoScript, por ejemplo, deja los grupo 0 al 7 para usuario y los otros 8 grupos para el limbo). | **A)** The user number can be from 0 to 15; this allows to have the files divided into 16 different zones (LocoScript, for example, leaves groups 0 to 7 for user and the other 8 groups for limbo). |
| |
Cuando se borra un fichero se cambia el número de usuario a E5; esto permite recuperar un fichero que se acaba de borrar, sin más que cambiar, mediante un editor de sectores, dicho número por el deseado. Para que la recuperación sea posible no se debe haber escrito nada en el disco después del borrado, ya que en otro caso los bloques que usaba el fichero borrado pueden haber sido usados para grabar un nuevo fichero, en cuyo caso el fichero borrado es irrecuperable. | When a file is deleted, the user number is changed to E5; This allows you to recover a file that has just been deleted, simply by changing, using a sector editor, said number to the desired one. For recovery to be possible, nothing must have been written to the disk after deletion, since otherwise the blocks used by the deleted file may have been used to record a new file, in which case the deleted file is unrecoverable. |
| |
Además de los anteriores, pueden aparecer números de usuario del 16 al 32 si se ha definido etiqueta para el disco y palabras de acceso (password). No es recomendable hacerlo, porque dichos discos no son compatibles con LocoScript ni con AMSDOS. | In addition to the above, user numbers from 16 to 32 may appear if the disk label and password have been defined. It is not recommended to do so, because such disks are not compatible with LocoScript or AMSDOS. |
| |
**B)** Cada entrada de directorio puede contener a lo sumo 16 K (16 bytes para bloques por 1K/bloque); por tanto, todo fichero con un tamaño mayor de 16 K ocupará varias "extensiones", que se diferencia en el byte de extensión (las extensiones se numeran 0, 1, 2, ...). Si se quiere desborrar un fichero de más de 16 K se deben buscar y desborrar todas sus extensiones. | **B)** Each directory entry can contain at most 16K (16 bytes for blocks per 1K/block); therefore, any file with a size greater than 16 K will occupy several "extensions", which differ in the extension byte (extensions are numbered 0, 1, 2, ...). If you want to undelete a file of more than 16 K, you must find and undelete all its extensions. |
| |
**C)** Si el número máximo de bloque es mayor que 255 (cosa que ocurre en los discos de doble densidad del PCW), los números de bloque ocupan 2 bytes (en orden bajo-alto). Por ejemplo, si un fichero ocupa los bloques 3 y 4 en la correspondiente lista de bloques aparecerá 03 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00. | **C)** If the maximum block number is greater than 255 (which is the case on PCW double-density disks), the block numbers occupy 2 bytes (in low-high order). For example, if a file occupies blocks 3 and 4, the corresponding block list will show 03 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00. |
| |
Esto hay que tenerlo en cuenta, por ejemplo, si se quiere editar un bloque defectuoso de un fichero. Además se ha de tener en cuenta el tope de 16 K por extensión, que hace que los bloques deban ser al menos de 2K (caso de los discos de doble densidad del PCW). | This must be taken into account, for example, if you want to edit a bad block of a file. In addition, the limit of 16 K per extension must be taken into account, which means that the blocks must be at least 2K (in the case of double-density disks of the PCW). |
| |
**D)** Los atributos de un fichero se almacenan en el bit superior de los 8 bytes del nombre y los 3 del tipo (en todas sus extensiones). | **D)** The attributes of a file are stored in the upper bit of the 8 bytes of the name and the 3 of the type (in all its extensions). |
| |
Los atributos de las cuatro primeras letras del nombre pueden ser usados libremente por el usuario; los correspondientes a las otras cuatro son usados por el CP/M plus para el manejo del fichero (en el CP/M 2.2 están reservados para su uso por el CP/M plus): Los tres del tipo son, por orden, los siguientes: | The attributes of the first four letters of the name can be freely used by the user; those corresponding to the other four are used by the CP/M plus to manage the file (in the CP/M 2.2 they are reserved for use by the CP/M plus): The three of the type are, in order, the following : |
| |
* **Atributo de sólo lectura.** | * **Read-only attribute.** |
* **Atributo de sistema.** | * **System attribute.** |
* **Atributo de archivo.** | * **File attribute.** |
| |
Por tanto, los tres bytes correspondientes al tipo de un fichero de tipo COM de sólo lectura serán C3(=80+43),4F,4D. Esto hay que tenerlo en cuenta a la hora de buscar un fichero; también se puede emplear para cambiar los atributos del fichero, pero para eso es más cómodo emplear el programa SET. | Therefore, the three bytes corresponding to the type of a read-only COM type file will be C3(=80+43),4F,4D. This must be taken into account when searching for a file; can also be used to change file attributes, but for that it is more convenient to use the SET program. |
| |
Para pode adaptarse a los diferentes formatos, el BDOS guarda en una tabla las características de cada uno de ellos. Esta tabla recibe el nombre de bloque de parámetros del disco (DPB), y podemos acceder a ella a través de la llamada 1F al BDOS; vista anteriormente en la tabla al igual que su estructura. | In order to adapt to the different formats, BDOS saves the characteristics of each of them in a table. This table is called the disk parameter block (DPB), and we can access it through the 1F call to BDOS; previously seen in the table as well as its structure. |
| |
{{ :otros:Discos_de_3_pulgadas2.png?nolink&800 }} | {{ :otros:Discos_de_3_pulgadas2.png?nolink&800 }} |
| |
__**ESTRUCTURA DEL DIRECTORIO CP/M**__ | __**STRUCTURE OF THE CP/M BOARD OF DIRECTORS**__ |
| |
En el caso de un disquete, cuando salvamos un programa el Sistema Operativo mira en la lista para ver qué sectores hay libres, escribe en ellos el programa y actualiza la lista, incluyendo en ella el nombre del programa y los números de sector y pista que ocupa. A la lista mencionada se la conoce con el nombre de //Directorio del disco//, y presenta la peculiaridad de que se guarda dentro del propio disco, normalmente en las primeras pistas, dependiendo su situación exacta del formato que tenga cada disco. | In the case of a floppy disk, when we save a program the Operating System looks at the list to see what sectors are free, writes the program to them and updates the list, including in it the name of the program and the sector and track numbers it contains. occupies. The aforementioned list is known by the name of //Disk directory//, and it has the peculiarity that it is saved inside the disk itself, normally in the first tracks, depending on its exact location on the format of each disk. |
| |
En algunos casos la primera o primeras pistas del disco están reservadas, precisamente para albergar parte del Sistema Operativo. Así, en los Amstrad CPC, las pistas cero y uno están reservadas. En los PCW sólo está reservada la pista cero. En cualquier caso, tras la última pista reservada comienza el directorio, cuyo tamaño depende de la capacidad del disco. | In some cases the first or first tracks of the disk are reserved, precisely to house part of the Operating System. Thus, on Amstrad CPCs, runways zero and one are reserved. In PCWs only track zero is reserved. In any case, after the last reserved track begins the directory, the size of which depends on the capacity of the disk. |
| |
En el CP/M, tanto en su versión 2.2 como en el CP/M Plus, cada entrada de directorio (cada nombre de cantante con las direcciones de sus discos) ocupa treinta y dos bytes, que se distribuyen de la forma siguiente: | In the CP/M, both in its version 2.2 and in the CP/M Plus, each directory entry (each singer's name with the addresses of their disks) occupies thirty-two bytes, which are distributed as follows: |
| |
* **Byte 0:** Indica el área de usuario a la que pertenece el fichero. Si su valor es hexadecimal E5, se trata de un fichero borrado. | * **Byte 0:** Indicates the user area to which the file belongs. If its value is hexadecimal E5, it is a deleted file. |
* **Bytes 1 a 11:** Contienen los caracteres ASCII que forman el nombre y la extención del fichero. No se incluye en el directorio del punto que separa los ochos caracteres del nombre de los tres del tipo. | * **Bytes 1 to 11:** They contain the ASCII characters that form the name and extension of the file. Not included in the directory is the period that separates the eight characters of the name from the three of the type. |
* **Byte 12:** Indica el número de extensión. Como veremos en seguida, cada entrada de directorio puede indicar un máximo de dieciséis bloques, por lo que sólo podríamos manejar ficheros de hasta 16 x 1024 = 16 KBytes. Para evitar esta limitación, cuando un fichero ocupa más de 16 K se divide en tantos grupos de 16 K como sea necesario, y se utiliza una entrada de directorio para cada grupo. A estos grupos se les llama extensiones (en inglés, extents), ocupando cada extensión una entrada de directorio y recibiendo todas el mismo nombre y el mismo número de usuario. Pues bien, este byte 12 indica el número de extensión. Las extensiones se comienzan a numerar a partir de cero. | * **Byte 12:** Indicates the extension number. As we will see later, each directory entry can indicate a maximum of sixteen blocks, so we could only handle files up to 16 x 1024 = 16 KBytes. To avoid this limitation, when a file is larger than 16K it is divided into as many groups of 16K as necessary, and a directory entry is used for each group. These groups are called extents, with each extension occupying a directory entry and all receiving the same name and user number. Well, this byte 12 indicates the extension number. The extensions start numbering from zero. |
* **Byte 13:** No se utiliza. | * **Byte 13:** Not used. |
* **Byte 14:** Se utiliza como parte del contador de extensiones cuando es necesario. Dada la capacidad normal de los disquetes, con un máximo de 720 K, no es necesario utilizarlo, ya que el byte 12 puede contar hasta 256 extensiones = 4096 K. | * **Byte 14:** Used as part of the extension counter when necessary. Given the normal capacity of floppy disks, with a maximum of 720K, it is not necessary to use it, since byte 12 can count up to 256 extents = 4096K. |
* **Byte 15:** Indica el número de registros que forman un fichero. Para CP/M un registro está formado por 128 bytes, por lo que un sector de 512 bytes caben 4 registros. | * **Byte 15:** Indicates the number of records that make up a file. For CP/M, a record is made up of 128 bytes, so a sector of 512 bytes fits 4 records. |
* **Bytes 16 a 31:** Estos dieciséis bytes indican cada uno el número de un bloque utilizado por el fichero. En los CPC y el disco A del PCW cada cada bloque es de 1K, esto es, 2 sectores de 512 bytes. En el disco B del PCW cada bloque es de 2 K, que son 4 sectores de 512 bytes. Si nos referimos a sectores de 512 bytes es porque tanto en los CPC como en los PCW, al formatear el disco se fragmenta cada pista en nueve sectores de 512 bytes. | * **Bytes 16 to 31:** These sixteen bytes each indicate the number of a block used by the file. In the CPC and disk A of the PCW, each block is 1K, that is, 2 sectors of 512 bytes. On disk B of the PCW each block is 2 K, which are 4 sectors of 512 bytes. If we refer to 512-byte sectors, it is because in both CPCs and PCWs, when formatting the disk, each track is fragmented into nine 512-byte sectors. |
| |
En lo referente al tamaño de las extensiones, resulta evidente que en el caso de un disco B de PCW, al ser cada bloque de 2 K, como podemos direccionar por cada entrada de directorio hasta 16 bloques, las extensiones tendrán un tamaño de 2 x 16 = 32 K. | Regarding the size of the extensions, it is evident that in the case of a PCW disk B, since each block is 2 K, since we can address up to 16 blocks for each directory entry, the extensions will have a size of 2 x 16 = 32K |
| |
Resumiendo lo visto hasta ahora, vemos que CP/M trabaja básicamente a dos niveles, el de registros de 128 bytes, que es la unidad de información que consideran las rutinas de lectura y escritura de disco, y el de bloques de uno a dos Kilobytes, que es la unidad de información que utiliza el directorio. hay que tener en cuenta que el Sistema Operativo AMSDOS utiliza la misma estructura de directorios que el CP/M, por lo que lo dicho hasta ahora se puede aplicar también a este S.O. | Summarizing what we have seen so far, we can see that CP/M basically works at two levels: the 128-byte register level, which is the unit of information considered by the disk reading and writing routines, and the one- to two-kilobyte block level. , which is the unit of information used by the directory. It must be taken into account that the AMSDOS Operating System uses the same directory structure as the CP/M, so what has been said so far can also be applied to this OS. |
| |
Puede resultar paradójico que los sectores del disco sean de 512 bytes y el CP/M utilice registros de 128 bytes, pero este se debe a motivos históricos y se ha mantenido así para asegurar la compatibilidad con el software escrito anteriormente. | It may seem paradoxical that the disk sectors are 512 bytes and the CP/M uses 128 byte registers, but this is for historical reasons and has been kept that way to ensure compatibility with previously written software. |
| |
__**EL BLOQUE DE PARÁMETROS DE DISCO (DPB)**__ | __**THE DISK PARAMETER BLOCK (DPB)**__ |
| |
El Sistema Operativo incorpora una serie de rutinas que realizan la adaptación entre la estructura física del disco (sectores de 512 bytes con unos números de identificación que dependen de cada formato) y la estructura lógica del disco (registros de 128 bytes). Estas rutinas utilizan una tabla de datos que definen las características del formato del disco que se está utilizando en ese momento. A esta tabla se la conoce como DPB (Bloque de Parámetros de Disco), y su estructura está en la siguiente tabla. | The Operating System incorporates a series of routines that carry out the adaptation between the physical structure of the disk (sectors of 512 bytes with identification numbers that depend on each format) and the logical structure of the disk (registers of 128 bytes). These routines use a data table that defines the characteristics of the disk format that is currently being used. This table is known as DPB (Disk Parameter Block), and its structure is in the following table. |
| |
{{ :otros:Tabla_parametros de disco.jpg?nolink&800 }} | {{ :otros:Tabla_parametros de disco.jpg?nolink&800 }} |
| |
__**CONTROLADOR DEL DISCO FLEXIBLE**__ | __**FLEXIBLE DISK CONTROLLER**__ |
| |
Los ordenadores Amstrad utilizan un chip FDC 765 de NEC. Se trata de un controlador de disco flexible (Floppy Disc Controller) muy potente y que puede funcionar tanto en modo DMA (acceso a directorio a memoria, independientemente del microprocesador) como de forma dependiente del microprocesador. En los Amstrad, por limitaciones del hardware, no se trabaja en el modo DMA (excepto en los PC 1512). | Amstrad computers use an FDC 765 chip from NEC. It is a very powerful Floppy Disc Controller that can work both in DMA (microprocessor-independent memory directory access) and microprocessor-dependent mode. In the Amstrad, due to hardware limitations, it does not work in DMA mode (except in PC 1512). |
| |
Una característica de este controlador es que con solo darle unos pocos datos, se encarga él solo de formatear una pista completa. | One feature of this controller is that by simply giving it a few pieces of data, it takes care of formatting a complete track on its own. |
| |
{{ :otros:NEC_D765AC_Chip.jpg?nolink&600 }} | {{ :otros:NEC_D765AC_Chip.jpg?nolink&600 }} |
| |
__**LOS TRES FORMATOS DE DISCO**__ | __**THE THREE DISC FORMATS**__ |
| |
Los Amstrad CPC y PCW pueden utilizar tres formatos de disco. El conocido como sistema, que utilizan los CPC para soporte del CP/M, se caracteriza por disponer de nueve sectores de 512 bytes en cada pista, numerados de este modo: 41 46 42 47 43 48 44 49 45 (estos números son hexadecimales). | The Amstrad CPC and PCW can use three disc formats. The so-called system, used by the CPCs to support the CP/M, is characterized by having nine 512-byte sectors in each track, numbered as follows: 41 46 42 47 43 48 44 49 45 (these numbers are hexadecimal) . |
| |
El formato del sistema que utiliza el PCW se caracteriza por disponer de nueve sectores de 512 bytes numerados: 01 06 02 07 03 08 04 09 05 y el formato DATA o de datos que consta también de nueve sectores de 512, numerados C1 C6 C2 C7 C3 C8 C4 C9 C5. | The system format used by the PCW is characterized by having nine sectors of 512 bytes numbered: 01 06 02 07 03 08 04 09 05 and the DATA or data format that also consists of nine sectors of 512, numbered C1 C6 C2 C7 C3 C8 C4 C9 C5. |
| |
__**ARRANCANDO EN PRIMERA**__ | __**STARTING IN FIRST**__ |
| |
Muchas veces se habrán leído frases relativas a "arrancar en frío el Sistema Operativo". Esto se refiere simplemente a una operación tan sencilla como encender el ordenador e introducir el disco que contiene el Sistema Operativo. | Many times you will have read phrases related to "cold boot the Operating System". This simply refers to an operation as simple as turning on the computer and inserting the disk containing the Operating System. |
| |
¿Qué ocurre cuando hacemos esto? Muy sencillo. En el interior del ordenador, grabado en ROM, hay un pequeño programa que se encarga de reconocer el formato del disco leyendo una ID (Identificador) de sector de la pista cero. Si el formato es el adecuado, carga el primer sector de la pista cero y lo ejecuta. | What happens when we do this? Very easy. Inside the computer, recorded in ROM, there is a small program that is responsible for recognizing the format of the disk by reading a sector ID (Identifier) from track zero. If the format is correct, it loads the first sector of track zero and plays it. |
| |
En este primer sector se encuentran las instrucciones necesarias y suficientes para cargar en la memoria la parte necesaria de las pistas reservadas para el sistema, y que contienen precisamente eso, el Sistema Operativo. Una vez cargado, se sitúan las diversas partes del S.O. en un sitio y se da el control de la situación al Sistema Operativo. En el caso de los Amstrad PCW y de los CPC con el CP/M Plus, el Sistema Operativo no se toma de las pistas reservadas, sino de un fichero con extensión "EMS", abreviatura de Early Morning Start-up (Arranque por la mañana temprano). | In this first sector are the necessary and sufficient instructions to load in the memory the necessary part of the tracks reserved for the system, and that contain precisely that, the Operating System. Once loaded, the various parts of the S.O. on a site and control of the situation is given to the Operating System. In the case of Amstrad PCWs and CPCs with the CP/M Plus, the Operating System is not taken from the reserved tracks, but from a file with the extension "EMS", short for Early Morning Start-up. tomorrow early). |
| |
Ese sector de la pista reservada se conoce como Boot-sector (sector de botado), y se carga en la dirección hexadecimal 0100. Como una vez cargado se ejecuta una instrucción JP 0100, podemos utilizar una rutina diseñada por nosotros y guardada en el sector de botado para arrancar un programa. | This sector of the reserved track is known as the Boot-sector, and it is loaded at the hexadecimal address 0100. As once loaded, a JP 0100 instruction is executed, we can use a routine designed by us and stored in the sector boot to start a program. |
| |
La única limitación que presenta esta forma de arranque es que la rutina contenida en el sector de botado no puede sobrepasar el tamaño del sector, que en el caso de los CPC y PCW es de 512 bytes. | The only limitation of this boot method is that the routine contained in the boot sector cannot exceed the size of the sector, which in the case of CPC and PCW is 512 bytes. |
| |
Como podemos comprobar, los Sistemas Operativos forman un mundo muy complejo. | As we can see, Operating Systems form a very complex world. |