This page (revision-7) was last changed on 03-Feb-2023 15:21 by Stefan Haubenthal 

This page was created on 09-Mar-2010 15:49 by Carsten Strotmann

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
7 03-Feb-2023 15:21 53 KB Stefan Haubenthal to previous wikify
6 20-Feb-2012 11:56 53 KB Stefan Haubenthal to previous | to last backslashes removed
5 16-Feb-2012 15:57 53 KB Stefan Haubenthal to previous | to last wikify
4 26-Dec-2010 13:27 53 KB Carsten Strotmann to previous | to last
3 09-Mar-2010 15:57 53 KB Carsten Strotmann to previous | to last
2 09-Mar-2010 15:51 53 KB Carsten Strotmann to previous | to last
1 09-Mar-2010 15:49 53 KB Carsten Strotmann to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 341 changed one line
certain memory locations within DOS 4, you can make each logical drive refer to whichever physical drive you wish. Drive number indirection is controlled by DTYPE at [$73F,$A]. four low-order bits of memory location DTYPE+n gives the physical drive number to be associated with logical drive number Dn:. If the four low-order bits of DTYPE+n are zero then logical drive Dn: is not supported. You may change the contents of DTYPE at any time, even if there are open files to the drives in question. The physical drive associated with a file is determined when the OPEN statement is executed, so that changing DTYPE will not cause an open file to start reading from a different drive.
certain memory locations within DOS 4, you can make each logical drive refer to whichever physical drive you wish. Drive number indirection is controlled by DTYPE at $73F,$A. four low-order bits of memory location DTYPE+n gives the physical drive number to be associated with logical drive number Dn:. If the four low-order bits of DTYPE+n are zero then logical drive Dn: is not supported. You may change the contents of DTYPE at any time, even if there are open files to the drives in question. The physical drive associated with a file is determined when the OPEN statement is executed, so that changing DTYPE will not cause an open file to start reading from a different drive.
At line 346 changed 3 lines
Buffer allocation is controlled by the contents of memory locations BUFMAX at [$710,1] and BUFSIZ at [$711,1]. BUFMAX contains the number
of sector buffers to be allocated; it must be between 2 and 16 (decimal) inclusive. If you want to have N open files on a system with D disk drives then the minimum number of buffers required is N+MIN(N,D). The standard number of buffers is 5. BUFSIZ determines the size of the
buffers. It must contain either 0 (for 256-byte buffers) or $80 (for 128-byte buffers). If you have any double-density drives (or single-density drives with a two-sector VTOC), BUFSIZ must contain 0. The standard value of BUFSIZ is 0. It is recommended that you use a value of 0 even if you have only single-density drives. The contents of BUFMAX and BUFSIZ may be changed only when there are no open disk files. The recommended procedure is:
Buffer allocation is controlled by the contents of memory locations BUFMAX at $710,1 and BUFSIZ at $711,1. BUFMAX contains the number of sector buffers to be allocated; it must be between 2 and 16 (decimal) inclusive. If you want to have N open files on a system with D disk drives then the minimum number of buffers required is N+MIN(N,D). The standard number of buffers is 5. BUFSIZ determines the size of the buffers. It must contain either 0 (for 256-byte buffers) or $80 (for 128-byte buffers). If you have any double-density drives (or single-density drives with a two-sector VTOC), BUFSIZ must contain 0. The standard value of BUFSIZ is 0. It is recommended that you use a value of 0 even if you have only single-density drives. The contents of BUFMAX and BUFSIZ may be changed only when there are no open disk files. The recommended procedure is:
At line 372 changed one line
before calling KERNEL you must store a value into DUPFLG at [$736,1] and optionally into DUPLO at [$732,2] and DUPHI at [$734,2]. Storing zero into DUPFLG forces KERNEL to load the Command Processor when the loaded program returns. Storing any non-zero value into DUPFLG makes KERNEL load the CP only if the calling program was overwritten during the load. In this case, the calling program stores the address of its first byte into DUPLO and the address of its last byte into DUPHI. If the calling program is not overwritten during the load then KERNEL will return to the calling program instead of loading the CP. If KERNEL decides that it must load and run the Command Processor then, before it does so, it stores the error status resulting from the binary load into BLDFLG at [$737,1].
before calling KERNEL you must store a value into DUPFLG at $736,1 and optionally into DUPLO at $732,2 and DUPHI at $734,2. Storing zero into DUPFLG forces KERNEL to load the Command Processor when the loaded program returns. Storing any non-zero value into DUPFLG makes KERNEL load the CP only if the calling program was overwritten during the load. In this case, the calling program stores the address of its first byte into DUPLO and the address of its last byte into DUPHI. If the calling program is not overwritten during the load then KERNEL will return to the calling program instead of loading the CP. If KERNEL decides that it must load and run the Command Processor then, before it does so, it stores the error status resulting from the binary load into BLDFLG at $737,1.
At line 386 changed one line
There are two memory locations which have special significance to the loader: INIVEC at [$2E2,2] and RUNVEC at [$2E0,2]. Every time the loader finishes loading a segment, it checks to see if a non-zero address was loaded into INIVEC. If so, the loader immediately executes a subroutine call (JSR statement) to the address in INIVEC.
There are two memory locations which have special significance to the loader: INIVEC at $2E2,2 and RUNVEC at $2E0,2. Every time the loader finishes loading a segment, it checks to see if a non-zero address was loaded into INIVEC. If so, the loader immediately executes a subroutine call (JSR statement) to the address in INIVEC.
At line 392 changed 2 lines
DUPSPC at [$722,$10] contains the name of the file which contains the Command Processor. This is normally "D1:QDUP.SYS". The filename must end with a carriage return. If you wish to replace the Command Processor with a program of your own, place the name of the file containing
your program into DUPSPC. The program must be in the standard binary load file format. The H. WRITE DOS command can be used to write out a version of DOS 4 containing the new value of DUPSPC. Before it loads the CP, the resident FMS closes all IOCB's. The FMS does not clear the screen, so if a screen clear is desired then the CP must do it. If the CP is going to use the resident screen editor "E:", it should begin with an initialization routine which:
DUPSPC at $722,$10 contains the name of the file which contains the Command Processor. This is normally "D1:QDUP.SYS". The filename must end with a carriage return. If you wish to replace the Command Processor with a program of your own, place the name of the file containing your program into DUPSPC. The program must be in the standard binary load file format. The H. WRITE DOS command can be used to write out a version of DOS 4 containing the new value of DUPSPC. Before it loads the CP, the resident FMS closes all IOCB's. The FMS does not clear the screen, so if a screen clear is desired then the CP must do it. If the CP is going to use the resident screen editor "E:", it should begin with an initialization routine which:
At line 399 changed one line
There are two entry points which load the CP: indirectly through DOSVEC at $0A, or directly through KERNEL at $70D. The CP can determine which entry point was used by examining BLDFLG at [$737,1]. The contents of BLDFLG is zero if entry DOSVEC was used, and non-zero if entry KERNEL was used. In the latter case, the contents of BLDFLG is the error status code resulting from the binary load process; a value greater than or equal to $80 indicates that an error occurred.
There are two entry points which load the CP: indirectly through DOSVEC at $0A, or directly through KERNEL at $70D. The CP can determine which entry point was used by examining BLDFLG at $737,1. The contents of BLDFLG is zero if entry DOSVEC was used, and non-zero if entry KERNEL was used. In the latter case, the contents of BLDFLG is the error status code resulting from the binary load process; a value greater than or equal to $80 indicates that an error occurred.
At line 405 changed 3 lines
standard alternate command value
symbol
location
WRCOMD $73A,1 write
RDCOMD $73B,1 read
DWCOMD $73C,1 write
STCOMD $73D,1 status
At line 407 added 2 lines
WRCOMD is the command used to write data sectors, and DWCOMD is the command used to write directory and VTOC sectors.
Use $50 for fast write (write without verify) and $57 for slow write (write with verify).
At line 410 added one line
Memory location RRVECT at $7D1,3 contains a JMP instruction. The FMS executes a subroutine call (JSR statement) to RRVECT immediately prior to each call to SIO or PIO (the call takes place after setting up the DCB). If you store an address into RRVECT+1 and RRVECT+2, you can effectively intercept all calls to SIO or PIO. The intended use of RRVECT is to allow programs to remain responsive to the user during long disk operations. The contents of RRVECT+1 and RRVECT+2 are initialized to point to an RTS during both coldstart and warmstart. If an RRVECT routine wishes to prevent the FMS from calling SIO or PIO, it can do so by pulling the return address off the stack, adding 3, and then pushing the result back on the stack. If this is done, the RRVECT routine must store an error status code into DSTATS at $303,1 and into the 6502 Y-register before it returns.
At line 411 removed 24 lines
value
WRCOMD
[$73A,1]
write
RDCOMD
[$73B,1]
read
DWCOMD
[$73C,1]
write
STCOMD
[$73D,1]
status
WRCOMD is the command used to write
data sectors, and DWCOMD is the com-
mand used to write directory and VTOC
sectors.
Use $50 for fast write
(write without verify) and $57 for
slow write (write with verify).
Memory location RRVECT at [$7D1,3] contains a JMP instruction. The FMS executes a subroutine call (JSR statement) to RRVECT immediately prior to each call to SIO or PIO (the call takes place after setting up the DCB). If you store an address into RRVECT+1 and RRVECT+2, you can effectively intercept all calls to SIO or PIO. The intended use of RRVECT is to allow programs to remain responsive to the user during long disk operations. The contents of RRVECT+1 and RRVECT+2 are initialized to point to an RTS during both coldstart and warmstart. If an RRVECT routine wishes to prevent the FMS from calling SIO or PIO, it can do so by pulling the return address off the stack, adding 3, and
then pushing the result back on the stack. If this is done, the RRVECT routine must store an error status code into DSTATS at [$303,1] and into the 6502 Y-register before it returns.
At line 459 changed 2 lines
CTBOOT at [$7D5,1] determines whether control goes to the CP or to the cartridge when the computer is turned on. If CTBOOT is zero then
control goes to the CP. If CTBOOT is non-zero then control goes to the cartridge (provided that a cartridge is installed). Built-in BASIC acts just like a cartridge.
CTBOOT at $7D5,1 determines whether control goes to the CP or to the cartridge when the computer is turned on. If CTBOOT is zero then control goes to the CP. If CTBOOT is non-zero then control goes to the cartridge (provided that a cartridge is installed). Built-in BASIC acts just like a cartridge.
At line 462 changed 2 lines
CRTENV at [$7D4,1] determines whether control goes to the CP or to the cartridge when SYSTEM RESET is pressed: zero for the CP, non-zero for
the cartridge. Any program loaded from the CP that passes control to a cartridge should store a non-zero value into CRTENV.
CRTENV at $7D4,1 determines whether control goes to the CP or to the cartridge when SYSTEM RESET is pressed: zero for the CP, non-zero for the cartridge. Any program loaded from the CP that passes control to a cartridge should store a non-zero value into CRTENV.
At line 467 changed 2 lines
REQEOL at [$7D6,1] determines how strictly the FMS enforces the rules for filespecs. A value of $FF means that the rules are strictly enforced. In particular, each filespec must end with a carriage return. A value of $0B is the same as $FF, except that extra characters in the extender are ignored. A value of $00 relaxes the rules, which means that any invalid character is interpreted to mean end-of-filespec.
The default value of REQEOL is $0B. Values other than $00, $0B, or $FF are not allowed.
REQEOL at $7D6,1 determines how strictly the FMS enforces the rules for filespecs. A value of $FF means that the rules are strictly enforced. In particular, each filespec must end with a carriage return. A value of $0B is the same as $FF, except that extra characters in the extender are ignored. A value of $00 relaxes the rules, which means that any invalid character is interpreted to mean end-of-filespec. The default value of REQEOL is $0B. Values other than $00, $0B, or $FF are not allowed.