Commodore DOS , also known as CBM DOS , is the disk operating system used with Commodore 's 8-bit computers . Unlike most other DOSes , which are loaded from disk into the computer's own RAM and executed there, CBM DOS is executed internally in the drive: the DOS resides in ROM chips inside the drive, and is run there by one or more dedicated MOS 6502 family CPUs . Thus, data transfer between Commodore 8-bit computers and their disk drives more closely resembles a local area network connection than typical disk/host transfers.
79-399: At least seven distinctly numbered versions of Commodore DOS are known to exist; the following list gives the version numbers and related disk drives. Unless otherwise noted, drives are 5¼-inch format. The "lp" code designates "low-profile" drives. Drives whose model number starts with 15 connect via Commodore's unique serial IEEE-488 bus (IEC Bus) serial (TALK/LISTEN) protocols; all others use
158-402: A DIRECTORY or CATALOG command that performs the same function. The following file types are supported: The presence of an asterisk ( * ) prepended to the file type in a directory listing (for example, *SEQ ) indicates that the file was not properly closed after writing. When the drive is commanded to close a file that has been opened for writing, the associated buffer is flushed to
237-496: A 32-bit CPU register (in two's complement ), as C228 0000 in a 32-bit FPU register or C045 0000 0000 0000 in a 64-bit FPU register (in the IEEE floating-point standard ). Just as decimal numbers can be represented in exponential notation , so too can hexadecimal numbers. P notation uses the letter P (or p , for "power"), whereas E (or e ) serves a similar purpose in decimal E notation . The number after
316-475: A LOAD. Alternatively, the user could press ⇧ Shift – RUN/STOP to LOAD and RUN the program automatically. A null byte embedded in a file name will interrupt the listing after loading by BASIC. If there are three null bytes, that makes it difficult to list through BASIC. Many machine language programmers would experiment with null bytes in an attempt to make it harder for BASIC programmers to access their code and tamper with it. In BASIC,
395-409: A convenient representation of binary-coded values. Each hexadecimal digit represents four bits (binary digits), also known as a nibble (or nybble). For example, a 6-bit byte can have values ranging from 000000 to 111111 (0 to 63 decimal) in binary form, which can be written as 00 to 3F in hexadecimal. In mathematics, a subscript is typically used to specify the base. For example,
474-401: A directory listing. File types with < after them (for example, PRG< ) are "locked", and cannot be deleted—they can be opened for reading, however. There is no Commodore DOS command that can explicitly set or clear this status, but many third-party utilities were written to allow this to be done. These utilities generally read the directory using direct-access commands, perform
553-586: A flat namespace (no subdirectories ); the directory is stored on reserved track 18, which is located halfway from the hub to the edge of a 35-track single-sided disk. A file name may be up to 16 bytes in length and is theoretically unique; by using direct access methods on the directory structure, it is possible to rename a file to that of another—although accessing such files may be difficult or impossible. Files with identical names usually serve no purpose except to inform or visually manage files. One popular trick, used, for example, by The Final Cartridge III ,
632-403: A larger proportion lies outside its range of finite representation. All rational numbers finitely representable in hexadecimal are also finitely representable in decimal, duodecimal and sexagesimal : that is, any hexadecimal number with a finite number of digits also has a finite number of digits when expressed in those other bases. Conversely, only a fraction of those finitely representable in
711-578: A line "true". A line only becomes "false" if all devices signal false. Transmission begins with the bus talker holding the Clock line true, and the listener(s) holding the Data line true. To begin the talker releases the Clock line to false. When all bus listeners are ready to receive they release the Data line to false. If the talker waits more than 200 μs without the Clock line going true (idle state), listeners have to perform End-or-Identify (EOI). If
790-482: A pair of quaternary digits, and each quaternary digit corresponds to a pair of binary digits. In the above example 2 5 C 16 = 02 11 30 4 . The octal (base 8) system can also be converted with relative ease, although not quite as trivially as with bases 2 and 4. Each octal digit corresponds to three binary digits, rather than four. Therefore, we can convert between octal and hexadecimal via an intermediate conversion to binary followed by regrouping
869-429: A partial directory that shows only the files whose name starts with the letter K and which are of type PRG; all such partial directories still contain the initial disk name line and the final "BLOCKS FREE" line. Commodore DOS also offers a "Save-with-Replace" command, which allows a file to be saved over an existing file without the need to first SCRATCH the existing file. This was done by prepending an @ symbol to
SECTION 10
#1732802499065948-402: A relatively small binary number. Although most humans are familiar with the base 10 system, it is much easier to map binary to hexadecimal than to decimal because each hexadecimal digit maps to a whole number of bits (4 10 ). This example converts 1111 2 to base ten. Since each position in a binary numeral can contain either a 1 or a 0, its value may be easily determined by its position from
1027-510: A single hexadecimal digit. This example shows the conversion of a binary number to decimal, mapping each digit to the decimal value, and adding the results. Compare this to the conversion to hexadecimal, where each group of four digits can be considered independently and converted directly: The conversion from hexadecimal to binary is equally direct. Although quaternary (base 4) is little used, it can easily be converted to and from hexadecimal or binary. Each hexadecimal digit corresponds to
1106-414: A variety of methods have arisen: Sometimes the numbers are known to be Hex. The use of the letters A through F to represent the digits above 9 was not universal in the early history of computers. Since there were no traditional numerals to represent the quantities from ten to fifteen, alphabetic letters were re-employed as a substitute. Most European languages lack non-decimal-based words for some of
1185-408: Is a positional numeral system that represents numbers using a radix (base) of sixteen. Unlike the decimal system representing numbers using ten symbols, hexadecimal uses sixteen distinct symbols, most often the symbols "0"–"9" to represent values 0 to 9 and "A"–"F" to represent values from ten to fifteen. Software developers and system designers widely use hexadecimal numbers because they provide
1264-444: Is a run mode only verb. Also, in programs that issue many disk commands it is customary to open a file to the device's command channel at the start of the program and not close it until the program has finished. Commodore BASIC versions 4.0 and later provide a pseudo-variable referred to as DS$ that may be used to retrieve drive status in lieu of the above code. This reserved variable is not available on earlier versions of BASIC, so
1343-471: Is a special type written into the on-disk directory entry of files that have been deleted. Such files are not shown in a normal directory listing, and their data blocks and directory entries will be reused by files that are subsequently created. Some utility programs allow the "un-deletion" of such files if their data blocks and directory entries haven not yet been overwritten by other files. DEL files are commonly used to insert banners or comment sections into
1422-444: Is illustrated on the right. The hexadecimal system can express negative numbers the same way as in decimal: −2A to represent −42 10 , −B01D9 to represent −721369 10 and so on. Hexadecimal can also be used to express the exact bit patterns used in the processor , so a sequence of hexadecimal digits may represent a signed or even a floating-point value. This way, the negative number −42 10 can be written as FFFF FFD6 in
1501-454: Is much more advisable to work with bitwise operators . It is also possible to make the conversion by assigning each place in the source base the hexadecimal representation of its place value — before carrying out multiplication and addition to get the final representation. For example, to convert the number B3AD to decimal, one can split the hexadecimal number into its digits: B (11 10 ), 3 (3 10 ), A (10 10 ) and D (13 10 ), and then get
1580-562: Is some standardization of using spaces (rather than commas or another punctuation mark) to separate hex values in a long list. For instance, in the following hex dump , each 8-bit byte is a 2-digit hex number, with spaces between them, while the 32-bit offset at the start is an 8-digit hex number. In contexts where the base is not clear, hexadecimal numbers can be ambiguous and confused with numbers expressed in other bases. There are several conventions for expressing values unambiguously. A numerical subscript (itself written in decimal) can give
1659-502: The C99 edition of the C programming language . Using the %a or %A conversion specifiers, this notation can be produced by implementations of the printf family of functions following the C99 specification and Single Unix Specification (IEEE Std 1003.1) POSIX standard. Most computers manipulate binary data, but it is difficult for humans to work with a large number of digits for even
SECTION 20
#17328024990651738-667: The Calculator utility can be set to Programmer mode, which allows conversions between radix 16 (hexadecimal), 10 (decimal), 8 ( octal ), and 2 ( binary ), the bases most commonly used by programmers. In Programmer Mode, the on-screen numeric keypad includes the hexadecimal digits A through F, which are active when "Hex" is selected. In hex mode, however, the Windows Calculator supports only integers. Elementary operations such as division can be carried out indirectly through conversion to an alternate numeral system , such as
1817-578: The Commodore 64 , entering LOAD "$ " , 8 , 1 will flood the screen with garbage instead of loading the directory into BASIC RAM. This is because the drive assigns the directory a load address of $ 0401 (1025), which is equivalent to the start of BASIC for the Commodore PET , but corresponds to the default screen memory in the C64 (starting with the second character on the first line of
1896-454: The P is decimal and represents the binary exponent. Increasing the exponent by 1 multiplies by 2, not 16: 20p0 = 10p1 = 8p2 = 4p3 = 2p4 = 1p5 . Usually, the number is normalized so that the hexadecimal digits start with 1. (zero is usually 0 with no P ). Example: 1.3DEp42 represents 1.3DE 16 × 2 . P notation is required by the IEEE 754-2008 binary floating-point standard and can be used for floating-point literals in
1975-472: The VIC-20 (1980). Connection to the computer uses a DIN-6 connector (DIN 45322). The bus signals are digital single-ended open collector 5 volt TTL and active when low. Bus devices have to provide their own power. Because the bus lines are electrically open collector it works like a long OR gate between all device line drivers. The logical value for ground is true and vice versa. Any device may set
2054-487: The VIC-20 , Commodore 64 , Commodore 128 , Plus/4 , Commodore 16 , and Commodore 65 . The parallel IEEE-488 interface used on the Commodore PET (1977) computer line was too costly, so a cost reduced version was developed, which consisted of a stripped down, serial version of the IEEE-488 interface, with only a few signals remaining; however, the general protocol layout was kept. Commodore began using this bus with
2133-491: The duodecimal system, there have been occasional attempts to promote hexadecimal as the preferred numeral system. These attempts often propose specific pronunciation and symbols for the individual numerals. Some proposals unify standard measures so that they are multiples of 16. An early such proposal was put forward by John W. Nystrom in Project of a New System of Arithmetic, Weight, Measure and Coins: Proposed to be called
2212-399: The wildcard expansion will only pick the first catalog name when no other file on that disk has been accessed before; the name of the last-used file is kept in memory, and subsequent LOAD "*" , 8 , 1 commands will load that file rather than the first. (However, LOAD "0:*" , 8 , 1 or LOAD ":*" , 8 , 1 will always load the first file on
2291-402: The "phantom" buffer was allocated did not meet specifications, this could result in scrambled data being written to the disk. In September 1986, Philip A. Slaymaker published an article describing in great detail the cause of the bug and providing patches to the 1541 drive ROMs; readers with an EPROM burner could produce their own patched ROMs which could be swapped into the drive. Commodore
2370-458: The ATN line false and the host then becomes the talker, holding the Clock line true. The device will be the listener, holding the Data line true. The host will transmit the specific open command and end it with an EOI signal sequence. After this the host will set with ATN line true, "Device number 8, unlisten". Followed up by ATN line true and "Device number 8, listen", "Secondary address 2, data". Then
2449-465: The BASIC program to a sequential file. If the secondary address isn't specified or is specified as 0 (e.g. LOAD "FILE" , 8 ), the file is saved/loaded from the BASIC memory area (which, on the C64, starts by default at $ 0801). If the secondary address is specified as a non-zero value (e.g. LOAD "FILE" , 8 , 1 ), the program is loaded starting from the address specified by
Commodore DOS - Misplaced Pages Continue
2528-477: The Clock line to go false and then pulls it to true and release the Data line to false. After this sequence the standard talk-listener interaction may follow. To read a normal file from the floppy device number 8 the command LOAD "filename",8,1 is issued on a Commodore 64 . That causes the following high level communication to take place: The Commodore 1541 floppy drive uses a slower Commodore 64 compatible mode which can be deactivated for faster speed by using
2607-407: The Clock line true. Data is eight bits starting with the least significant bit. The Data line is set according to the bit to send (1=true=ground). Once the Data line is set, the Clock line is released to false. The Clock and Data lines will be held steady for at least 20 μs (except for Commodore 64 that needs 60 μs). After 8 bits has been sent, the talker releases the Data line to false and
2686-560: The DOS scratch command to delete the file may cause filesystem corruption, such as crosslinking. The only practical method of removing one of these files is by opening the file in "modify" mode (and fixing it), or by validating the disk (see the DOS validate command below), the latter which rebuilds the BAM and removes poison file references from the directory. The infamous save-with-replace bug could result in creation of splat files. *DEL
2765-421: The DOS versions use incompatible disk formats: "2A" is used by most 5.25-inch DOS versions, "3D" by the 3.5-inch 1581). Lines after this have the size of a file (in disk blocks) as their pseudo "line number", followed by the file name in quotes and the three-letter type code. The last line shows the number of unallocated blocks on the disk (again as a pseudo "line number"), followed by the words "BLOCKS FREE." On
2844-427: The Data line being false (released) isn't acknowledged by the talker within 200 μs, the listener knows that the talker is in the process of EOI that means "this character will be the last one". When the listener detects the 200 μs timeout, it must acknowledge this by pulling the Data line true for at least 60 μs, and then release it. The talker can revert to transmitting again within 60 μs by pulling
2923-457: The PET's built-in machine language monitor to change the link address for the BASIC program after loading it. The command LOAD "*" , 8 , 1 will load the first program on the disk starting from the file-specified memory location. This is one of the most popular load commands of the platforms, the method to start majority of commercial software, for example. Of note is the fact that
3002-497: The Save-with-Replace bug was real and including methods by which it could be triggered. Affected devices included the single-drive 1541 and dual-drive 4040; the 8050 and 8250 did not exhibit the issue. Some commentators suggested the bug could be avoided by always explicitly specifying the 0: drive number when saving, though it was later shown that any disk operations without a drive number were sufficient to lead to
3081-550: The Tonal System, with Sixteen to the Base , published in 1862. Nystrom among other things suggested hexadecimal time , which subdivides a day by 16, so that there are 16 "hours" (or "10 tims ", pronounced tontim ) in a day. The word hexadecimal is first recorded in 1952. It is macaronic in the sense that it combines Greek ἕξ (hex) "six" with Latinate -decimal . The all-Latin alternative sexadecimal (compare
3160-399: The above example, E will hold the error number (if any; it will be zero if no error exists), E$ will be a terse text description of the error, T will represent the disk track where the error occurred, and S will be the sector on track T to which the error refers. If no error exists, the equivalent of 00,OK,00,00 will be returned in the four variables. Note that INPUT#
3239-507: The base explicitly: 159 10 is decimal 159; 159 16 is hexadecimal 159, which equals 345 10 . Some authors prefer a text subscript, such as 159 decimal and 159 hex , or 159 d and 159 h . Donald Knuth introduced the use of a particular typeface to represent a particular radix in his book The TeXbook . Hexadecimal representations are written there in a typewriter typeface : 5A3 , C1F27ED In linear text systems, such as those used in most computer programming environments,
Commodore DOS - Misplaced Pages Continue
3318-451: The binary digits in groups of either three or four. As with all bases there is a simple algorithm for converting a representation of a number to hexadecimal by doing integer division and remainder operations in the source base. In theory, this is possible from any base, but for most humans, only decimal and for most computers, only binary (which can be converted by far more efficient methods) can be easily handled with this method. Let d be
3397-491: The bug for that drive as well. As previously noted, the Commodore DOS itself is accessed via the "command channel", using syntax like that used to access files. Issuing commands to the DOS and retrieving status and error messages generated in response to commands is accomplished by opening a file to the device using 15 as the secondary address, for example: To retrieve and display the device status, one could code: In
3476-411: The bug. The bug stemmed from the fact that the affected DOS implementations were modified versions of the DOS contained in earlier Commodore PET dual drives such as the 8050. This created a "phantom drive 1: " on single-drive systems, resulting in the allocation of an unnecessary buffer under some conditions. Since the Save-with-Replace command used all five drive buffers, and because the method by which
3555-427: The byte is interpreted as one of the commands "Talk," "Listen," "Untalk," and "Unlisten". That tell a specific device to become a talker or listener. Only devices with matching device numbers switch into talk and listen mode. A secondary address may also follow. On higher logical level the host will set the ATN line to true and transmit the bytes "Device number 8, listen", "Secondary address 2, open". Next it will set
3634-633: The command OPEN 15,8,15,"UI-":CLOSE 15 . Device number 0–3 are not associated with the Commodore bus. The VIC-20 computer and the Commodore 1540 and 1541 floppy drives use the MOS Technology 6522 VIA to handle IEC Bus transmissions. The Commodore 64 and 128 computers and the Commodore 1571 drive use the Complex Interface Adapter . Hexadecimal Hexadecimal (also known as base-16 or simply hex )
3713-679: The command channel must be manually read as demonstrated above. Note that immediately after power-on or reset, the DOS revision will be returned. For example, a 1541 will return 73,CBM DOS V2.6 1541,00,00 . Error code 73 is common to all drive models and may be used to determine if the drive has been reset to its power-on state. There are also a command for seeking in RELative type files ( RECORD# ), several block-level direct-access commands ( BLOCK-READ , BLOCK-WRITE , BUFFER-POINTER ), block management ( BLOCK-ALLOCATE , BLOCK-FREE ), drive memory manipulation and execution of program code on
3792-400: The commonly used decimal system or the binary system where each hex digit corresponds to four binary digits. Alternatively, one can also perform elementary operations directly within the hex system itself — by relying on its addition/multiplication tables and its corresponding standard algorithms such as long division and the traditional subtraction algorithm. As with other numeral systems,
3871-440: The decimal value 711 would be expressed in hexadecimal as 2C7 16 . In programming, several notations denote hexadecimal numbers, usually involving a prefix. The prefix 0x is used in C , which would denote this value as 0x2C7 . Hexadecimal is used in the transfer encoding Base 16 , in which each byte of the plain text is broken into two 4-bit values and represented by two hexadecimal digits. In most current use cases,
3950-417: The directory can be accessed as a non-executable pseudo-BASIC program with LOAD "$ 0" , 8 (or LOAD "$ 1" , 8 in the case of a dual drive) followed by LIST . The first line has a line number of 0 or 1 (indicating the drive number), showing in reverse video the name and ID of the disk and a shorthand code for the DOS version with which it was created (codes vary only as far as
4029-435: The directory listing as, for example, 32 "PROGRAM",8,1 PRG . When the user moves the cursor to the beginning of the line, types the word LOAD over the file size, and presses RETURN , BASIC interprets that as LOAD "PROGRAM" , 8 , 1 ... , causing the program to be loaded into memory. Anything after the colon or the secondary address will not be executed, since the computer ignores any command after
SECTION 50
#17328024990654108-501: The disk and the block availability map (BAM) is updated to accurately reflect which blocks have been used. If a program crash or other problem (such as the user removing the disk while a file is open) results in an "orphan file", also referred to as a "poison" or "splat" file, buffers are not flushed and the BAM will not accurately reflect disk usage, putting the disk at risk of corruption. A poison file generally cannot be accessed (but can be opened in "modify" mode), and an attempt to use
4187-404: The disk.) The directories of disks in two-drive units are accessed as LOAD "$ 0" , 8 and LOAD "$ 1" , 8 . "0:$ " and "1:$ " do not access the directory but actual files on one drive or the other that just happen to be named "$ " . Partial directories can be loaded by adding a colon and a template: for example, LOAD "$ 0:K*=P" , 8 would load
4266-520: The drive to assure unambiguous interpretation. A typical statement in BASIC to write to a sequential file would be as follows: The parameters following the OPEN verb are as follows: Files can also be loaded and saved to with LOAD and SAVE commands. File name specifiers can also be used here, for example, SAVE "FILE" , 8 saves the BASIC program to a PRG (program) file and SAVE "0:FILE,SEQ,WRITE" , 8 , 1 saves
4345-478: The drive's processor ( MEMORY-WRITE , MEMORY-READ , MEMORY-EXECUTE , BLOCK-EXECUTE ) and user-definable functions ( USER and & commands). Some of the theoretically user-definable functions were rededicated for accessing new functionality in DOS versions after 1.0. Commodore bus The Commodore serial bus ( IEC Bus ), is Commodore 's interface for primarily magnetic disk data storage and printers for Commodore 8-bit home computers :
4424-450: The expansions of some common irrational numbers in decimal and hexadecimal. Powers of two have very simple expansions in hexadecimal. The first sixteen powers of two are shown below. The traditional Chinese units of measurement were base-16. For example, one jīn (斤) in the old system equals sixteen taels . The suanpan (Chinese abacus ) can be used to perform hexadecimal calculations such as additions and subtractions. As with
4503-538: The file itself (the PRG header, which is the first two bytes of the file)—this form of command is more common when loading machine code programs. Load relocation was first introduced on the VIC-20 because this machine could start BASIC RAM in several different locations, depending on the memory expansion that was installed. The older Commodore PET series did not support relocation, so LOAD "FILE" , 8 and LOAD "FILE" , 8 , 1 would have
4582-466: The file name during the OPEN or SAVE operation - for instance, SAVE "@MY PROGRAM" , 8 . For years rumors spread, beginning with the 4040 drive, of a bug in the command's implementation. At first, this was denied by some commentators. Prizes were offered to prove the existence of the bug. By early 1985 Compute! magazine advised readers to avoid using the command. That year various authors independently published articles proving that
4661-455: The final result by multiplying each decimal representation by 16 ( p being the corresponding hex digit position, counting from right to left, beginning with 0). In this case, we have that: B3AD = (11 × 16 ) + (3 × 16 ) + (10 × 16 ) + (13 × 16 ) which is 45997 in base 10. Many computer systems provide a calculator utility capable of performing conversions between the various radices frequently including hexadecimal. In Microsoft Windows ,
4740-454: The hexadecimal system can be used to represent rational numbers , although repeating expansions are common since sixteen (10 16 ) has only a single prime factor: two. For any base, 0.1 (or "1/10") is always equivalent to one divided by the representation of that base value in its own number system. Thus, whether dividing one by two for binary or dividing one by sixteen for hexadecimal, both of these fractions are written as 0.1 . Because
4819-409: The host sets the ATN line false and sends the data. When the host has finished sending data the ATN line is set to true and "Device number 8, unlisten" is sent. When it is necessary to switch roles and make the host a listener and the device a talker the occurs after a talk command has been sent to the device. The host sets the Data line true and releases the Clock line to false. The device waits for
SECTION 60
#17328024990654898-421: The latter bases are finitely representable in hexadecimal. For example, decimal 0.1 corresponds to the infinite recurring representation 0.1 9 in hexadecimal. However, hexadecimal is more efficient than duodecimal and sexagesimal for representing fractions with powers of two in the denominator. For example, 0.0625 10 (one-sixteenth) is equivalent to 0.1 16 , 0.09 12 , and 0;3,45 60 . The table below gives
4977-437: The letters A–F or a–f represent the values 10–15, while the numerals 0–9 are used to represent their decimal values. There is no universal convention to use lowercase or uppercase, so each is prevalent or preferred in particular environments by community standards or convention; even mixed case is used. Some seven-segment displays use mixed-case 'A b C d E F' to distinguish the digits A–F from one another and from 0–9. There
5056-457: The listener then acknowledge the talker by pulling the Data line true within 1000 μs. After this the talker sets the Clock line true and listener sets the Data line true thus back where the transmission begun. If an EOI is signaled by holding the Clock line false the transmission is ended and the listener acknowledge this by pulling the Data line true for 200 μs. The ATN line is set to true and bytes are sent like above to all devices, but
5135-466: The necessary modifications to the raw data, and then write the changes back to the disk. Accessing files is primarily an issue for the host computer. The kernal ROM in the computer contains the necessary primitive routines needed to access files, and the BASIC ROM contains a higher level abstraction for file access using BASIC syntax. The components that concern the DOS itself are file name parsing and
5214-484: The number to represent in hexadecimal, and the series h i h i−1 ...h 2 h 1 be the hexadecimal digits representing the number. "16" may be replaced with any other base that may be desired. The following is a JavaScript implementation of the above algorithm for converting any number to a hexadecimal in String representation. Its purpose is to illustrate the above algorithm. To work with data seriously, however, it
5293-553: The numerals eleven to fifteen. Some people read hexadecimal numbers digit by digit, like a phone number, or using the NATO phonetic alphabet , the Joint Army/Navy Phonetic Alphabet , or a similar ad-hoc system. In the wake of the adoption of hexadecimal among IBM System/360 programmers, Magnuson (1968) suggested a pronunciation guide that gave short names to the letters of hexadecimal – for instance, "A"
5372-421: The parallel IEEE-488 . Version 2.6 was by far the most commonly used and widely known DOS version, due to its use in the 1541 as part of C64 systems. Note: The revised firmware for the 1571 which fixed the relative file bug was also identified as V3.0. Thus it is not possible to differentiate the two versions using the version number alone. The 1541 Commodore floppy disk can contain up to 144 files in
5451-414: The portion of the file name beyond the $ A0 character will appear to have been separated from the first part of the file name by a quotation mark, causing BASIC to not consider it to be part of the full file name. This feature can be used to create directory entries such as SAVE "PROGRAM ⇧ Shift – space Commodore – D U D E ",8,1 , which will then appear in
5530-598: The radix 16 is a perfect square (4 ), fractions expressed in hexadecimal have an odd period much more often than decimal ones, and there are no cyclic numbers (other than trivial single digits). Recurring digits are exhibited when the denominator in lowest terms has a prime factor not found in the radix; thus, when using hexadecimal notation, all fractions with denominators that are not a power of two result in an infinite string of recurring digits (such as thirds and fifths). This makes hexadecimal (and binary) less convenient than decimal for representing rational numbers since
5609-428: The right: Therefore: With little practice, mapping 1111 2 to F 16 in one step becomes easy (see table in written representation ). The advantage of using hexadecimal rather than decimal increases rapidly with the size of the number. When the number becomes large, conversion to decimal is very tedious. However, when mapping to hexadecimal, it is trivial to regard the binary string as 4-digit groups and map each to
5688-420: The same effect: the file would be loaded into the same memory region from which it was saved. Load relocation happens in the host, being an exception to what is said above about the secondary address being used only device-internally. Since the PET cannot relocate files, BASIC programs written on later Commodore machines must be modified by using a sector editor to change the header bytes. It is also possible to use
5767-452: The screen). Viewing the directory with a LOAD "$ " , 8 command overwrites the BASIC program in memory. The DOS Wedge and various third-party cartridges and extenders such as Epyx Fast Load , Action Replay , and The Final Cartridge III allow viewing of the disk directory using special commands that load the directory into screen memory without destroying the current BASIC program. Some versions of Commodore BASIC include
5846-406: The secondary address. This section will give an overview of the necessary BASIC commands for the sake of completeness. Opening a file on a Commodore disk unit entails the processing of a number of parameters that are vaguely analogous to file opening procedures in other environments. Since the DOS is actually running in the drive's controller, the file opening sequence must pass enough information to
5925-596: The verbal Morse Code conventions to express four-bit hexadecimal digits, with "dit" and "dah" representing zero and one, respectively, so that "0000" is voiced as "dit-dit-dit-dit" (....), dah-dit-dit-dah (-..-) voices the digit with a value of nine, and "dah-dah-dah-dah" (----) voices the hexadecimal digit for decimal 15. Systems of counting on digits have been devised for both binary and hexadecimal. Arthur C. Clarke suggested using each finger as an on/off bit, allowing finger counting from zero to 1023 10 on ten fingers. Another system for counting up to FF 16 (255 10 )
6004-774: The word sexagesimal for base 60) is older, and sees at least occasional use from the late 19th century. It is still in use in the 1950s in Bendix documentation. Schwartzman (1994) argues that use of sexadecimal may have been avoided because of its suggestive abbreviation to sex . Many western languages since the 1960s have adopted terms equivalent in formation to hexadecimal (e.g. French hexadécimal , Italian esadecimale , Romanian hexazecimal , Serbian хексадецимални , etc.) but others have introduced terms which substitute native words for "sixteen" (e.g. Greek δεκαεξαδικός, Icelandic sextándakerfi , Russian шестнадцатеричной etc.) Terminology and notation did not become settled until
6083-511: Was made aware of Slaymaker's findings, and while they never issued an official update for the original 1541's ROMs, they did fix the bug in Revision 5 of the 1571 ROMs, and also in the ROMs for the 1541-c and 1541-II drives. Although not supported by Commodore, it is known that the 1541-II firmware (but not that of the 1541-c) can also be used in an original 1541 drive by using EPROMs, which will fix
6162-470: Was pronounced "ann", B "bet", C "chris", etc. Another naming-system was published online by Rogers (2007) that tries to make the verbal representation distinguishable in any case, even when the actual number does not contain numbers A–F. Examples are listed in the tables below. Yet another naming system was elaborated by Babb (2015), based on a joke in Silicon Valley . Others have proposed using
6241-400: Was to add files named "----------------" of type DEL< to the directory, and files could then be rearranged around those lines to form groups. Many game developers, warez group members, and demoscene hackers used some more clever custom directory entries as well. File names may contain a shifted space character ( $ A0 ), and if the directory listing is being viewed from BASIC,
#64935