| 275 | } |
| 276 | |
| 277 | uint16_t allocateSector() |
| 278 | { |
| 279 | for (int sector = DATA_START_SECTOR; sector != SECTOR_COUNT; sector++) |
| 280 | { |
| 281 | if (allocationTable[sector] == 0) |
| 282 | { |
| 283 | allocationTable[sector] = 0xffff; |
| 284 | return sector; |
| 285 | } |
| 286 | } |
| 287 | error("unable to allocate sector --- disk full"); |
| 288 | return 0; |
| 289 | } |
| 290 | |
| 291 | void checkConsistency() |
| 292 | { |