[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Changing ProDOS's (BASIC.SYSTEM's?) File Type Mneumonics
Jon Bettencourt writes ...
>
> How do I change the ProDOS file type mneumonics? Are they stored in
> BASIC.SYSTEM, or in the PRODOS file itself?
....
The mnemonics are in BASIC.SYSTEM.
> If I want to assign a mneumonic to a file type that doesn't have one, say,
> $77, could I find a "$77" in the file and replace that? Or would that
> require more advanced editing?
>
....
A few years ago it seemed worthwhile to mod BASIC.SYSTEM so that both the
mnemonics and Hex code for filetype would be displayed in a CATALOG. This led
to looking at the way BASIC.SYSTEM gets the mnemonic.
Hex codes for recognized filetypes are in one table and the mnemonics are
in another. Given the Hex code for a file'e type, the routine scans through the
Hex codes table looking for a match. If it finds the code it uses the position
of the code to index into the mnemonics table and the letters of the mnemonic
are displayed. If the code is not found, you get the Hex code displayed
prefixed with a "$".
So, your big problem in assigning a mnemonic to an unknown filetype code
is that you will need to extend both the Hex code and mnemonics tables.
Fortunately, this stuff is near the end of BASIC.SYSTEM, which should reduce
disruptions. Using an assembler, you can allocate the needed space and adjust
things like the number of Hex codes to check-- in version 2.0.3, see code at
byte $0F1 in rel block 008 (LDX #0E).
In version 2.0.3, the Hex code table starts with byte $1F3 ($FF) in rel
block 018; and, the mnemonics table starts with byte $002 in rel block 19
("S16"). The ordering of the Hex code table is the reverse of the ordering of
the mnemonics table.
Rubywand