|
2 / 2 / 2
Регистрация: 06.01.2010
Сообщений: 44
|
||||||
Дисковая память: данные читаются с помощью int 25h, а нужно что бы считывались по FCB11.05.2010, 11:18. Показов 2269. Ответов 4
Метки нет (Все метки)
Доброе время суток
Программа принимает с клавиатуры имя файла или номер логического сектора. После этого данные считывают-ся по 128 байт из файла или с дискеты, начиная с заданного логического сектора, и отображается на экран в виде двух таблиц. В этих таблицах данные выводятся в двух форма-тах, например, в первой таблице – в шестнадцатиричном, а во второй – в кодах ASCII. После каждого нажатия клавиши <ENTER> считываются и отображаются на экране следую-щие 128 байт.После запуска программы вводится имя файла. Формат вывода в таблице 1 - двоичный Формат вывода в таблице 2 - шестнадцатиричный Вопрос в том что данные читаются с помощью int 25h ,а нужно что бы считывался по FCB.![]()
2
|
||||||
| 11.05.2010, 11:18 | |
|
Ответы с готовыми решениями:
4
Нужно чтобы данные считывались из файла Описание Int 25h и Int 26h Ассемблер. Дисковая память |
|
69 / 74 / 0
Регистрация: 15.12.2008
Сообщений: 302
|
|
| 11.05.2010, 15:29 | |
|
что-то не увидел в программе работу c секторами, все работа с файлом ведется через дескриптор,через int 21h
0
|
|
|
2 / 2 / 2
Регистрация: 06.01.2010
Сообщений: 44
|
|
| 12.05.2010, 03:24 [ТС] | |
|
точно не туда посмотрел ...=(
файл читается по фай-ловому номеру. а как можно по FCB сделать подскажите
0
|
|
|
Фрилансер
3709 / 2083 / 567
Регистрация: 31.05.2009
Сообщений: 6,683
|
|
| 12.05.2010, 06:48 | |
|
Считывание по FCB - старье, было оставлено для совместимости с предыдущими версиями. Нафиг надо?
Вот из Ральфа Брауна про FCB
--------D-210F-------------------------------
INT 21 - DOS 1+ - OPEN FILE USING FCB AH = 0Fh DS:DX -> unopened File Control Block (see #01322,#01323) Return: AL = status 00h successful FFh file not found or access denied Notes: (DOS 3.1+) file opened for read/write in compatibility mode an unopened FCB has the drive, filename, and extension fields filled in and all other bytes cleared not supported by MS Windows 3.0 DOSX.EXE DOS extender DR DOS checks password attached with AX=4303h (FAT32 drive) this function will only succeed for creating a volume label; FAT32 does not support FCBs for file I/O BUG: APPEND for DOS 3.3+ corrupts DX if the file is not found SeeAlso: AH=10h,AH=16h,AH=3Dh,AX=4303h Format of File Control Block: Offset Size Description (Table 01322) 00h BYTE drive number (0 = default, 1 = A, etc) FFh is not allowed (signals extended FCB, see #01323) 01h 8 BYTEs blank-padded file name 09h 3 BYTEs blank-padded file extension 0Ch WORD current block number 0Eh WORD logical record size 10h DWORD file size 14h WORD date of last write (see #01643 at AX=5700h) 16h WORD time of last write (see #01642 at AX=5700h) (DOS 1.1+) 18h 8 BYTEs reserved (see #01324,#01325,#01326,#01327,#01328) 20h BYTE record within current block 21h DWORD random access record number (if record size is > 64 bytes, high byte is omitted) SeeAlso: #01323 Format of Extended File Control Block (XFCB): Offset Size Description (Table 01323) 00h BYTE FFh signature for extended FCB 01h 5 BYTEs reserved 06h BYTE file attribute if extended FCB 07h 36 BYTEs standard FCB (all offsets are shifted by seven bytes) SeeAlso: #01223 Format of FCB reserved field for DOS 1.0: Offset Size Description (Table 01324) 16h WORD location in directory (if high byte = FFh, low byte is device ID) 18h WORD number of first cluster in file 1Ah WORD current absolute cluster number on disk 1Ch WORD current relative cluster number within file (0 = first cluster of file, 1 = second cluster, etc.) 1Eh BYTE dirty flag (00h = not dirty) 1Fh BYTE unused Format of FCB reserved field for DOS 1.10-1.25: Offset Size Description (Table 01325) 18h BYTE bit 7: set if logical device bit 6: not dirty bits 5-0: disk number or logical device ID 19h WORD starting cluster number on disk 1Bh WORD current absolute cluster number on disk 1Dh WORD current relative cluster number within file 1Fh BYTE unused Format of FCB reserved field for DOS 2.x: Offset Size Description (Table 01326) 18h BYTE bit 7: set if logical device bit 6: set if open??? bits 5-0: ??? 19h WORD starting cluster number on disk 1Bh WORD ??? 1Dh BYTE ??? 1Eh BYTE ??? 1Fh BYTE ??? Format of FCB reserved field for DOS 3.x: Offset Size Description (Table 01327) 18h BYTE number of system file table entry for file 19h BYTE attributes bits 7,6: 00 = SHARE.EXE not loaded, disk file 01 = SHARE.EXE not loaded, character device 10 = SHARE.EXE loaded, remote file 11 = SHARE.EXE loaded, local file or device bits 5-0: low six bits of device attribute word ---SHARE.EXE loaded, local file--- 1Ah WORD starting cluster of file on disk 1Ch WORD (DOS 3.x) offset within SHARE of sharing record (see #01614 at AH=52h) 1Eh BYTE file attribute 1Fh BYTE ??? ---SHARE.EXE loaded, remote file--- 1Ah WORD number of sector containing directory entry (see #01329) 1Ch WORD relative cluster within file of last cluster accessed 1Eh BYTE absolute cluster number of last cluster accessed 1Fh BYTE ??? ---SHARE.EXE not loaded--- 1Ah BYTE (low byte of device attribute word AND 0Ch) OR open mode 1Bh WORD starting cluster of file 1Dh WORD number of sector containing directory entry (see #01329) 1Fh BYTE number of directory entry within sector Note: if FCB opened on character device, DWORD at 1Ah is set to the address of the device driver header, then the BYTE at 1Ah is overwritten. SeeAlso: #01623 Format of FCB reserved field for DOS 5.0: Offset Size Description (Table 01328) 18h BYTE number of system file table entry for file 19h BYTE attributes bits 7,6: 00 = SHARE.EXE not loaded, disk file 01 = SHARE.EXE not loaded, character device 10 = SHARE.EXE loaded, remote file 11 = SHARE.EXE loaded, local file or device bits 5-0: low six bits of device attribute word ---SHARE.EXE loaded, local file--- 1Ah WORD starting cluster of file on disk 1Ch WORD unique sequence number of sharing record 1Eh BYTE file attributes 1Fh BYTE unused??? ---SHARE.EXE loaded, remote file--- 1Ah WORD network handle 1Ch DWORD network ID ---SHARE not loaded, local device--- 1Ah DWORD pointer to device driver header (see #01623) 1Eh 2 BYTEs unused??? ---SHARE not loaded, local file--- 1Ah BYTE extra info bit 7: read-only attribute from SFT bit 6: archive attribute from SFT bits 5-0: high bits of sector number 1Bh WORD starting cluster of file 1Dh WORD low word of sector number containing directory entry (see #01329) 1Fh BYTE number of directory entry within sector --------D-2110------------------------------- INT 21 - DOS 1+ - CLOSE FILE USING FCB AH = 10h DS:DX -> File Control Block (see #01322) Return: AL = status 00h successful FFh failed Notes: a successful close forces all disk buffers used by the file to be written and the directory entry to be updated not supported by MS Windows 3.0 DOSX.EXE DOS extender SeeAlso: AH=0Fh,AH=16h,AH=3Eh --------D-2111------------------------------- INT 21 - DOS 1+ - FIND FIRST MATCHING FILE USING FCB AH = 11h DS:DX -> unopened FCB (see #01322), may contain '?' wildcards Return: AL = status 00h successful [DTA] unopened FCB for first matching file FFh no matching filename, or bad FCB Notes: the type of the returned FCB depends on whether the input FCB was a normal or an extended FCB the data returned in the DTA (disk transfer area) is actually the drive number (or extended FCB header and drive number) followed by the file's directory entry (see #01329); this format happens to be compatible with an unopened FCB for extended FCBs with search attribute 08h, the volume label (if any) will be returned even if the current directory is not the root dir. DOS 3.0+ also allows the '*' wildcard the search FCB at DS:DX must not be modified if AH=12h will be used to continue searching; DOS 3.3 has set the following parts of the FCB: 0Ch BYTE ??? 0Dh WORD directory entry number of matching file 0Fh WORD cluster number of current directory 11h 4 BYTEs ??? 15h BYTE drive number (1=A:) this function is used by many copy protection schemes to obtain the starting cluster of a file BUG: under Windows95, if a .EXE program ("MZ" header) rather than a true .COM calls this function from a DOS box, the ten bytes of the directory entry from 0Ch to 15h may be filled with zeros rather than the additional file times SeeAlso: AH=12h,AH=1Ah,AH=4Eh,INT 2F/AX=111Bh Format of DOS directory entry: Offset Size Description (Table 01329) 00h 8 BYTEs blank-padded filename first character is set to E5h for deleted files (05h for pending delete files under Novell DOS / OpenDOS) 08h 3 BYTEs blank-padded file extension 0Bh BYTE attributes 0Ch 10 BYTEs (MS-DOS 1.0-6.22) reserved (DR DOS) used to store file password / owner (see #01331) (see also INT 21/AX=4302h) (Novell DOS 7) DELWATCH data (see #01331) (MS-DOS 7/Windows95) additional file times (see #01330) 16h WORD time of creation or last update (see #01642 at AX=5700h) 18h WORD date of creation or last update (see #01643 at AX=5700h) 1Ah WORD starting cluster number (see also AX=440Dh/CX=0871h) (not set for MSDOS 7.1 and FAT32-capable versions of Windows95) 1Ch DWORD file size SeeAlso: #01332,#02604,#02605 Format of MS-DOS 7/Windows95 additional file times: Offset Size Description (Table 01330) 00h BYTE reserved 01h BYTE 10-millisecond units past creation time below 02h WORD file creation time 04h WORD file creation date 06h WORD last-access date 08h WORD (FAT32) high word of starting cluster number Note: this data is stored beginning at offset 0Ch in a standard directory entry SeeAlso: #01329 Format of DR DOS 6/Novell DOS 7 additional file information: Offset Size Description (Table 01331) 0Ch BYTE reserved (00h) 0Dh BYTE first character of original filename for deleted file 0Eh WORD encrypted file/directory password 10h WORD reserved (00h) (Novell DOS 7 DELWATCH) original file time cleared when file is undeleted or purged 12h WORD (DR DOS 6) file owner ID (Novell DOS 7 DELWATCH) original file date cleared when file is undeleted or purged 14h WORD single/multiuser file/directory access rights (see AX=4302h) ---deleted files--- 16h WORD (Novell DOS 7 DELWATCH) time of deletion 18h WORD (Novell DOS 7 DELWATCH) date of deletion Note: offsets are within the full directory entry SeeAlso: #01329 Format of MS-DOS 7/Windows95 long-filename directory entry: Offset Size Description (Table 01332) 00h BYTE LFN record sequence and flags bits 5-0: sequence number bit 6: set if last long-filename record for file bit 7: set if file deleted 01h 10 BYTEs long filename, first part 0Bh BYTE 0Fh (otherwise impossible file attribute, used as signature) 0Ch BYTE reserved??? (00h) 0Dh BYTE checksum for short filename 0Eh 12 BYTEs long filename, second part 1Ah WORD first cluster number (always 0000h for LFN records) 1Ch 4 BYTEs long filename, third part Notes: long-filename entries are always stored in the directory just prior to the short-name entry for a file multiple LFN records are used if the long filename does not fit into a single record the short-filename checksum byte is computed by adding up the eleven bytes of the short filename, rotating the intermediate sum right one bit before adding the next character the long filename is encoded as 16-bit Unicode characters; for most filenames, this appears in the directory as the ASCII character followed by 00h SeeAlso: #01329,INT 21/AX=5704h,INT 21/AH=71h --------D-2112------------------------------- INT 21 - DOS 1+ - FIND NEXT MATCHING FILE USING FCB AH = 12h DS:DX -> unopened FCB (see #01322) Return: AL = status 00h successful Disk Transfer Area filled with unopened FCB FFh no more matching filenames Note: (see AH=11h) assumes that successful FindFirst executed on search FCB before call SeeAlso: AH=1Ah,AH=4Fh,INT 2F/AX=111Ch --------D-2113------------------------------- INT 21 - DOS 1+ - DELETE FILE USING FCB AH = 13h DS:DX -> unopened FCB (see #01322), filename filled with template for deletion ('?' wildcards allowed) Return: AL = status 00h one or more files successfully deleted FFh no matching files or all were read-only or locked Notes: DOS 1.25+ deletes everything in the current directory (including subdirectories) and sets the first byte of the name to 00h (entry never used) instead of E5h if called on an extended FCB with filename '???????????' and bits 0-4 of the attribute set (bits 1 and 2 for DOS 1.x). This may have originally been an optimization to minimize directory searching after a mass deletion (DOS 1.25+ stop the directory search upon encountering a never-used entry), but can corrupt the filesystem under DOS 2+ because subdirectories are removed without deleting the files they contain. currently-open files should not be deleted MS-DOS allows deletion of read-only files with an extended FCB, whereas Novell NetWare, DR DOS 6, and Novell DOS 7/OpenDOS 7.01 do not this function generates a trap "D" under OS/2 v4.x (Warp4) when called on an HPFS partition with a wildcard in the filename; it operates correctly on FAT partitions and when called without wildcards SeeAlso: AH=41h,INT 2F/AX=1113h --------D-2114------------------------------- INT 21 - DOS 1+ - SEQUENTIAL READ FROM FCB FILE AH = 14h DS:DX -> opened FCB (see #01322) Return: AL = status 00h successful 01h end of file (no data) 02h segment wrap in DTA 03h end of file, partial record read Disk Tranfer Area filled with record read from file Notes: reads a record of the size specified in the FCB beginning at the current file position, then updates the current block and current record fields in the FCB if a partial record was read, it is zero-padded to the full size not supported by MS Windows 3.0 DOSX.EXE DOS extender SeeAlso: AH=0Fh,AH=15h,AH=1Ah,AH=3Fh"DOS",INT 2F/AX=1108h --------D-2115------------------------------- INT 21 - DOS 1+ - SEQUENTIAL WRITE TO FCB FILE AH = 15h DS:DX -> opened FCB (see #01322) Disk Tranfer Area contains record to be written Return: AL = status 00h successful 01h disk full 02h segment wrap in DTA Notes: writes a record of the size specified in the FCB beginning at the current file position, then updates the current block and current record fields in the FCB if less than a full sector is written, the data is placed in a DOS buffer to be written out at a later time not supported by MS Windows 3.0 DOSX.EXE DOS extender SeeAlso: AH=0Fh,AH=14h,AH=1Ah,AH=40h,INT 2F/AX=1109h --------D-2116------------------------------- INT 21 - DOS 1+ - CREATE OR TRUNCATE FILE USING FCB AH = 16h DS:DX -> unopened FCB (see #01322), wildcards not allowed Return: AL = status 00h successful FFh directory full or file exists and is read-only or locked Notes: if file already exists, it is truncated to zero length if an extended FCB is used, the file is given the attribute in the FCB; this is how to create a volume label in the disk's root dir not supported by MS Windows 3.0 DOSX.EXE DOS extender (FAT32 drive) this function will only succeed for creating a volume label; FAT32 does not support FCBs for file I/O SeeAlso: AH=0Fh,AH=10h,AH=3Ch --------D-2117------------------------------- INT 21 - DOS 1+ - RENAME FILE USING FCB AH = 17h DS:DX -> modified FCB (see also #01322) the old filename ('?' wildcards OK) is in the standard location while the new filename ('?' wildcards OK, no drive) is stored in the 11 bytes beginning at offset 11h Return: AL = status 00h successfully renamed FFh no matching files,file is read-only, or new name already exists Notes: subdirectories may be renamed using an extended FCB with the appropriate attribute, as may volume labels DR DOS checks password attached with AX=4303h before permitting rename SeeAlso: AH=0Fh,AH=13h,AX=4303h,AH=56h,INT 2F/AX=1111h
0
|
|
|
2 / 2 / 2
Регистрация: 06.01.2010
Сообщений: 44
|
|
| 12.05.2010, 11:31 [ТС] | |
|
ммм... полсностью согласен ... но в лабораторной работе... вариант так выпал что нужно FCB
вот и мучаюсь ...
0
|
|
| 12.05.2010, 11:31 | |
|
Помогаю со студенческими работами здесь
5
Что такое FCB?
Как сделать, чтобы данные считывались из файла, а не вводились Из массива unsigned int читаются переменные гигантских размеров Как сделать чтобы данные считывались, но новая строка не начиналась Искать еще темы с ответами Или воспользуйтесь поиском по форуму: |
|
Новые блоги и статьи
|
|||
|
SDL3 для Web (WebAssembly): Реализация движения на Box2D v3 - трение и коллизии с повёрнутыми стенами
8Observer8 20.02.2026
Содержание блога
Box2D позволяет легко создать главного героя, который не проходит сквозь стены и перемещается с заданным трением о препятствия, которые можно располагать под углом, как верхнее. . .
|
Конвертировать закладки radiotray-ng в m3u-плейлист
damix 19.02.2026
Это можно сделать скриптом для PowerShell. Использование
. \СonvertRadiotrayToM3U. ps1 <path_to_bookmarks. json>
Рядом с файлом bookmarks. json появится файл bookmarks. m3u с результатом.
# Check if. . .
|
Семь CDC на одном интерфейсе: 5 U[S]ARTов, 1 CAN и 1 SSI
Eddy_Em 18.02.2026
Постепенно допиливаю свою "многоинтерфейсную плату". Выглядит вот так:
https:/ / www. cyberforum. ru/ blog_attachment. php?attachmentid=11617&stc=1&d=1771445347
Основана на STM32F303RBT6.
На борту пять. . .
|
Камера Toupcam IUA500KMA
Eddy_Em 12.02.2026
Т. к. у всяких "хикроботов" слишком уж мелкий пиксель, для подсмотра в ESPriF они вообще плохо годятся: уже 14 величину можно рассмотреть еле-еле лишь на экспозициях под 3 секунды (а то и больше),. . .
|
|
И ясному Солнцу
zbw 12.02.2026
И ясному Солнцу,
и светлой Луне.
В мире
покоя нет
и люди
не могут жить в тишине.
А жить им немного лет.
|
«Знание-Сила»
zbw 12.02.2026
«Знание-Сила»
«Время-Деньги»
«Деньги -Пуля»
|
SDL3 для Web (WebAssembly): Подключение Box2D v3, физика и отрисовка коллайдеров
8Observer8 12.02.2026
Содержание блога
Box2D - это библиотека для 2D физики для анимаций и игр. С её помощью можно определять были ли коллизии между конкретными объектами и вызывать обработчики событий столкновения. . . .
|
SDL3 для Web (WebAssembly): Загрузка PNG с прозрачным фоном с помощью SDL_LoadPNG (без SDL3_image)
8Observer8 11.02.2026
Содержание блога
Библиотека SDL3 содержит встроенные инструменты для базовой работы с изображениями - без использования библиотеки SDL3_image. Пошагово создадим проект для загрузки изображения. . .
|