------------------------------------------------------------------------
| 310 | |
| 311 | // ------------------------------------------------------------------------ |
| 312 | bool ProDOS_BlockSetUsed ( uint8_t *pDiskBytes, ProDOS_VolumeHeader_t *pVolume, int block ) |
| 313 | { |
| 314 | if( !pVolume ) |
| 315 | { |
| 316 | return false; |
| 317 | } |
| 318 | |
| 319 | int bitmap = pVolume->meta.bitmap_block; |
| 320 | int offset = bitmap * PRODOS_BLOCK_SIZE; |
| 321 | |
| 322 | int byte = block / 8; |
| 323 | int bits = block % 8; |
| 324 | int mask = 0x80 >> bits; |
| 325 | |
| 326 | pDiskBytes[ offset + byte ] |= mask; |
| 327 | pDiskBytes[ offset + byte ] ^= mask; |
| 328 | |
| 329 | return true; |
| 330 | } |
| 331 | |
| 332 | // ------------------------------------------------------------------------ |
| 333 | inline int ProDOS_GetIndexBlock ( uint8_t *pDiskBytes, int offset, int index ) |
no outgoing calls
no test coverage detected