📄 fat32.lst
字号:
346 =2 // can be tranmitted by Bulk
347 =2
348 =2 UINT8 VendorSpecific[20];
349 =2 UINT8 InfoUnitSupport : 1;
350 =2 UINT8 QuickArbitSupport : 1;
351 =2 UINT8 Clocking : 2;
352 =2 UINT8 Reserved6 : 4;
353 =2
354 =2 UINT8 Reserved7 ;
355 =2 UINT16 VersionDescriptor[8] ;
356 =2
357 =2 UINT8 Reserved8[22];
358 =2 } STD_INQUIRYDATA, *pSTD_INQUIRYDATA;
359 =2 */
360 =2
361 =2 /*
362 =2 typedef struct _SERIALNUMBER_PAGE {
363 =2 UINT8 DeviceType : 5;
364 =2 UINT8 DeviceTypeQualifier : 3;
365 =2
366 =2 UINT8 PageCode ;
367 =2 UINT8 Reserved0 ;
368 =2
369 =2 UINT8 PageLength ;
370 =2 UINT8 SerialNumber[24] ;
371 =2
372 =2 }VPD_SERIAL_PAGE,*pVPD_SERIAL_PAGE;
373 =2 */
374 =2 /*
375 =2 #define ASCII_ID_STRING 32
376 =2 typedef struct _ID_DESCRIPTOR {
377 =2 UINT8 CodeSet : 4;
378 =2 UINT8 Reserved0 : 4;
379 =2
380 =2 UINT8 IDType : 4;
381 =2 UINT8 Association : 2;
382 =2 UINT8 Reserved1 : 2;
383 =2
384 =2 UINT8 Reserved2;
385 =2
386 =2 UINT8 IDLength ;
387 =2 UINT8 AsciiID[ASCII_ID_STRING];
C51 COMPILER V8.02 FAT32 09/19/2006 15:01:23 PAGE 16
388 =2 } ASCII_ID_DESCRIPTOR,*pASCII_ID_DESCRIPTOR;
389 =2 */
390 =2 /*
391 =2 typedef struct _DEVICE_ID_PAGE
392 =2 {
393 =2 UINT8 DeviceType : 5;
394 =2 UINT8 DeviceTypeQualifier : 3;
395 =2
396 =2 UINT8 PageCode ;
397 =2 UINT8 Reserved0 ;
398 =2
399 =2 UINT8 PageLength ;
400 =2
401 =2 ASCII_ID_DESCRIPTOR AsciiIdDescriptor[1];
402 =2 } VPD_DEVICE_ID_PAGE, *pVPD_DEVICE_ID_PAGE;
403 =2 */
404 =2 /*
405 =2 // Mode Select
406 =2 */
407 =2 typedef struct _MODE_SELECT_SPC {
408 =2 UINT8 OperationCode; // 15H
409 =2 UINT8 SavePage : 1 ;
410 =2 UINT8 Reseved0 : 3 ;
411 =2 UINT8 PageFormat : 1 ;
412 =2 UINT8 Reserved1 : 3 ;
413 =2 UINT8 Reserved2[2];
414 =2 UINT8 ParameterLen;
415 =2 UINT8 Control;
416 =2 } MODE_SELECT_SPC, *pMODE_SELECT_SPC;
417 =2
418 =2 typedef struct _MBR_BLOCK {
419 =2 UINT8 Res[454];
420 =2 unsigned long StartSector;
421 =2 unsigned long TotalSector;
422 =2 UINT8 Res1[50];
423 =2 } MBR_BLOCK,*pMBR_BLOCK;
424 =2
425 =2 typedef struct _BPB_BLOCK {
426 =2 UINT8 BS_jmpBoo[3];
427 =2 UINT8 BS_OEMName[8];
428 =2 UINT16 BPB_BytesPerSec;
429 =2 UINT8 BPB_SecPerClus;
430 =2 UINT16 BPB_RsvdSecCnt;
431 =2 UINT8 BPB_NumFATs;
432 =2 UINT16 BPB_RootEntCnt;
433 =2 UINT16 BPB_TotSec16;
434 =2 UINT8 BPB_Media;
435 =2 UINT16 BPB_FATSz16;
436 =2 UINT16 BPB_SecPerTrk;
437 =2 UINT16 BPB_NumHeads;
438 =2 unsigned long BPB_HiddSec;
439 =2 unsigned long BPB_TotSec32;
440 =2 UINT8 BS_DrvNum;
441 =2 UINT8 BS_Reserved1;
442 =2 UINT8 BS_BootSig;
443 =2 UINT8 BS_VolID[4];
444 =2 UINT8 BS_VolLab[11];
445 =2 UINT8 BS_FilSysType[8];
446 =2 UINT8 ExecutableCode[448];
447 =2 UINT8 Marker[2];
448 =2 } BPB_BLOCK,*pBPB_BLOCK;
449 =2
C51 COMPILER V8.02 FAT32 09/19/2006 15:01:23 PAGE 17
450 =2 typedef struct _BPB_BLOCK32 {
451 =2 UINT8 BS_jmpBoo[3];
452 =2 UINT8 BS_OEMName[8];
453 =2 UINT16 BPB_BytesPerSec;
454 =2 UINT8 BPB_SecPerClus;
455 =2 UINT16 BPB_RsvdSecCnt;
456 =2 UINT8 BPB_NumFATs;
457 =2 UINT16 BPB_RootEntCnt;
458 =2 UINT16 BPB_TotSec16;
459 =2 UINT8 BPB_Media;
460 =2 UINT16 BPB_FATSz16;
461 =2 UINT16 BPB_SecPerTrk;
462 =2 UINT16 BPB_NumHeads;
463 =2 unsigned long BPB_HiddSec;
464 =2 unsigned long BPB_TotSec32;
465 =2 UINT32 BPB_FATSz32;
466 =2 UINT16 BPB_ExtFlags;
467 =2 UINT16 BPB_FSVer;
468 =2 UINT32 BPB_RootClus;
469 =2 UINT16 BPB_FSInfo;
470 =2 UINT16 BPB_BkBootSec;
471 =2 UINT8 BPB_Reserved[12];
472 =2 UINT8 BS_DrvNum;
473 =2 UINT8 BS_Reserved1;
474 =2 UINT8 BS_BootSig;
475 =2 UINT32 BS_VolID;
476 =2 UINT8 BS_VolLab[11];
477 =2 UINT8 BS_FilSysType[8];
478 =2
479 =2 } BPB_BLOCK32,*pBPB_BLOCK32;
480 =2
481 =2 typedef struct _SYS_INFO_BLOCK{
482 =2 unsigned long StartSector;
483 =2 unsigned long TotalSector;
484 =2 //UINT8 BS_jmpBoo[3];
485 =2 //UINT8 BS_OEMName[8];
486 =2 UINT16 BPB_BytesPerSec;
487 =2 UINT8 BPB_SecPerClus;
488 =2 //UINT8 BPB_RsvdSecCn[2];
489 =2 UINT8 BPB_NumFATs;
490 =2 UINT16 BPB_RootEntCnt;
491 =2 UINT16 BPB_TotSec16;
492 =2 UINT8 BPB_Media;
493 =2 UINT16 BPB_FATSz16;
494 =2 UINT32 BPB_FATSz32;
495 =2 UINT16 BPB_SecPerTrk;
496 =2 UINT16 BPB_NumHeads;
497 =2 unsigned long BPB_HiddSec;
498 =2 unsigned long BPB_TotSec32;
499 =2 UINT8 BS_DrvNum;
500 =2 //UINT8 BS_Reserved1;
501 =2 UINT8 BS_BootSig;
502 =2 UINT8 BS_VolID[4];
503 =2 UINT8 BS_VolLab[11];
504 =2 UINT8 BS_FilSysType[8];
505 =2 //UINT8 ExecutableCode[448];
506 =2 //UINT8 Marker[2];
507 =2 ///////////////////////////////
508 =2 unsigned long FatStartSector;
509 =2 unsigned long RootStartSector;
510 =2 //unsigned long DataStartSector;
511 =2 unsigned long FirstDataSector;
C51 COMPILER V8.02 FAT32 09/19/2006 15:01:23 PAGE 18
512 =2 //unsigned long FirstSectorofCluster;
513 =2 unsigned long TotCluster;
514 =2 unsigned char bFatType;
515 =2 } SYS_INFO_BLOCK,*pSYS_INFO_BLOCK;
516 =2
517 =2 typedef struct _FILE_INFO{
518 =2 unsigned char bFileOpen;
519 =2 unsigned int StartCluster; // current cluster
520 =2 unsigned long LengthInByte;
521 =2 unsigned int ClusterPointer; // next cluster
522 =2 unsigned long SectorPointer;
523 =2 unsigned int OffsetofSector;
524 =2 unsigned char SectorofCluster;// 0~(sector/cluster-1)
525 =2 unsigned long pointer; // current sector(DSN)
526 =2 // unsigned int FatSectorPointer; // FSN
527 =2 } FILE_INFO, *pFILE_INFO;
528 =2
529 =2 typedef struct _DIR_INFO{
530 =2 unsigned char name[8]; //0
531 =2 unsigned char extension[3]; //9
532 =2 unsigned char attribute; //11
533 =2 unsigned char Reserved[10]; //21
534 =2 unsigned int lastUpdateDate; //23
535 =2 unsigned int lastUpdateTime; //25
536 =2 unsigned int startCluster; //27
537 =2 unsigned long length; //28
538 =2 } DIR_INFO, *pDIR_INFO;
539 =2 /*
540 =2 // Mode Sense
541 =2 */
542 =2 typedef struct _MODE_SENSE_SPC {
543 =2 UINT8 OperationCode; // 1AH
544 =2 UINT8 Reseved0 : 3 ;
545 =2 UINT8 DisableBlockDescriptor : 1 ;
546 =2 UINT8 Reserved0 : 4 ;
547 =2 UINT8 PageCode:6 ;
548 =2 UINT8 PageControl : 2 ;
549 =2 UINT8 Reserved1;
550 =2 UINT8 ParameterLen;
551 =2 UINT8 Control;
552 =2 } MODE_SENSE_SPC, *pMODE_SENSE_SPC;
553 =2
554 =2 /*
555 =2 typedef struct _MODE_PARAMETER_HEAD {
556 =2 UINT8 DataLen;
557 =2 UINT8 MediumType;
558 =2 UINT8 DeviceParameter;
559 =2 UINT8 BlockDescriptorLen;
560 =2 } MODE_PARAMETER_HEAD, *pMODE_PARAMETER_HEAD;
561 =2 */
562 =2 /*
563 =2 // Define Device Capabilities page.
564 =2 */
565 =2 /*
566 =2 typedef struct _MODE_RBC_DEVICE_PARAMETERS_PAGE {
567 =2 UINT8 PageCode : 6;
568 =2 UINT8 Reserved : 1;
569 =2 UINT8 PageSavable : 1;
570 =2 UINT8 PageLength;
571 =2 UINT8 WriteCacheDisable : 1;
572 =2 UINT8 Reserved1 : 7;
573 =2 UINT8 LogicalBlockSize[2];
C51 COMPILER V8.02 FAT32 09/19/2006 15:01:23 PAGE 19
574 =2 UINT8 NumberOfLogicalBlocks[5];
575 =2 UINT8 PowerPerformance;
576 =2 UINT8 Lockable : 1;
577 =2 UINT8 Formattable : 1;
578 =2 UINT8 Writable : 1;
579 =2 UINT8 Readable : 1;
580 =2 UINT8 Reserved2 : 4;
581 =2 UINT8 Reserved3;
582 =2 }MODE_RBC_DEVICE_PARAMETERS_PAGE, *pMODE_RBC_DEVICE_PARAMETERS_PAGE;
583 =2 */
584 =2 /*
585 =2 // prevent/allow medium removal
586 =2 */
587 =2 typedef struct _MEDIA_REMOVAL_SPC {
588 =2 UINT8 OperationCode; // 1EH
589 =2 UINT8 Reserved0[3];
590 =2 UINT8 Prevent;
591 =2 //UINT8 Reserved1:6 ;
592 =2 //UINT8 Control;
593 =2 } MEDIA_REMOVAL_SPC, *pMEDIA_REMOVAL_SPC;
594 =2
595 =2 /*
596 =2 // Request Sense
597 =2 */
598 =2 typedef struct _REQUEST_SENSE_SPC {
599 =2 UINT8 OperationCode; // 03H
600 =2 UINT8 Reserved[3];
601 =2 UINT8 AllocationLen;
602 =2 UINT8 Control;
603 =2 } REQUEST_SENSE_SPC, *pREQUEST_SENSE_SPC;
604 =2 /*
605 =2 typedef struct _REQUEST_SENSE_DATA {
606 =2 UINT8 ResponseCode : 7;
607 =2 UINT8 Valid : 1;
608 =2
609 =2 UINT8 SegmentNum;
610 =2
611 =2 UINT8 SenseKey : 4;
612 =2 UINT8 Reserved0 : 1;
613 =2 UINT8 WrongLenIndicator : 1;
614 =2 UINT8 EndofMedium : 1;
615 =2 UINT8 FileMark : 1;
616 =2
617 =2 UINT8 Info_0;
618 =2 UINT8 Info_1;
619 =2 UINT8 Info_2;
620 =2 UINT8 Info_3;
621 =2
622 =2 UINT8 AdditionalSenseLen;
623 =2
624 =2 UINT8 CommandSpecInfo_0;
625 =2 UINT8 CommandSpecInfo_1;
626 =2 UINT8 CommandSpecInfo_2;
627 =2 UINT8 CommandSpecInfo_3;
628 =2
629 =2 UINT8 ASC;
630 =2 UINT8 ASCQ;
631 =2 UINT8 FieldReplacableUnitCode;
632 =2 UINT8 SenseKeySpec_0 : 7;
633 =2 UINT8 SenseKeySpecValid : 1;
634 =2 UINT8 SenseKeySpec_1;
635 =2 UINT8 SenseKeySpec_2;
C51 COMPILER V8.02 FAT32 09/19/2006 15:01:23 PAGE 20
636 =2
637 =2 } REQUEST_SENSE_DATA, *pREQUEST_SENSE_DATA;
638 =2 */
639 =2 /*
640 =2 // Test Unit Ready
641 =2 */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -