studyblog

Apr 15, 2005 01:28

"It started out with a kiss, how did it end up like this? It was only a kiss, it was only a kiss..."

blogging as a form of studying? O_o talk about desperate...

anyway, here goes.

FAT

  • first entry for media type - F0H: 1.44MB floppy, F8H: hard disk, F9H: 720KB floppy

  • second entry for FAT record bit size - FFFH: 12-bit, FFFFH: 16-bit

  • subsequent entries:

    • 000/0000H: unused cluster

    • nnn/nnnnH: relative addr. of next cluster in file

    • FF0-FF6/FFF0-FFF6H: reserved

    • FF7/FFF7H: bad track

    • FFF/FFFFH: last cluster of file



Directory Entires (32-byte)

  • 00-07H - file name

  • 08-0AH - extension

  • 0BH - file attributes

  • 0CH - 15H - reserved

  • 16-17H - Time modified (hhhhhmmmmmmsssss)

  • 18-19H - Date modified (yyyyyyymmmmddddd)

  • 1A-1BH - start cluster of file

  • 1C-1FH - file size



INT 21H Functions for File Operations
  • 3CH - create file
  • 3DH - open file
  • 3EH - close file
  • 3FH - read record
  • 40H - write record
  • 41H - move file pointer

Program Segment Prefix (000-0FFH) (shoot me)
  • 00-01H - INT 20H instruction
  • 02-03H - cluster addr. of last paragraph allocated to program
  • 0A-0DH - terminate address
  • 0E-11H - ctrl-break address
  • 12-15H - critical error address
  • 18-2BH - default file handle table
  • 2C-2DH - addr. of program environment
  • 32-33H - length of file handle table
  • 34-37H - far pointer to file handle table
  • 50-51H - INT 21H call
  • 5C-6BH - first command line arguement
  • 6C-7FH - second command line arguement
  • 80-FFH - disk transfer area buffer

- anything typed on the command line after the program name itself is stored in the disk transfer area. the first byte in the DTA specifies the length of the trailing input, and the actual input follows, including the space immediately following the file name.

btw, anyone heard the original version of mr. brightside? it's...subpar. at best.

education, programming geekery

Previous post Next post
Up