hitachi-sh 1.1 KB

123456789101112131415161718192021222324252627282930
  1. #------------------------------------------------------------------------------
  2. # $File: hitachi-sh,v 1.10 2020/12/12 20:01:47 christos Exp $
  3. # hitach-sh: file(1) magic for Hitachi Super-H
  4. #
  5. # Super-H COFF
  6. #
  7. # updated by Joerg Jenderek at Oct 2015
  8. # https://en.wikipedia.org/wiki/COFF
  9. # https://de.wikipedia.org/wiki/Common_Object_File_Format
  10. # http://www.delorie.com/djgpp/doc/coff/filhdr.html
  11. # below test line conflicts with 2nd NTFS filesystem sector
  12. # 2nd NTFS filesystem sector often starts with 0x05004e00 for unicode string 5 NTLDR
  13. # and Portable Gaming Notation Compressed format (*.WID http://pgn.freeservers.com/)
  14. 0 beshort 0x0500
  15. # test for unused flag bits (0x8000,0x0800,0x0400,0x0200,x0080) in f_flags
  16. >18 ubeshort&0x8E80 0
  17. # use big endian variant of subroutine to display name+variables+flags
  18. # for common object formatted files
  19. >>0 use \^display-coff
  20. !:strength -10
  21. 0 leshort 0x0550
  22. # test for unused flag bits in f_flags
  23. >18 uleshort&0x8E80 0
  24. # use little endian variant of subroutine to
  25. # display name+variables+flags for common object formatted files
  26. >>0 use display-coff
  27. !:strength -10