Download presentation
Presentation is loading. Please wait.
Published byἈκελδαμά Κουντουριώτης Modified over 6 years ago
1
CS-401 Computer Architecture & Assembly Language Programming
Lecture-36 Secondary Storage
2
Lets revise the last lecture
3
Logical view of secondary storage
4
int 0x21 DOS Services Create Truncate File AH = 0x3C
CX = file attribute DS:DX = ASCII file name Return On success CF = clear AX = file handle On error CF = set AX = error code
5
int 0x21 DOS Services Open Existing File AH = 0x3D
AL = access and sharing mode DS:DX = ASCII file name CL = attribute mask Return On success CF = clear AX = file handle On error CF = set AX = error code
6
int 0x21 DOS Services Close File AH = 0x3D BC = file handle Return
On success CF = clear AX = undefined On error CF = set AX = error code
7
int 0x21 DOS Services Read File AH = 0x3F BX = file handle
CX = number of bytes to read DS:DX = buffer Return On success CF = clear AX = number of bytes actually read On error CF = set AX = error code
8
int 0x21 DOS Services Write File AH = 0x40 BX = file handle
CX = number of bytes to write DS:DX = buffer Return On success CF = clear AX = number of bytes actually written On error CF = set AX = error code
9
int 0x21 DOS Services Delete File AH = 0x41 DS:DX = ASCII file name
CL = attribute mask Return On success CF = clear AX = undefined On error CF = set AX = error code
10
Seek –Set Current File Position
int 0x21 DOS Services Seek –Set Current File Position AH = 0x42 AL = origin of move (00=start,01=current,02=end) BX = file handle DS:DX = offset from origin Return On success CF = clear DX:AX = new file position On error CF = set AX = error code
11
int 0x21 DOS Services Get File Attributes AH = 0x43 AL = 0x00
DS:DX = ASCII file name Return On success CF = clear CX = file attributes On error CF = set AX = error code (#01680)
12
int 0x21 DOS Services Set File Attributes AH = 0x43 AL = 0x01
CX = file attributes DS:DX = ASCII file name Return On success CF = clear AX = undefined On error CF = set AX = error code
13
PSP
14
PSP 0x00 – 0x7F 0x80 0x80-(0x80+count) Count DOS Information
Chars
15
int 0x21 DOS Services Exec- Load and Execute AH = 0x4B
AL = type (0x00 load and exec, 0x01 load) DS:DX = ASCII file name ES:BX = parameter block Return On success CF = clear On error AX = error code
16
int 0x21 DOS Services 0x01 0x02 0x06 0x0A 0x0E 0x12 0x16 Command Tail
First FCB Second FCB SS:SP SS:IP Environment
17
int 0x21 DOS Services Allocate Memory AH = 0x48
BX = number of paragraphs Return On success CF = clear AX = segment of memory block On error CF = set AX = error code BX = largest available block
18
int 0x21 DOS Services Free Memory AH = 0x49
ES = segment of block to free Return On success CF = clear On error CF = set AX = error code
19
int 0x21 DOS Services Resize Memory Block AH = 0x4A
BX = number of paragraphs ES = segment of block Return On success CF = clear On error CF = set AX = error code BX = maximum paragraphs available
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.