Outils pour utilisateurs

Outils du site


back2root:ibm-pc-ms-dos:hardware:informations:file_control_block

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
back2root:ibm-pc-ms-dos:hardware:informations:file_control_block [2023/01/16 17:54] – supprimée - modification externe (Unknown date) 127.0.0.1back2root:ibm-pc-ms-dos:hardware:informations:file_control_block [2023/01/16 17:54] (Version actuelle) – ↷ Page déplacée de back2root:ibm-pc-ms-dos:informations:file_control_block à back2root:ibm-pc-ms-dos:hardware:informations:file_control_block frater
Ligne 1: Ligne 1:
 +====== FCB - DOS File Control Block ======
  
 +===== Standard DOS File Control Block =====
 +
 +{{tablelayout?rowsHeaderSource=Auto}}
 +^  Offset  ^  Size     ^ Description                                                                                                                      ^
 +| 00        byte     | drive number (0 for default drive, 1=A:, 2=B:, ...)                                                                              |
 +| 01        8 bytes  | filename, left justified with trailing blanks                                                                                    |
 +| 09        3 bytes  | filename extension, left justified w/blanks                                                                                      |
 +| 0C        word     | current block number relative to beginning of the file, starting with zero                                                       |
 +| 0E        word     | logical record size in bytes                                                                                                     |
 +| 10        dword    | file size in bytes                                                                                                               |
 +| 14        word     | date the file was created or last updated                                                                                        |
 +| 16        word     | time of last write                                                                                                               |
 +| 18        8 bytes  | <color #22b14c>see [[#version|below]] for version specific information</color>                                                   |
 +| 1A        dword    | <color #22b14c>address of device header if character device</color>                                                              |
 +| 20        byte     | current relative record number within current BLOCK                                                                              |
 +| 21        dword    | relative record number relative to the beginning of the file, starting with zero; high bit omitted if record length is 64 bytes  |
 +
 +===== Extended DOS File Control Block =====
 +
 +{{tablelayout?rowsHeaderSource=Auto}}
 +^  Offset  ^  Size     ^ Description                                                                                                                      ^
 +|  00      |  byte     | if FF this is an extended FCB                                                                                                    |
 +|  01      |  5 bytes  | <color #22b14c>reserved</color>                                                                                                  |
 +|  06      |  byte     | file attribute if extended FCB                                                                                                   |
 +|  07      |  byte     | drive number (0 for default drive, 1=A:, 2=B:, ...)                                                                              |
 +|  08      |  8 bytes  | filename, left justified with trailing blanks                                                                                    |
 +|  10      |  3 bytes  | filename extension, left justified w/blanks                                                                                      |
 +|  13      |  word     | current block number relative to beginning of the file, starting with zero                                                       |
 +|  15      |  word     | logical record size in bytes                                                                                                     |
 +|  17      |  dword    | file size in bytes                                                                                                               |
 +|  1B      |  word     | date the file was created or last updated                                                                                        |
 +|  1D      |  word     | time of last write                                                                                                               |
 +|  1F      |  8 bytes  | <color #22b14c>see [[#version|below]] for version specific information</color>                                                   |
 +|  27      |  byte     | current relative record number within current BLOCK                                                                              |
 +|  28      |  dword    | relative record number relative to the beginning of the file, starting with zero; high bit omitted if record length is 64 bytes  |
 +
 +information in <color #22b14c>GREEN</color> are undocumented. 
 +
 +word offset 14:
 +
 +<code>
 +|F|E|D|C|B|A|9|8|7|6|5|4|3|2|1|0| 15,14 (Intel reverse order)
 + | | | | | | | | | | | `--------- day 1-31
 + | | | | | | | `---------------- month 1-12
 + `----------------------------- year + 1980
 +</code>
 +
 +word offset 16:
 +
 +<code>
 +|F|E|D|C|B|A|9|8|7|6|5|4|3|2|1|0| 17,16 (Intel reverse order)
 + | | | | | | | | | | | `---------- secs in 2 second increments
 + | | | | | `--------------------- minutes (0-59)
 + `------------------------------ hours (0-23)
 +</code>
 +
 +
 +{{anchor:version}}
 +===== DOS Version Specific parameters =====
 +
 +==== DOS 2.x Values for reserved fields at offsets 18h-1Ah ====
 +
 +^  Offset  ^  Size  ^ Description  ^
 +|  18  |  Byte  | see below  |
 +|  19  |  Word  | starting cluster number  |
 +
 +<code>
 +|7|6|5|4|3|2|1|0|
 + | | `------------- unknown
 + | `-------------- 1 = open
 + `--------------- 1 = logical device
 +</code>
 +
 +
 +==== DOS 3.x Values for reserved fields at offsets 18h-19h ====
 +
 +
 +^  Offset  ^  Size  ^ Description  ^
 +|  18  |  Byte  | System File Table (SFT) entry for file |
 +|  19  |  Byte  | attributes |
 +
 +<code>
 +|7|6|5|4|3|2|1|0|  attributes
 + | | `-------------- unknown
 + `--- share status  
 +</code>
 +
 +**Share Status**
 +|  00  | SHARE not loaded block device |
 +|  01  | SHARE not loaded characted device  |
 +|  10  | SHARE loaded, remote file|
 +|  11  | SHARE loaded local file|
 +
 +==== DOS 3.x with SHARE, local file reserved offsets 1Ah-1Eh ====
 +
 +^  Offset  ^  Size  ^ Description  ^
 +|  1A  |  word  |starting cluster number  |
 +|  1C  |  word  |offset within SHARE of sharing record|
 +|  1E  |  byte  |file attribute|
 +
 +
 +==== DOS 3.x with SHARE, remote file reserved offsets 1Ah-1Eh ====
 +
 +^  Offset  ^  Size  ^ Description  ^
 +|  1A  |  word  | sector number containing directory entry  |
 +|  1C  |  word  | last cluster accessed relative to beginning of file  |
 +|  1E  |  byte  | absolute cluster number of last cluster accessed  |
 +
 +==== DOS 3.x without SHARE reserved offsets 1Ah-1Fh Ø ====
 +{{tablelayout?rowsHeaderSource=Auto}}
 +^  Offset  ^  Size  ^ Description                                                ^
 +|  1A      |  byte  | ((device attribute word low byte) AND 0Ch) OR (open mode)  |
 +|  1B      |  word  | starting cluster number                                    |
 +|  1D      |  word  | sector number containing directory entry                   |
 +|  1F      |  byte  | number of directory entry within sector                    |
 +
 +
 +===== FCB related functions =====
 +
 +|[[back2root:ibm-pc-ms-dos:interrupts:int_21:int_21_0f|INT 21,0F]]   |Open file using FCB                          |
 +|[[back2root:ibm-pc-ms-dos:interrupts:int_21:int_21_10|INT 21,10]]  |Close file using FCB                         |
 +|[[back2root:ibm-pc-ms-dos:interrupts:int_21:int_21_11|INT 21,11]]  |Search for first entry using FCB             |
 +|[[back2root:ibm-pc-ms-dos:interrupts:int_21:int_21_12|INT 21,12]]  |Search for next entry using FCB              |
 +|[[back2root:ibm-pc-ms-dos:interrupts:int_21:int_21_13|INT 21,13]]  |Delete file using FCB                        |
 +|[[back2root:ibm-pc-ms-dos:interrupts:int_21:int_21_14|INT 21,14]]  |Sequential read using FCB                    |
 +|[[back2root:ibm-pc-ms-dos:interrupts:int_21:int_21_15|INT 21,15]]  |Sequential write using FCB                   |
 +|[[back2root:ibm-pc-ms-dos:interrupts:int_21:int_21_16|INT 21,16]]  |Create a file using FCB                      |
 +|[[back2root:ibm-pc-ms-dos:interrupts:int_21:int_21_17|INT 21,17]]  |Rename file using FCB                        |
 +|[[back2root:ibm-pc-ms-dos:interrupts:int_21:int_21_21|INT 21,21]]  |Random read using FCB                        |
 +|[[back2root:ibm-pc-ms-dos:interrupts:int_21:int_21_22|INT 21,22]]  |Random write using FCB                       |
 +|[[back2root:ibm-pc-ms-dos:interrupts:int_21:int_21_23|INT 21,23]]  |Get file size using FCB                      |
 +|[[back2root:ibm-pc-ms-dos:interrupts:int_21:int_21_24|INT 21,24]]  |Set relative record field for FCB            |
 +|[[back2root:ibm-pc-ms-dos:interrupts:int_21:int_21_27|INT 21,27]]  |Random block read using FCB                  |
 +|[[back2root:ibm-pc-ms-dos:interrupts:int_21:int_21_28|INT 21,28]]  |Random block write using FCB                 |
 +|[[back2root:ibm-pc-ms-dos:interrupts:int_21:int_21_29|INT 21,29]]  |Parse filename for FCB                       |