Master Boot Record.tpl
上传用户:psumnmypm
上传日期:2020-01-06
资源大小:1491k
文件大小:1k
源码类别:

磁盘编程

开发平台:

Windows_Unix

  1. template "Master Boot Record"
  2. // Template by Stefan Fleischmann
  3. // X-Ways Software Technology AG
  4. // To be applied to sector 0 of a physical hard disk.
  5. description "Contains partition table"
  6. applies_to disk
  7. sector-aligned
  8. requires 510 "55 AA"
  9. begin
  10. read-only hex 440 "Master bootstrap loader code"
  11. // Addition by Daniel B. Sedory:
  12. big-endian hexadecimal uint32 "Windows disk signature"
  13. move -4
  14. hexadecimal uint32 "Same reversed"
  15. // This SN is created by any NT-type OS (NT, 2000, XP,
  16. // 2003) and used in the Windows Registry.
  17. move 2
  18. numbering 1
  19. {
  20. section "Partition Table Entry #~"
  21. hex 1 "80 = active partition"
  22. uint8 "Start head"
  23. uint_flex "5,4,3,2,1,0" "Start sector"
  24. move -4
  25. uint_flex "7,6,15,14,13,12,11,10,9,8" "Start cylinder"
  26. move -2
  27. hex 1 "Partition type indicator (hex)"
  28. uint8 "End head"
  29. uint_flex "5,4,3,2,1,0" "End sector"
  30. move -4
  31. uint_flex "7,6,15,14,13,12,11,10,9,8" "End cylinder"
  32. move -2
  33. uint32 "Sectors preceding partition ~"
  34. uint32 "Sectors in partition ~"
  35. } [4]
  36. endsection
  37. read-only hex 2 "Signature (55 AA)"
  38. end