Voir le sujet pr�c�dent :: Voir le sujet suivant |
Auteur |
Message |
toinet
Inscrit le: 15 Juin 2007 Messages: 326 Localisation: Paris, France
|
Post� le: Jeu 20 Sep 2007, 19:21 Sujet du message: GS/OS : VCB and FCB |
|
|
Hi there,
does somebody know and would like to share his/her knowledge about GS/OS Volume Control Block and File Control Block structure?
The information I have comes from Inside Macintosh volume IV. I strongly believe the VCB and FCB structures described in that book do not match the GS/OS versions.
Thank you for your help,
antoine |
|
Revenir en haut de page |
|
|
toinet
Inscrit le: 15 Juin 2007 Messages: 326 Localisation: Paris, France
|
Post� le: Ven 21 Sep 2007, 19:39 Sujet du message: |
|
|
Excerpt from what I have just written on comp.sys.apple2
===
They do not mention the following system service calls:
- $01FC00 - DEV_DISPATCHER
- $01FC24 - ALLOC_VCR
- $01FC28 - RELEASE_VCR
- $01FC2C - ALLOC_FCR
- $01FC30 - RELEASE_FCR
- $01FC3C - GET_SYS_GBUF
- $01FC40 - SYS_EXIT
- $01FC48 - FIND_VCR
- $01FC64 - GET_FCR
Let me describe them from what I have understood after hours of work. The format is equivalent to the GS/OS device driver reference manual:
DEV_DISPATCHER ($01FC0)
Description: This routine passes control to a device to execute a command
Parameters
- GSOS direct page:
-- deviceNum
-- callNum
-- bufferPtr
-- requestCount
-- transferCount
-- blockNum
-- blockSize
-- fstNum
-- volumeID
-- cachePriority
-- cachePointer
-- dibPointer
- Return:
-- A register: error code
Notes
- Input and output are always passed by GS/OS direct-page locations in this routine. Full native mode is used.
Errors
- If c = 0: no error, the command has been executed
- If c = 1: error, the command has not been executed
ALLOC_VCR ($01FC24)
Description: This routine returns a virtual pointer to a Volume Control Record of the requested size
Parameters
- Input:
-- A register: requested memory block size (number of bytes) -- It is $32 bytes long
-- X register: pointer (low byte) to class 1 input string of volume name
-- Y register: pointer (high byte) to class 1 input string of volume name
- Return:
-- X register: virtual pointer (low byte) to newly allocated block
-- Y register: virtual pointer (high byte) to newly allocated block
Notes
- None
Errors
- If c = 0: no error, memory was allocated
- If c = 1: error, memory could not be allocated
RELEASE_VCR ($01FC28)
Description: This routine releases a memory Volume Control Record that was allocated with the ALLOC_VCR call.
Parameters
- Input:
-- A register: Volume Control Record reference number
- Return:
-- None
Notes
- None
Errors
- If c = 0: no error, memory was freed
- If c = 1: error, memory was not freed
ALLOC_FCR ($01FC2C)
Description: This routine returns a virtual pointer to a File Control Record of the requested size
Parameters
- Input:
-- A register: requested memory block size (number of bytes) -- It is $32 bytes long
-- X register: pointer (low byte) to class 1 input string of file name
-- Y register: pointer (high byte) to class 1 input string of file name
- Return:
-- X register: virtual pointer (low byte) to newly allocated block
-- Y register: virtual pointer (high byte) to newly allocated block
Notes
- None
Errors
- If c = 0: no error, memory was allocated
- If c = 1: error, memory could not be allocated
RELEASE_FCR ($01FC30)
Description: This routine releases a memory File Control Record that was allocated with the ALLOC_FCR call.
Parameters
- Input:
-- A register: File Control Record reference number
- Return:
-- None
Notes
- None
Errors
- If c = 0: no error, memory was freed
- If c = 1: error, memory was not freed
GET_SYS_GBUF ($01FC3C)
Description: This routine returns a pointer to the GS/OS buffer.
Parameters
- Input:
-- None
- Return:
-- X register: pointer (low byte) to GS/OS buffer address
-- Y register: pointer (high byte) to GS/OS buffer address
Notes
- Full native mode is used
- The carry is always cleared
- The direct-page is at offset $2300
Errors
- None
SYS_EXIT ($01FC40)
Description: This routine returns from the GS/OS environment. It returns to the calling program.
Parameters
- Input:
-- A register: error code
- Return:
-- None
Notes
- The previous direct-page address and the stack pointer are restored.
Errors
- None
FIND_VCR ($01FC48)
Description: This routine attempts to find the requested Volume Control Record.
Parameters
- Input:
-- A register: command word. Bit 15 and bit 14 are used
-- X register: pointer (low byte) to class 1 input string of volume name
-- Y register: pointer (high byte) to class 1 input string of volume name
- Return:
-- X register: virtual pointer (low byte) to Volume Control Record
-- Y register: virtual pointer (high byte) to Volume Control Record
Notes
- None
Errors
- If c = 0: no error, the Volume Control Record has been found
- If c = 1: error, the Volume Control Record has not been found
GET_FCR ($01FC64)
Description: This routine returns the requested File Control Record that was allocated with the ALLOC_FCR call.
Parameters
- Input:
-- A register: File Control Record reference number
- Return:
-- X register: virtual pointer (low byte) to File Control Record
-- Y register: virtual pointer (high byte) to File Control Record
Notes
- None
Errors
- If c = 0: no error, the File Control Record has been found
- If c = 1: error, the File Control Record has not been found |
|
Revenir en haut de page |
|
|
JPL Site Admin
Inscrit le: 12 Mar 2007 Messages: 160 Localisation: Issy les Moulineaux / PARIS
|
Post� le: Dim 23 Sep 2007, 18:17 Sujet du message: |
|
|
Pas trouv� dans les docs GS... interessant de retrouver ces appels non document�s
Not found in any GS doc |
|
Revenir en haut de page |
|
|
toinet
Inscrit le: 15 Juin 2007 Messages: 326 Localisation: Paris, France
|
Post� le: Lun 24 Sep 2007, 13:10 Sujet du message: |
|
|
Second excerpt from what I have written on comp.sys.apple2
==========
There are a few other calls that are not documented on the GS/OS
Device Driver Reference book (I have documented some of them above) :
- DEV_DISPATCHER ($01FC00)
- CACHE_INIT ($01FC0C)
- CACHE_SHUTDOWN ($01FC10)
- ALLOC_VCR ($01FC24)
- RELEASE_VCR ($01FC28)
- ALLOC_FCR ($01FC2C)
- RELEASE_FCR ($01FC30)
- GET_SYS_GBUF ($01FC3C)
- SYS_EXIT ($01FC40)
- SYS_DEATH ($01FC44)
- FIND_VCR ($01FC48)
- FIND_FCR ($01FC4C)
- CACHE_LOCK ($01FC54)
- RENAME_VCR ($01FC58)
- RENAME_FCR ($01FC5C)
- GET_VCR ($01FC60)
- GET_FCR ($01FC64)
- CVT_0TO1 ($01FC74)
- CVT_1TO0 ($01FC78)
- GET_BOOT_PFX ($01FCAC)
- SET_BOOT_PFX ($01FCB0)
There are other system service calls that remain "unexplained":
- $01FC7C
- $01FC80
- $01FC84
- $01FC8C
- $01FC94
- $01FC98
- $01FC9C
- $01FCA0
- $01FCB4
- $01FCB8
- $01FCC0
- $01FCC4
- $01FCC8
- $01FCCC
- $01FCD0
- $01FCD4
- $01FCDC
- $01FCE0
There are structures that have not been documented either:
- Volume Control Record
- File Control Record
The goal of the structures is to keep information on volumes and files
for the FSTs and GS/OS. The structure is not similar to the same ones
described on Inside Mac volume 4.
Any help would be appreciated. I have asked the same info to someone
who is/has been close to Apple. Wait & see...
==========
BTW, Peter Watson will try to scan the GS/OS docs he owns...
antoine |
|
Revenir en haut de page |
|
|
toinet
Inscrit le: 15 Juin 2007 Messages: 326 Localisation: Paris, France
|
Post� le: Jeu 27 Nov 2008, 20:57 Sujet du message: |
|
|
C'est marrant de relire cela...
Il y a quelques appels que je dois documenter dans mon futur best-seller GS/OS internals que j'enrichis au fur et � mesure de mes d�couvertes sur le syst�me Apple.
J'ai compris il y a deux jours ce qu'�tait un "virtual pointer" et l'ai racont� � JPL lors de notre d�jeuner de mercredi.
L'appel $01FC80 aussi, tiens, il faudrait que je le documente.
Bref, pas grand chose � part la page directe de GS/OS, il n'y a pas bcp de place libre
El toto |
|
Revenir en haut de page |
|
|
|