Difference between revisions of "AMSDOS RSX Functions"
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | Below Resident System Extensions (RSX) commands can be used under BASIC (preceeded by a "|" character), and in machine code by obtaining the function address via KL_FIND_COMMAND, for | + | Below Resident System Extensions (RSX) commands can be used under BASIC (preceeded by a "|" character), and in machine code by obtaining the function address via KL_FIND_COMMAND, for details see: [[BIOS Kernel RSX Functions (Resident System Extensions)]] |
== CPM, DIR, REN, ERA == | == CPM, DIR, REN, ERA == | ||
Line 7: | Line 7: | ||
ERA ;in: A=01h, [IX+0]=ptr to "filename" | ERA ;in: A=01h, [IX+0]=ptr to "filename" | ||
REN ;in: A=02h, [IX+0]=ptr to "newname",[IX+2]=to "oldname" | REN ;in: A=02h, [IX+0]=ptr to "newname",[IX+2]=to "oldname" | ||
− | CPM loads the boot sector from Drive A, Track 0, Side 0, Sector 41h to 0100h..02FFh, and starts it (entrypoint=0100h). DIR displays the directory (similar to CAT, but without alphabetically sorted names, and optionally allowing to specify a filename with "*" and "?" wildcards). ERA erase a file (or multiple files with wildcards). REN renames | + | CPM loads the boot sector from Drive A, Track 0, Side 0, Sector 41h to 0100h..02FFh, and starts it (entrypoint=0100h). DIR displays the directory (similar to CAT, but without alphabetically sorted names, and optionally allowing to specify a filename with "*" and "?" wildcards). ERA erase a file (or multiple files with wildcards). REN renames a file. |
== DISC/TAPE.IN/.OUT == | == DISC/TAPE.IN/.OUT == | ||
Line 29: | Line 29: | ||
== Note == | == Note == | ||
* The above function vectors are usually at ROM7:C009h..C032h in AMSDOS, however, clones like VDOS, RODOS, ROMDOS, X-DDOS have the vectors arranged differently, so always use KL_FIND_COMMAND to obtain the function address. | * The above function vectors are usually at ROM7:C009h..C032h in AMSDOS, however, clones like VDOS, RODOS, ROMDOS, X-DDOS have the vectors arranged differently, so always use KL_FIND_COMMAND to obtain the function address. | ||
+ | |||
+ | [[Category:Programming]] |
Latest revision as of 18:57, 16 December 2010
Below Resident System Extensions (RSX) commands can be used under BASIC (preceeded by a "|" character), and in machine code by obtaining the function address via KL_FIND_COMMAND, for details see: BIOS Kernel RSX Functions (Resident System Extensions)
CPM, DIR, REN, ERA
These are the most important commands, supported by AMSDOS and all clones.
CPM ;in: A=00h (no params) DIR ;in: A=00h, or A=01h, [IX+0]=ptr to "filename" ERA ;in: A=01h, [IX+0]=ptr to "filename" REN ;in: A=02h, [IX+0]=ptr to "newname",[IX+2]=to "oldname"
CPM loads the boot sector from Drive A, Track 0, Side 0, Sector 41h to 0100h..02FFh, and starts it (entrypoint=0100h). DIR displays the directory (similar to CAT, but without alphabetically sorted names, and optionally allowing to specify a filename with "*" and "?" wildcards). ERA erase a file (or multiple files with wildcards). REN renames a file.
DISC/TAPE.IN/.OUT
Redirects the cassette functions [BC77h..BC9Dh] to disc functions (default), or back to the original cassette functions. The .IN variants affect only the CAS_IN and CAS_CATALOG functions. The .OUT variants affect only the CAS_OUT functions.
DISC ;in: A=00h (no params) DISC.IN ;in: A=00h (no params) ;not supported on CPC+ DISC.OUT ;in: A=00h (no params) ;not supported on CPC+ TAPE ;in: A=00h (no params) ;not supported on VDOS TAPE.IN ;in: A=00h (no params) ;not supported on VDOS and CPC+ TAPE.OUT ;in: A=00h (no params) ;not supported on VDOS and CPC+
Caution: The four .IN and .OUT commands are not supported on CPC+ (Amstrad has replaced them by four multi-language commands to start the included Burning Rubber game). The three TAPE commands are not supported by VDOS (vortex has replaced TAPE by CAS, probably because CAS resembles the german word Kassette).
A, B, DRIVE, USER
Changes the default drive or default user (which is used for files that do not contain drive/user information in the filename).
A ;in: A=00h (no params) B ;in: A=00h (no params) DRIVE ;in: A=01h, [IX+0]=ptr to "A","a","B","b" ;not supported by VDOS USER ;in: A=01h, [IX+0]=user number (0000h..000Fh) ;not supported by VDOS
Caution: DRIVE and USER aren't supported by VDOS (vortex has replaced the two commands by a single SELECT command, probably DRIVE and USER were considered to be too difficult for german users).
Note
- The above function vectors are usually at ROM7:C009h..C032h in AMSDOS, however, clones like VDOS, RODOS, ROMDOS, X-DDOS have the vectors arranged differently, so always use KL_FIND_COMMAND to obtain the function address.