Difference between revisions of "AMSDOS"

From CPCWiki - THE Amstrad CPC encyclopedia!
Jump to: navigation, search
(BASDOS)
(BASDOS)
Line 110: Line 110:
 
* There is a new block of code at &dc00-&df00 in the ROM which starts with a small jumpblock. This code implements the patches. Other parts of the ROM have been patched to call into this.
 
* There is a new block of code at &dc00-&df00 in the ROM which starts with a small jumpblock. This code implements the patches. Other parts of the ROM have been patched to call into this.
 
* the double sided Microdisc disc format is supported in AMSDOS mode
 
* the double sided Microdisc disc format is supported in AMSDOS mode
 +
* BASDOS can boot both Microdisc and CP/M based on the detected disc format.
  
 
[[Category:Stub]] [[Category:Disc Operating_System]]
 
[[Category:Stub]] [[Category:Disc Operating_System]]

Revision as of 05:43, 29 April 2018

AMSDOS is the disk operating system for the Amstrad computers. It allows the computer to handle two 178k single-sided drives. It does not features directories, but instead uses user numbers, from 0 to 15 (and up to 255 with a trick) The disk are 9 sectors and 40 tracks.

AMSDOS also adds 14 RSX commands to the Locomotive BASIC command set.

BIOS Functions and Memory Map related to AMSDOS

AMSDOS command reference

|A

Makes drive A: the default disk drive. The result equals that of |DRIVE with parameter A. On a CPC664, CPC6128 or 6128plus, normally the built-in disk drive is A:.

|B

Makes drive B: the default disk drive. The result equals that of |DRIVE with parameter B. On a CPC664, CPC6128 or 6128plus, normally the built-in disk drive is A:.

|CPM

Boots a disk operating system from a system disk. CPCs came with CP/M 2.2 (CPC464, CPC664, CPC6128) and/or CP/M Plus (CPC6128, 6128plus). The command has no effect if no system disk is inserted. Some games also used this method in order to be started. Note that CPCs could be modified on the PCB in order to automatically perform the same thing as |CPM on power up.

|DIR

|DIR[,<text argument>]

|DIR,"*.BAS"

Shows the contents of the current disk (in CP/M style) as well as the free disk space. If <text argument> is omitted, *.* is assumed.

|DISC

Equals the commands |DISC.IN plus |DISC.OUT

|DISC.IN

Switches to disk as file input media.

|DISC.OUT

Switches to disk as file output media.

|DRIVE

|DRIVE,<text argument>

|DRIVE,"A"

Sets the default drive. This command only works when there is a readable disk in the chosen drive.

|ERA

|ERA,<text argument>

|ERA,"*.BAK"

Erases all files matching the text argument which aren't set as read-only. Wildcards can be used.

|REN

|REN,<text argument>,<text argument>

|REN,"NEWNAME.BAS","OLDNAME.BAS"

Renames a file. A file with the new file name may not already exist. Wildcards aren't allowed. For <text argument>, the USER parameter can also be used (see |USER):

|REN,"0:NEW.BAS","15:OLD.BAS"

the file OLD.BAS from USER 15 will be renamed to NEW.BAS and assigned to USER 0, regardless which USER number was chosen before.

|TAPE

Equals the commands |TAPE.IN plus |TAPE.OUT

|TAPE.IN

Uses the tape recorder as file input media.

|TAPE.OUT

Uses the tape recorder as file output media.

|USER

|USER,<integer expression>

|USER,3

Chooses, which of the 16¹ possible sections of the directory (from 0 to 15) applies to disk commands (e.g. CAT, LOAD, |DIR, a.s.o.). A file can be moved from one user number to another using the |REN command. E.g.

|REN,"15:EXAMPLE.BAS","0:EXAMPLE.BAS"

moves the file EXAMPLE.BAS from USER 0 to USER 15 without changing its name.

¹: In fact, more user areas exist. Deleted files for example are in reality only moved to USER 229 (hexadecimal &E5). You can choose another user with a POKE into AMSDOS variables.

CAS TEST EOF

  • If the opened file doesn't have a header then hard EOF is signaled at the end of the current record (Each record is 128 bytes). e.g. if reading a file without a header which is meant to be 2 bytes long, hard eof will not be signalled until byte 128.
  • If the opened file does have a header then hard EOF is signaled at the end of the data defined by the header. (i.e. if there is a header and the file has length 2, hard EOF is signalled when reading the third byte).

BASDOS

BASDOS (BASIC Disc Operating System) is a patched AMSDOS made in East Germany (GDR) for the KC Compact.

Differences compared to AMSDOS:

  • There is a new block of code at &dc00-&df00 in the ROM which starts with a small jumpblock. This code implements the patches. Other parts of the ROM have been patched to call into this.
  • the double sided Microdisc disc format is supported in AMSDOS mode
  • BASDOS can boot both Microdisc and CP/M based on the detected disc format.