Ρουτίνες Λειτουργίας (DOS function calls)

Size: px
Start display at page:

Download "Ρουτίνες Λειτουργίας (DOS function calls)"

Transcription

1 Ρουτίνες Λειτουργίας (DOS function calls) Παρακάτω ακολουθεί µία λίστα αυτών των AH κωδικών µε τα ονόµατα της ρουτίνας λειτουργίας (DOS function calls). 00H 01H 02H 03H 04H 05H 06H 07H 08H 09H TERMINATE A PROGRAM AH = 00H CS = program segment prefix address DOS is entered READ THE KEYBOARD AH = 01H AL = ASCII character If AL = 00H the function call must be invoked again to read an extended ASCII character. Refer to Chapter 9, Table 9 1, for a listing of the extended ASCII keyboard codes. This function call automatically echoes whatever is typed to the video screen. WRITE TO STANDARD OUTPUT DEVICE AH = 02H DL = ASCII character to be displayed This function call normally displays data on the video display. READ CHARACTER FROM COM1 AH = 03H AL = ASCII character read from the communications port This function call reads data from the serial communications port. WRITE TO COM1 AH = 04H DL = character to be sent out of COM1 This function transmits data through the serial communications port. The COM port assignment can be changed to use other COM ports with functions 03H and 04H by using the DOS MODE command to reassign COM1 to another COM port. WRITE TO LPT1 AH = 05H DL = ASCII character to be printed Prints DL on the line printer attached to LPT1. Note that the line printer port can be changed with the DOS MODE command. DIRECT CONSOLE READ/WRITE AH = 06H DL = 0FFH or DL = ASCII character AL = ASCII character If DL = 0FFH on entry, then this function reads the console. If DL = ASCII character, then this function displays the ASCII character on the console (CON) video screen. If a character is read from the console keyboard, the zero flag (ZF) indicates whether a character was typed. A zero condition indicates no key was typed, and a not-zero condition indicates that AL contains the ASCII code of the key or a 00H. If AL = 00H, the function must again be invoked to read an extended ASCII character from the keyboard. Note that the key does not echo to the video screen. DIRECT CONSOLE INPUT WITHOUT ECHO AH = 07H AL = ASCII character This functions exactly as function number 06H with DL = 0FFH, but it will not return from the function until the key is typed. READ STANDARD INPUT WITHOUT ECHO AH = 08H AL = ASCII character Performs as function 07H, except that it reads the standard input device. The standard input device can be assigned as either the keyboard or the COM port. This function also responds to a control-break, where function 06H and 07H do not. A control-break causes INT 23H to execute. By default, this functions as does function 07H. DISPLAY A CHARACTER STRING AH = 09H DS:DX = address of the character string The character string must end with an ASCII $ (24H). The character string can be of any

2 0AH 0BH length and may contains control characters such as carriage return (0DH) and line feed (0AH). BUFFERED KEYBOARD INPUT AH = 0AH DS:DX = address of keyboard input buffer The first byte of the buffer contains the size of the buffer (up to 255). The second byte is filled with the number of characters typed upon return. The third byte through the end of the buffer contains the character string typed followed by a carriage return (0DH). This function continues to read the keyboard (displaying data as typed) until either the specified number of characters are typed or until the enter key is typed. TEST STATUS OF THE STANDARD INPUT DEVICE AH = 0BH AL = status of the input device This function tests the standard input device to determine if data are available. If AL = 00, no data are available. If AL = 0FFH, then data are available that must be input using function number 08H. 0CH 0DH 0EH 0FH 10H 11H 12H 13H CLEAR KEYBOARD BUFFER AND INVOKE KEYBOARD FUNCTION AH = 0CH AL = 01H, 06H, 07H, or 0AH See exit for functions 01H, 06H, 07H, or 0AH The keyboard buffer holds keystrokes while programs execute other tasks. This function empties or clears the buffer and then invokes the keyboard function located in register AL. FLUSH DISK BUFFERS AH = 0DH Erases all file names stored in disk buffers. This function does not close the files specified by the disk buffers, so care must be exercised in its usage. SELECT DEFAULT DISK DRIVE AH = 0EH DL = desired default disk drive number AL = the total number of drives present in the system Drive A = 00H, drive B = 01H, drive C = 02H, and so FILE WITH FCB AH = 0FH DS:DX = address of the unopened file control block (FCB) AL = 00H if file found AL = 0FFH if file not found The file control block (FCB) is only used with early DOS software and should never be used with new programs. File control blocks do not allow path names as do the newer file access function codes presented later. Figure A 2 (p. 738) illustrates the structure of the FCB. To open a file, the file must either be present on the disk or be created with function call FILE WITH FCB AH = 10H DS:DX = address of the opened file control block (FCB) AL = 00H if file closed AL = 0FFH if error found Errors that occurs usually indicate either that the disk is full or the media is FOR FIRST MATCH (FCB) AH = 11H DS:DX = address of the file control block to be searched AL = 00H if file found AL = 0FFH if file not found Wild card characters (? or *) may be used to search for a file name. The? wild card character matches any character and the * matches any name or FOR NEXT MATCH (FCB) AH = 12H DS:DX = address of the file control block to be searched AL = 00H if file found AL = 0FFH if file not found This function is used after function 11H finds the first matching file FILE USING FCB AH = 13H DS:DX = address of the file control block to be deleted

3 14H 15H 16H 17H 19H 1AH 1BH 1CH 21H 22H 23H AL = 00H if file deleted AL = 0FFH if error occurred Errors that most often occur are defective media READ (FCB) AH = 14H DS:DX = address of the file control block to be read AL = 00H if read successful AL = 01H if end of file reached AL = 02H if DTA had a segment wrap AL = 03H if less than 128 bytes were WRITE (FCB) AH = 15H DS:DX = address of the file control block to be written AL = 00H if write successful AL = 01H if disk is full AL = 02H if DTA had a segment A FILE (FCB) AH = 16H DS:DX = address of an unopened file control block AL = 00H if file created AL = 01H if disk is A FILE (FCB) AH = 17H DS:DX = address of a modified file control block AL = 00H if file renamed AL = 01H if error occurred Refer to Figure A 3 (p. 738) for the modified FCB used to rename a file. RETURN CURRENT DRIVE AH = 19H AL = current drive AL = 00H for drive A, 01H for drive B, and so forth. SET DISK TRANSFER AREA AH = 1AH DS:DX = address of new DTA The disk transfer area is normally located within the program segment prefix at offset address 80H. The DTA is used by DOS for all disk data transfers using file control blocks. GET DEFAULT DRIVE FILE ALLOCATION TABLE (FAT) AH = 1BH AL = number of sectors per cluster DS:BX = address of the media descriptor CX = size of a sector in bytes DX = number of clusters on drive Refer to Figure A 4 (p. 739) for the format of the media descriptor byte. The DS register is changed by this function, so make sure to save it before using this function. GET ANY DRIVE FILE ALLOCATION TABLE (FAT) AH = 1CH DL = disk drive number AL = number of sectors per cluster DS:BX = address of the media descriptor CX = size of a sector in bytes DX = number of clusters on READ USING FCB AH = 21H DS:DX = address of opened FCB AL = 00H if read successful AL = 01H if end of file reached AL = 02H if the segment wrapped AL = 03H if less than 128 bytes WRITE USING FCB AH = 22H DS:DX = address of opened FCB AL = 00H if write successful AL = 01H if disk full AL = 02H if the segment NUMBER OF RECORDS (FCB)

4 24H 25H 26H 27H 28H 29H 2AH 2BH 2CH AH = 23H DS:DX = address of FCB AL = 00H number of records AL = 0FFH if file not RELATIVE RECORD SIZE (FCB) AH = 24H DS:DX = address of FCB Sets the record field to the value contained in the FCB. SET INTERRUPT VECTOR AH = 25H AL = interrupt vector number DS:DX = address of new interrupt procedure Before changing the interrupt vector, it is suggested that the current interrupt vector first be saved using DOS function 35H. This allows a back-link so the original vector can later be restored. CREATE NEW PROGRAM SEGMENT PREFIX AH = 26H DX = segment address of new PSP Figure A 5 (p. 739) illustrates the structure of the program segment FILE BLOCK READ (FCB) AH = 27H CX = the number of records DS:DX = address of opened FCB AL = 00H if read successful AL = 01H if end of file reached AL = 02H if the segment wrapped AL = 03H if less than 128 bytes read CX = the number of records FILE BLOCK WRITE (FCB) AH = 28H CX = the number of records DS:DX = address of opened FCB AL = 00H if write successful AL = 01H if disk full AL = 02H if the segment wrapped CX = the number of records COMMAND LINE (FCB) AH = 29H AL = parse mask DS:SI = address of FCB DS:DI = address of command line AL = 00H if no file name characters found AL = 01H if file name characters found AL = 0FFH if drive specifier incorrect DS:SI = address of character after name DS:DI = address first byte of FCB READ SYSTEM DATE AH = 2AH AL = day of the week CX = the year ( ) DH = the month DL = day of the month The day of the week is encoded as Sunday = 00H through Saturday = 06H. The year is a binary number equal to 1980 through SET SYSTEM DATE AH = 2BH CX = the year ( ) DH = the month DL = day of the month READ SYSTEM TIME AH = 2CH CH = hours (0 23) CL = minutes DH = seconds DL = hundredths of seconds All times are returned in binary form, and hundredths of seconds may not be available.

5 2DH 2EH 2FH 30H 31H 33H 34H 35H 36H 38H 39H SET SYSTEM TIME AH = 2DH CH = hours CL = minutes DH = seconds DL = hundredths of seconds DISK VERIFY WRITE AH = 2EH AL = 00H to disable verify on write AL = 01H to enable verify on write By default, disk verify is disabled. READ DISK TRANSFER AREA ADDRESS AH = 2FH ES:BX = contains DTA address READ DOS VERSION NUMBER AH = 30H AH = fractional version number AL = whole number version number For example, DOS version number 3.2 is returned as a 3 in AL and a 14H in AH. TERMINATE AND STAY RESIDENT (TSR) AH = 31H AL = the DOS return code DX = number of paragraphs to reserve for program A paragraph is 16 bytes and the DOS return code is read at the batch file level with ERRORCODE. TEST CONTROL-BREAK AH = 33H AL = 00H to request current control-break AL = 01H to change control-break DL = 00H to disable control-break DL = 01H to enable control-break DL = current control-break state GET ADDRESS OF InDOS FLAG AH = 34H ES:BX = address of InDOS flag The InDOS flag is available in DOS versions 3.2 or newer and indicates DOS activity. If InDOS = 00H, DOS is inactive or 0FFH if DOS is active and pursuing another operation. READ INTERRUPT VECTOR AH = 35H AL = interrupt vector number ES:BX = address stored at vector This DOS function is used with function 25H to install/remove interrupt handlers. DETERMINE FREE DISK SPACE AH = 36H DL = drive number AX = FFFFH if drive invalid AX = number of sectors per cluster BX = number of free clusters CX = bytes per sector DX = number of clusters on drive The default disk drive is DL = 00H, drive A = 01H, drive B = 02H, and so forth. RETURN COUNTRY CODE AH = 38H AL = 00H for current country code BX = 16-bit country code DS:DX = data buffer address BX = counter code DS:DX = data buffer address CREATE SUB-DIRECTORY AH = 39H DS:DX = address of ASCII-Z string subdirectory name The ASCII-Z string is the name of the subdirectory in ASCII code ended with a 00H instead of a carriage return/line feed.

6 3AH 3BH 3CH 3DH 3EH 3FH 40H 41H 42H ERASE SUB-DIRECTORY AH = 3AH DS:DX = address of ASCII-Z string subdirectory name CHANGE SUB-DIRECTORY AH = 3BH DS:DX = address of new ASCII-Z string subdirectory name CREATE A NEW FILE AH = 3CH CX = attribute word DS:DX = address of ASCII-Z string file name AX = file handle if carry cleared The attribute word can contain any of the following (added together): 01H read-only access, 02H = hidden file or directory, 04H = system file, 08H = volume label, 10H = subdirectory, and 20H = archive bit. In most cases, a file is created with 0000H. OPEN A FILE AH = 3DH AL = access code DS:DX = address of ASCII-Z string file name AX = file handle if carry cleared The access code in AL = 00H for a read-only access, AL = 01H for a write-only access, and AL = 02H for a read/write access. For shared files in a network environment, bit 4 of AL = 1 will deny read/write access, bit 5 of AL = 1 will deny a write access, bits 4 and 5 of AL = 1 will deny read access, bit 6 of AL = 1 denies none, bit 7 of AL = 0 causes the file to be inherited by child; if bit 7 of AL = 1, file is restricted to current process. CLOSE A FILE AH = 3EH BX = file handle READ A FILE AH = 3FH BX = file handle CX = number of bytes to be read DS:DX = address of file buffer to hold data read AX = number of bytes read if carry cleared WRITE A FILE AH = 40H BX = file handle CX = number of bytes to write DS:DX = address of file buffer that holds write data AX = number of bytes written if carry cleared DELETE A FILE AH = 41H DS:DX = address of ASCII-Z string file name MOVE FILE POINTER AH = 42H AL = move technique BX = file handle CX:DX = number of bytes pointer moved AX:DX = bytes pointer moved The move technique causes the pointer to move from the start of the file if AL = 00H, from the current location if AL = 01H, and from the end of the file if AL = 02H. The count is stored so DX contains the least-significant 16-bits and either CX or AX contains the most-significant 16-bits. 43H READ/WRITE FILE ATTRIBUTES

7 44H AH = 43H AL = 00H to read attributes AL = 01H to write attributes CX = attribute word (see function 3CH) DS:DX = address of ASCII-Z string file name CX = attribute word of carry cleared I/O DEVICE CONTROL (IOTCL) AH = 44H AL = sub function code (see notes) AX = error code (see function 59H) if carry set The sub function codes found in AL are as follows: 00H = read device status : BX = file handle : DX = status 01H = write device status : BX = file handle, DH = 0, DL = device information : 02H = read control data from character device : BX = file handle, CX = number of bytes, DS:DX = I/O buffer address : AX = number of bytes read 03H = write control data to character device : BX = file handle, CX = number of bytes, DS:DX = I/O buffer address : AX = number of bytes written 04H = read control data from block device : BL = drive number (0 = default, 1 = A, 2 = B, etc), CX = number of bytes, DS:DX = I/O buffer address : AX = number of bytes read 05H = write control data to block device : BL = drive number, CX = number of bytes, DS:DX = I/O buffer address : AX = number of bytes written 06H = check input status : BX = file handle : AL = 00H ready or FFH not ready 07H = check output status : BX = file handle : AL = 00H ready or FFH not ready 08H = removable media? : BL = drive number : AL = 00H removable, 01H fixed 09H = network block device? : BL = drive number : bit 12 of DX set for network block device 0AH = local or network character device? : BX = file handle : bit 15 of DX set for network character device 0BH = change entry count (must have SHARE.EXE loaded) : CX = delay loop count, DX = retry count : 0CH = generic I/O control for character devices : BX = file handle, CH = category, CL = function Categories: 00H = unknown, 01H = COM port, 02H = CON, 05H = LPT ports Function: CL = 45H; set iteration count CL = 4AH; select code page CL = 4CH; start code page preparation CL = 4DH; end code page preparation CL = 5FH; set display information CL = 65H; get iteration count CL = 6AH; query selected code page CL = 6BH; query preparation list CL = 7FH; get display information 0DH = generic I/O control for block devices

8 45H 46H 47H 48H 49H 4AH 4BH 4CH : BL = drive number, CH = category, CL = function, DS:DX = address of parameter block Category: 08H = disk drive Function: CL = 40H; set device parameters CL = 41H; write track CL = 42H; format and verify track CL = 46H, set media ID code CL = 47H; set access flag CL = 60H; get device parameters CL = 61H; read track CL = 62H; verify track CL = 66H; get media ID code CL = 67H; get access code 0EH = return logical device map : BL = drive number : AL = number of last device 0FH = change logical device map : BL = drive number : AL = number of last device DUPLICATE FILE HANDLE AH = 45H BX = current file handle AX = duplicate file handle FORCE DUPLICATE FILE HANDLE AH = 46H BX = current file handle CX = new file handle This function works like function 45H except that function 45H allows DOS to select the new handle, while this function allows the user to select the new handle. READ CURRENT DIRECTORY AH = 47H DL = drive number DS:SI = address of a 64 byte buffer for directory name DS:SI addresses current directory name if carry cleared Drive A = 00, drive B = 01, and so forth ALLOCATE MEMORY BLOCK AH = 48H BX = number of paragraphs to allocate CX = new file handle BX = largest block available if carry cleared RELEASE ALLOCATED MEMORY BLOCK AH = 49H ES = segment address of block to be released CX = new file handle Carry indicates an error if set MODIFY ALLOCATED MEMORY BLOCK AH = 4AH BX = new block size in paragraphs ES = segment address of block to be modified BX = largest block available if carry cleared LOAD OR EXECUTE A PROGRAM AH = 4BH AL = function code ES:BX = address of parameter block DS:DX = address ASCII-Z string command Carry indicates an error if set The function codes are AL = 00H to load and execute a program, AL = 01H to load a program but not execute it, AL = 03H to load a program overlay, and AL = 05H to enter the EXEC state. Figure A 6 (p. 740) shows the parameter block used with this function. TERMINATE A PROCESS AH = 4CH AL = error code Returns control to DOS

9 4DH 4EH 4FH 50H 51H 54H 56H 57H 59H This function returns control to DOS with the error code saved so it can be obtained using DOS ERROR LEVEL batch processing system. We normally use this function with an error code of 00H to return to DOS. READ RETURN CODE AH = 4DH AX = return error code This function is used to obtain the return status code created by executing a program with DOS function 4BH. The return codes are AX = 0000H for a normal-no errortermination, AX = 0001H for a control-break termination, AX = 0002H for a critical device error, and AX = 0003H for a termination by an INT 31H. FIND FIRST MATCHING FILE AH = 4EH CX = file attributes DS:DX = address ASCII-Z string file name Carry is set for file not found This function searches the current or named directory for the first matching file. Upon exit, the DTA contains the file information. See Figure A 7 (p. 740) for the disk transfer area (DTA). FIND NEXT MATCHING FILE AH = 4FH Carry is set for file not found This function is used after the first file is found with function 4EH. SET PROGRAM SEGMENT PREFIX (PSP) ADDRESS AH = 50H BX = offset address of the new PSP Extreme care must be used with this function because no error recovery is possible. GET PSP ADDRESS AH = 51H BX = current PSP segment address READ DISK VERIFY STATUS AH = 54H AL = 00H if verify off AL = 01H if verify on RENAME FILE AH = 56H ES:DI = address of ASCII-Z string containing new file name DS:DX = address of ASCII-Z string containing file to be renamed READ FILE S DATE AND TIME STAMP AH = 57H AL = function code BX = file handle CX = new time DX = new date CX = time if carry cleared DX = date if carry cleared AL = 00H to read date and time or 01H to write date and time. GET EXTENDED ERROR INFORMATION AH = 59H BX = 0000H for DOS version 3.X AX = extended error code BH = error class BL = recommended action CH = locus Following are the extended error codes found in AX: 0001H = invalid function number 0002H = file not found 0003H = path not found 0004H = no file handles available 0005H = access denied 0006H = file handle invalid 0007H = memory control block failure 0008H = insufficient memory 0009H = memory block address invalid

10 000AH = environment failure 000BH = format invalid 000CH = access code invalid 000DH = data invalid 000EH = unknown unit 000FH = disk drive invalid 0010H = attempted to remove current directory 0011H = not same device 0012H = no more files 0013H = disk write-protected 0014H = unknown unit 0015H = drive not ready 0016H = unknown command 0017H = data error (CRC check error) 0018H = bad request structure length 0019H = seek error 001AH = unknown media type 001BH = sector not found 001CH = printer out of paper 001DH = write fault 001EH = read fault 001FH = general failure 0020H = sharing violation 0021H = lock violation 0022H = disk change invalid 0023H = FCB unavailable 0024H = sharing buffer exceeded 0025H = code page mismatch 0026H = handle end of file operation not completed 0027H = disk full 0028H 0031H reserved 0032H = unsupported network request 0033H = remote machine not listed 0034H = duplicate name on network 0035H = network name not found 0036H = network busy 0037H = device no longer exists on network 0038H = netbios command limit exceeded 0039H = error in network adapter hardware 003AH = incorrect response from network 003BH = unexpected network error 003CH = remote adapter is incompatible 003DH = print queue is full 003EH = not enough room for print file 003FH = print file was deleted 0040H = network name deleted 0041H = network access denied 0042H = incorrect network device type 0043H = network name not found 0044H = network name exceeded limit 0045H = netbios session limit exceeded 0046H = temporary pause 0047H = network request not accepted 0048H = print or disk redirection pause 0049H 004FH reserved 0050H = file already exists 0051H = duplicate FCB 0052H = cannot make directory 0053H = failure in INT 24H (critical error) 0054H = too many re-directions 0055H = duplicate redirection 0056H = invalid password 0057H = invalid parameter 0058H = network write failure 0059H = function not supported by network 005AH = required system component not installed 0065H = device not selected

11 Following are the error class codes as found in BH: 01H = no resources available 02H = temporary error 03H = authorization error 04H = internal software error 05H = hardware error 06H = system failure 07H = application software error 08H = item not found 09H = invalid format 0AH = item blocked 0BH = media error 0CH = item already exists 0DH = unknown error Following is the recommended action as found in BL: 01H = retry operation 02H = delay and retry operation 03H = user retry 04H = abort processing 05H = immediate exit 06H = ignore error 07H = retry with user intervention Following is a list of locus in CH: 5AH 5BH 5CH 5DH 5EH 01H = unknown source 02H = block device error 03H = network area 04H = serial device error 05H = memory error CREATE UNIQUE FILE NAME AH = 5AH CX = attribute code DS:DX = address of the ASCII-Z string directory path AX = file handle if carry cleared DS:DX = address of the appended directory name The ASCII-Z file directory path must end with a backslash (\). On exit, the directory name is appended with a unique file name. CREATE A DOS FILE AH = 5BH CX = attribute code DS:DX = address of the ASCII-Z string contain the file name AX = file handle if carry cleared The function only works in DOS version 3.X or higher. It is almost identical to function 3CH, except that function 3CH erases the file, if it already exists, while function 5BH reports that the file exists without erasing it. LOCK/UNLOCK FILE CONTENTS AH = 5CH BX = file handle CX:DX = offset address of locked/unlocked area SI:DI = number of bytes to lock or unlock beginning at offset SET EXTENDED ERROR INFORMATION AH = 5DH AL = 0AH DS:DX = address of the extended error data structure This function is used by DOS version 3.1 or higher to store extended error information. NETWORK/PRINTER AH = 5EH AL = 00H (get network name) DS:DX = address of the ASCII-Z string containing network name

12 62H 65H 66H 67H 68H 6CH CL = netbios number if carry cleared AH = 5EH AL = 02H (define network printer) BX = redirection list CX = length of setup string DS:DX = address of printer setup buffer AH = 5EH AL = 03H (read network printer setup string) BX = redirection list DS:DX = address of printer setup buffer CX = length of setup string if carry cleared ES:DI = address of printer setup buffer GET PSP ADDRESS AH = 62H BX = segment address of the current program The function only works in DOS version 3.0 or higher. GET EXTENDED COUNTRY INFORMATION AH = 65H AL = function code ES:DI = address of buffer to receive information CX = length of country information The function only works in DOS version 3.3 or higher. GET/SET CODE PAGE AH = 66H AL = function code BX = code page number BX = active code page number DX = default code page number A function code in AL of 01H gets the code page number, and a code of 02H sets the code page number. SET HANDLE COUNT AH = 67H BX = number of handles desired This function is available for DOS version 3.3 or higher. COMMIT FILE AH = 68H BX = handle number ; otherwise, the date and time stamp is written to directory This function is available for DOS version 3.3 or higher. EXTENDED OPEN FILE AH = 6CH AL = 00H BX = open mode CX = attributes DX = open flag DS:SI = address of ASCII-Z string file name AX = error code if carry is set AX = handle if carry is cleared CX = 0001H file existed and was opened CX = 0002H file did not exist and was created This function is available for DOS version 4.0 or higher.

Summer 2003 Lecture 26 07/24/03

Summer 2003 Lecture 26 07/24/03 Summer 2003 Lecture 26 07/24/03 Organization of Data on the Disk The logical organization of the FAT file system on a disk is made up of the following elements. BOOT Sector Root Directory Structure File

More information

DOS INT 21h - DOS Function Codes

DOS INT 21h - DOS Function Codes Back To Home DOS INT 21h - DOS Function Codes The follow abridged list of DOS interrupts has been extracted from a large list compiled by Ralf Brown. These are available on any Simtel mirror (e.g. sunsite.anu.edu.au)

More information

SPRING TERM BM 310E MICROPROCESSORS LABORATORY PRELIMINARY STUDY

SPRING TERM BM 310E MICROPROCESSORS LABORATORY PRELIMINARY STUDY BACKGROUND Interrupts The INT instruction is the instruction which does the most work in any assembler program. What it does is it calls a DOS interrupt (like a function) to perform a special task. When

More information

Microprocessors (A) DOS Services

Microprocessors (A) DOS Services 1 Services 2 System Calls Operating System services: Disk and file system management Screen display and printing Keyboard entry Other I/O management Date and time Program run and terminate Command arguments

More information

Lecture 13: I/O I/O. Interrupts. How?

Lecture 13: I/O I/O. Interrupts. How? Lecture 13: I/O I/O Interrupts MS-DOS Function Calls Input,Output, File I/O Video Keyboard Getting data into your program: define it in the data area use immediate operands Very limiting Most programs

More information

Interrupt Services. Which Way is Best? Characteristics. Direct in, out. BIOS Average Average DOS Most Least

Interrupt Services. Which Way is Best? Characteristics. Direct in, out. BIOS Average Average DOS Most Least Interrupt Services Application Programs/OS Shell (command.com) int 10h, and others int 21h, and others (IO.SYS) DOS Services (msdos.sys) BIOS (EEPROM) Hardware (x86, Chipset and Peripherals) BIOS - Basic

More information

Assembly Language for Intel-Based Computers, 4 th Edition. Chapter 13: 16-Bit MS-DOS Programming

Assembly Language for Intel-Based Computers, 4 th Edition. Chapter 13: 16-Bit MS-DOS Programming Assembly Language for Intel-Based Computers, 4 th Edition Kip R. Irvine Chapter 13: 16-Bit MS-DOS Programming (c) Pearson Education, 2002. All rights reserved. Chapter Overview MS-DOS and the IBM-PC MS-DOS

More information

Experiment 3 3 Basic Input Output

Experiment 3 3 Basic Input Output Experiment 3 3 Basic Input Output Introduction The aim of this experiment is to introduce the use of input/output through the DOS interrupt. Objectives: INT Instruction Keyboard access using DOS function

More information

Time Left. sec(s) Quiz Start Time: 12:13 AM. Question # 5 of 10 ( Start time: 12:18:29 AM ) Total Marks: 1

Time Left. sec(s) Quiz Start Time: 12:13 AM. Question # 5 of 10 ( Start time: 12:18:29 AM ) Total Marks: 1 64 Quiz Start Time: 12:13 AM Question # 5 of 10 ( Start time: 12:18:29 AM ) Total Marks: 1 The root directory of floppy contains fixed entries 64 256 128 512 77 Quiz Start Time: 12:13 AM Question # 6 of

More information

Intel 8086 MICROPROCESSOR ARCHITECTURE

Intel 8086 MICROPROCESSOR ARCHITECTURE Intel 8086 MICROPROCESSOR ARCHITECTURE 1 Features It is a 16-bit μp. 8086 has a 20 bit address bus can access up to 2 20 memory locations (1 MB). It can support up to 64K I/O ports. It provides 14, 16

More information

Microcomputer Architecture..Second Year (Sem.2).Lecture(2) مدرس المادة : م. سندس العزاوي... قسم / الحاسبات

Microcomputer Architecture..Second Year (Sem.2).Lecture(2) مدرس المادة : م. سندس العزاوي... قسم / الحاسبات 1) Input/output In computing, input/output or I/O, is the communication between an information processing system (such as a computer) and the outside world, possibly a human or another information processing

More information

EXPERIMENT TWELVE: USING DISK FILES

EXPERIMENT TWELVE: USING DISK FILES EXPERIMENT TWELVE: USING DISK FILES INTRODUCTION Because just about any program ever written requires the use of a disk file to store or retrieve data, this experiment shows how to create, read, write,

More information

Code segment Stack segment

Code segment Stack segment Registers Most of the registers contain data/instruction offsets within 64 KB memory segment. There are four different 64 KB segments for instructions, stack, data and extra data. To specify where in 1

More information

Assembly Language for Intel-Based Computers, 4 th Edition

Assembly Language for Intel-Based Computers, 4 th Edition Assembly Language for Intel-Based Computers, 4 th Edition Kip R. Irvine Chapter 13: 16-Bit MS-DOS Programming Interrupts Slide show prepared by Kip R. Irvine, Revision date: 08/04/02 Modified by Dr. Nikolay

More information

Intel 8086 MICROPROCESSOR. By Y V S Murthy

Intel 8086 MICROPROCESSOR. By Y V S Murthy Intel 8086 MICROPROCESSOR By Y V S Murthy 1 Features It is a 16-bit μp. 8086 has a 20 bit address bus can access up to 2 20 memory locations (1 MB). It can support up to 64K I/O ports. It provides 14,

More information

Interrupts. Chapter 20 S. Dandamudi. Outline. Exceptions

Interrupts. Chapter 20 S. Dandamudi. Outline. Exceptions Interrupts Chapter 20 S. Dandamudi Outline What are interrupts? Types of interrupts Software interrupts Hardware interrupts Exceptions Interrupt processing Protected mode Real mode Software interrupts

More information

9/25/ Software & Hardware Architecture

9/25/ Software & Hardware Architecture 8086 Software & Hardware Architecture 1 INTRODUCTION It is a multipurpose programmable clock drive register based integrated electronic device, that reads binary instructions from a storage device called

More information

CP/M-86 Compatibility Guide For CP/M-80 Users

CP/M-86 Compatibility Guide For CP/M-80 Users CCGFCU.WS4 ---------- CP/M-86 Compatibility Guide For CP/M-80 Users (= CCGFCU...) Copyright (c) 1980 Digital Research Pacific Grove, California (Revision of 10/21/80) (= 21 October 1980) (Retyped by Emmanuel

More information

Hardware and Software Architecture. Chapter 2

Hardware and Software Architecture. Chapter 2 Hardware and Software Architecture Chapter 2 1 Basic Components The x86 processor communicates with main memory and I/O devices via buses Data bus for transferring data Address bus for the address of a

More information

CS609 Final Term Solved MCQs with References Without Repetitions 14/02/2013

CS609 Final Term Solved MCQs with References Without Repetitions 14/02/2013 1 CS609 Final Term Solved MCQs with References Without Repetitions 14/02/2013 In BPB, root directory is saved in. (BIOS parameter block) Cluster#0 Cluster#1 (Ref) Cluster#2 Cluster#3 In NTFS, total sizes

More information

IA32 Intel 32-bit Architecture

IA32 Intel 32-bit Architecture 1 2 IA32 Intel 32-bit Architecture Intel 32-bit Architecture (IA32) 32-bit machine CISC: 32-bit internal and external data bus 32-bit external address bus 8086 general registers extended to 32 bit width

More information

EEM336 Microprocessors I. Data Movement Instructions

EEM336 Microprocessors I. Data Movement Instructions EEM336 Microprocessors I Data Movement Instructions Introduction This chapter concentrates on common data movement instructions. 2 Chapter Objectives Upon completion of this chapter, you will be able to:

More information

x86 Assembly Tutorial COS 318: Fall 2017

x86 Assembly Tutorial COS 318: Fall 2017 x86 Assembly Tutorial COS 318: Fall 2017 Project 1 Schedule Design Review: Monday 9/25 Sign up for 10-min slot from 3:00pm to 7:00pm Complete set up and answer posted questions (Official) Precept: Monday

More information

Chapter 2 COMPUTER SYSTEM HARDWARE

Chapter 2 COMPUTER SYSTEM HARDWARE Chapter 2 COMPUTER SYSTEM HARDWARE A digital computer system consists of hardware and software. The hardware consists of the physical components of the system, whereas the software is the collection of

More information

Come and join us at WebLyceum

Come and join us at WebLyceum Come and join us at WebLyceum For Past Papers, Quiz, Assignments, GDBs, Video Lectures etc Go to http://www.weblyceum.com and click Register In Case of any Problem Contact Administrators Rana Muhammad

More information

We can study computer architectures by starting with the basic building blocks. Adders, decoders, multiplexors, flip-flops, registers,...

We can study computer architectures by starting with the basic building blocks. Adders, decoders, multiplexors, flip-flops, registers,... COMPUTER ARCHITECTURE II: MICROPROCESSOR PROGRAMMING We can study computer architectures by starting with the basic building blocks Transistors and logic gates To build more complex circuits Adders, decoders,

More information

Programming in Module. Near Call

Programming in Module. Near Call Programming in Module Main: sub1: call sub1 sub ax,ax sub1 sub1 proc near sub ax,ax endp sub1 sub1 proc Far sub ax,ax endp Near Call sub1 sub1 Main: call sub1 sub1: sub ax,ax proc near sub ax,ax endp SP

More information

Transfer of Control. Lecture 10 JMP. JMP Formats. Jump Loop Homework 3 Outputting prompts Reading single characters

Transfer of Control. Lecture 10 JMP. JMP Formats. Jump Loop Homework 3 Outputting prompts Reading single characters Lecture 10 Jump Loop Homework 3 Outputting prompts Reading single characters Transfer of Control The CPU loads and executes programs sequentially. You d like to be able to implement if statements, gotos,

More information

8086 Interrupts and Interrupt Responses:

8086 Interrupts and Interrupt Responses: UNIT-III PART -A INTERRUPTS AND PROGRAMMABLE INTERRUPT CONTROLLERS Contents at a glance: 8086 Interrupts and Interrupt Responses Introduction to DOS and BIOS interrupts 8259A Priority Interrupt Controller

More information

Programming in Assembler. Laboratory manual. Exercise 3

Programming in Assembler. Laboratory manual. Exercise 3 Zakład Mikroinformatyki i Teorii Automatów Cyfrowych Programming in Assembler Laboratory manual Exercise 3 Simple MS-DOS program assembling and debugging 2008,2011 Krzysztof Tokarz, Piotr Czekalski (edt.)

More information

BIOS Enhanced Disk Drive Specification. June 24, 1999

BIOS Enhanced Disk Drive Specification. June 24, 1999 BIOS Enhanced Disk Drive Specification Version 3.0 Rev 0.9b June 24, 1999 Technical Editor: Curtis E. Stevens Phoenix Technologies 135 Technology Dr. Irvine, Ca. 92618 Phone: (949) 790-2000 Fax: (949)

More information

Experiment #5. Using BIOS Services and DOS functions Part 1: Text-based Graphics

Experiment #5. Using BIOS Services and DOS functions Part 1: Text-based Graphics Experiment #5 Using BIOS Services and DOS functions Part 1: Text-based Graphics 5.0 Objectives: The objective of this experiment is to introduce BIOS and DOS interrupt service routines to be utilized in

More information

RAID Option ROM. Product Implementation Guide. Version 1.8 Date: 08/19/2009. Copyright 2009, Promise Technology, Inc. All Rights Reserved

RAID Option ROM. Product Implementation Guide. Version 1.8 Date: 08/19/2009. Copyright 2009, Promise Technology, Inc. All Rights Reserved RAID Option ROM Product Implementation Guide Version 1.8 Date: 08/19/2009 Copyright 2009, Promise Technology, Inc. All Rights Reserved Revision History Version Date Author Notes 1.8 2009/08/19 Adam Hsu

More information

The x86 Microprocessors. Introduction. The 80x86 Microprocessors. 1.1 Assembly Language

The x86 Microprocessors. Introduction. The 80x86 Microprocessors. 1.1 Assembly Language The x86 Microprocessors Introduction 1.1 Assembly Language Numbering and Coding Systems Human beings use the decimal system (base 10) Decimal digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Computer systems use the

More information

EC-333 Microprocessor and Interfacing Techniques

EC-333 Microprocessor and Interfacing Techniques EC-333 Microprocessor and Interfacing Techniques Lecture 4 Addressing Modes Dr Hashim Ali Spring - 2018 Department of Computer Science and Engineering HITEC University Taxila Slides taken from Computer

More information

CC411: Introduction To Microprocessors

CC411: Introduction To Microprocessors CC411: Introduction To Microprocessors OBJECTIVES this chapter enables the student to: Describe the Intel family of microprocessors from 8085 to Pentium. In terms of bus size, physical memory & special

More information

Lecture 5:8086 Outline: 1. introduction 2. execution unit 3. bus interface unit

Lecture 5:8086 Outline: 1. introduction 2. execution unit 3. bus interface unit Lecture 5:8086 Outline: 1. introduction 2. execution unit 3. bus interface unit 1 1. introduction The internal function of 8086 processor are partitioned logically into processing units,bus Interface Unit(BIU)

More information

icroprocessor istory of Microprocessor ntel 8086:

icroprocessor istory of Microprocessor ntel 8086: Microprocessor A microprocessor is an electronic device which computes on the given input similar to CPU of a computer. It is made by fabricating millions (or billions) of transistors on a single chip.

More information

EC-333 Microprocessor and Interfacing Techniques

EC-333 Microprocessor and Interfacing Techniques EC-333 Microprocessor and Interfacing Techniques Lecture 3 The Microprocessor and its Architecture Dr Hashim Ali Fall - 2018 Department of Computer Science and Engineering HITEC University Taxila Slides

More information

Experiment 3. TITLE Optional: Write here the Title of your program.model SMALL This directive defines the memory model used in the program.

Experiment 3. TITLE Optional: Write here the Title of your program.model SMALL This directive defines the memory model used in the program. Experiment 3 Introduction: In this experiment the students are exposed to the structure of an assembly language program and the definition of data variables and constants. Objectives: Assembly language

More information

Proposed Common Configuration Method

Proposed Common Configuration Method Proposed Common Configuration Method July 9, 1991 The Common Configuration Method (CCM) simplifies configuration of disks and other storage devices. This definition includes a Standard AT Compatible Register

More information

DVD :50 PM Page 1 BIOS

DVD :50 PM Page 1 BIOS 99 0789729741 DVD 3.07 06 09 2003 1:50 PM Page 1 BIOS 99 0789729741 DVD 3.07 06 09 2003 1:50 PM Page 2 2 BIOS AMI BIOS POST Checkpoint Codes Table 1 AMI BIOS POST Checkpoint Codes for All AMI BIOS Products

More information

16-bit MS-DOS and BIOS Programming

16-bit MS-DOS and BIOS Programming CS2422 Assem bly Language and System Programming 16-bit MS-DOS and BIOS Programming Department of Computer Science National Tsing Hua University Overview Chapter 13: 16-bit MS-DOS Programming MS-DOS and

More information

The next page shows the questions asked in revision 0 of this proposal and the answers supplied by the May SCSI Working Group meeting.

The next page shows the questions asked in revision 0 of this proposal and the answers supplied by the May SCSI Working Group meeting. T10/99-163r1 Date: 13 May 1999 To: T10 Technical Committee From: Ralph Weber, LSI Logic Alternate Member of T10 Subj: EXTENDED COPY command for SPC-2 This revision contains those changes agreed by the

More information

SRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF ECE EC6504 MICROPROCESSOR AND MICROCONTROLLER (REGULATION 2013)

SRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF ECE EC6504 MICROPROCESSOR AND MICROCONTROLLER (REGULATION 2013) SRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF ECE EC6504 MICROPROCESSOR AND MICROCONTROLLER (REGULATION 2013) UNIT I THE 8086 MICROPROCESSOR PART A (2 MARKS) 1. What are the functional

More information

16.317: Microprocessor Systems Design I Fall 2013

16.317: Microprocessor Systems Design I Fall 2013 16.317: Microprocessor Systems Design I Fall 2013 Exam 1 Solution 1. (20 points, 5 points per part) Multiple choice For each of the multiple choice questions below, clearly indicate your response by circling

More information

Northern India Engineering College, Delhi (GGSIP University) PAPER I

Northern India Engineering College, Delhi (GGSIP University) PAPER I PAPER I Q1.Explain IVT? ANS. interrupt vector table is a memory space for storing starting addresses of all the interrupt service routine. It stores CS:IP PAIR corresponding to each ISR. An interrupt vector

More information

if 2 16bit operands multiplied the result will be

if 2 16bit operands multiplied the result will be how many operands in ADC? ans:3 how 32 bit word is defined? ans define double if 2 16bit operands multiplied the result will be ans 32bit if div by ero occurs then?? ans div by zero int for software int

More information

db "Please enter up to 256 characters (press Enter Key to finish): ",0dh,0ah,'$'

db Please enter up to 256 characters (press Enter Key to finish): ,0dh,0ah,'$' PA4 Sample Solution.model large.stack 100h.data msg1 db "This programs scans a string of up to 256 bytes and counts the repetitions of the number 4206 and sums them.",0dh,0ah,'$' msg2 db "Please enter

More information

Program controlled semiconductor device (IC) which fetches (from memory), decodes and executes instructions.

Program controlled semiconductor device (IC) which fetches (from memory), decodes and executes instructions. 8086 Microprocessor Microprocessor Program controlled semiconductor device (IC) which fetches (from memory), decodes and executes instructions. It is used as CPU (Central Processing Unit) in computers.

More information

Segmentation with Paging. Review. Segmentation with Page (MULTICS) Segmentation with Page (MULTICS) Segmentation with Page (MULTICS)

Segmentation with Paging. Review. Segmentation with Page (MULTICS) Segmentation with Page (MULTICS) Segmentation with Page (MULTICS) Review Segmentation Segmentation Implementation Advantage of Segmentation Protection Sharing Segmentation with Paging Segmentation with Paging Segmentation with Paging Reason for the segmentation with

More information

MICROPROCESSOR PROGRAMMING AND SYSTEM DESIGN

MICROPROCESSOR PROGRAMMING AND SYSTEM DESIGN MICROPROCESSOR PROGRAMMING AND SYSTEM DESIGN ROAD MAP SDK-86 Intel 8086 Features 8086 Block Diagram 8086 Architecture Bus Interface Unit Execution Unit 8086 Architecture 8086 Programmer s Model Flag Register

More information

Lecture 9. INC and DEC. INC/DEC Examples ADD. Arithmetic Operations Overflow Multiply and Divide

Lecture 9. INC and DEC. INC/DEC Examples ADD. Arithmetic Operations Overflow Multiply and Divide Lecture 9 INC and DEC Arithmetic Operations Overflow Multiply and Divide INC adds one to a single operand DEC decrements one from a single operand INC destination DEC destination where destination can

More information

CS609 - Final Term Papers Fall 2012

CS609 - Final Term Papers Fall 2012 CS609 - System Programming Solved Subjective From Final term Papers July 10,2013 MC100401285 Moaaz.pk@gmail.com Mc100401285@gmail.com PSMD01 CS609 - Final Term Papers Fall 2012 Q#1 In how many ways higher

More information

Block Data is the data transferred to or from the device using SCT Command Transport feature set capabilities.

Block Data is the data transferred to or from the device using SCT Command Transport feature set capabilities. 1. Add the following terms to the glossary: 3.1.x Block Data Block Data is the data transferred to or from the device using SCT Command Transport feature set capabilities. 3.1.x SCT command SCT commands

More information

Project 1: Bootloader. COS 318 Fall 2015

Project 1: Bootloader. COS 318 Fall 2015 Project 1: Bootloader COS 318 Fall 2015 Project 1: Schedule Design Review - Monday, 9/28-10- min Ime slots from 1:30pm- 6:20pm - Write funcions print_char and print_string! - Answer the quesions: ü How

More information

CS401 Assembly Language Solved MCQS From Midterm Papers

CS401 Assembly Language Solved MCQS From Midterm Papers CS401 Assembly Language Solved MCQS From Midterm Papers May 14,2011 MC100401285 Moaaz.pk@gmail.com MC100401285@gmail.com PSMD01(IEMS) Question No:1 ( Marks: 1 ) - Please choose one The first instruction

More information

EXPERIMENT WRITE UP. LEARNING OBJECTIVES: 1. Get hands on experience with Assembly Language Programming 2. Write and debug programs in TASM/MASM

EXPERIMENT WRITE UP. LEARNING OBJECTIVES: 1. Get hands on experience with Assembly Language Programming 2. Write and debug programs in TASM/MASM EXPERIMENT WRITE UP AIM: Assembly language program for 16 bit BCD addition LEARNING OBJECTIVES: 1. Get hands on experience with Assembly Language Programming 2. Write and debug programs in TASM/MASM TOOLS/SOFTWARE

More information

Tutorial Letter 103/3/2012 Computer Organization COS2621 Semesters 1 & 2

Tutorial Letter 103/3/2012 Computer Organization COS2621 Semesters 1 & 2 COS2621/103/3/2012 Tutorial Letter 103/3/2012 Computer Organization COS2621 Semesters 1 & 2 School of Computing Solutions to self tests Bar code 2 Self-test A Question 1 Alternative 1 Which one of the

More information

6/17/2011. Introduction. Chapter Objectives Upon completion of this chapter, you will be able to:

6/17/2011. Introduction. Chapter Objectives Upon completion of this chapter, you will be able to: Chapter 2: The Microprocessor and its Architecture Chapter 2: The Microprocessor and its Architecture Chapter 2: The Microprocessor and its Architecture Introduction This chapter presents the microprocessor

More information

An Interrupt is either a Hardware generated CALL (externally derived from a hardware signal)

An Interrupt is either a Hardware generated CALL (externally derived from a hardware signal) An Interrupt is either a Hardware generated CALL (externally derived from a hardware signal) OR A Software-generated CALL (internally derived from the execution of an instruction or by some other internal

More information

Chapter 2: The Microprocessor and its Architecture

Chapter 2: The Microprocessor and its Architecture Chapter 2: The Microprocessor and its Architecture Chapter 2: The Microprocessor and its Architecture Chapter 2: The Microprocessor and its Architecture Introduction This chapter presents the microprocessor

More information

SPRING TERM BM 310E MICROPROCESSORS LABORATORY PRELIMINARY STUDY

SPRING TERM BM 310E MICROPROCESSORS LABORATORY PRELIMINARY STUDY BACKGROUND 8086 CPU has 8 general purpose registers listed below: AX - the accumulator register (divided into AH / AL): 1. Generates shortest machine code 2. Arithmetic, logic and data transfer 3. One

More information

8086 INTERNAL ARCHITECTURE

8086 INTERNAL ARCHITECTURE 8086 INTERNAL ARCHITECTURE Segment 2 Intel 8086 Microprocessor The 8086 CPU is divided into two independent functional parts: a) The Bus interface unit (BIU) b) Execution Unit (EU) Dividing the work between

More information

CPMPPG1.WS4 (= "CP/M-86 Plus Programmers's Guide", section 1) CP/M-86 Plus -- Programmer's Guide

CPMPPG1.WS4 (= CP/M-86 Plus Programmers's Guide, section 1) CP/M-86 Plus -- Programmer's Guide CPMPPG1.WS4 (= "CP/M-86 Plus Programmers's Guide", section 1) ----------- CP/M-86 Plus -- Programmer's Guide ---------------------------------- (Edited by Emmanuel ROCHE.) Section 1: CP/M-86 Plus system

More information

The registers(di,si) are automatically incremented or decremented depending on the value of the direction flag:

The registers(di,si) are automatically incremented or decremented depending on the value of the direction flag: String Instructions String instructions were designed to operate on large data structures. The SI and DI registers are used as pointers to the data structures being accessed or manipulated. The operation

More information

Operating Systems. Project #2: System Calls

Operating Systems. Project #2: System Calls Operating Systems Project #2: System Calls Project #2: System Calls Objective Background Getting Started Using BIOS Routines Printing to the Screen via the BIOS (Interrupt 0x10) Reading from the Keyboard

More information

Microprocessors & Assembly Language Lab 1 (Introduction to 8086 Programming)

Microprocessors & Assembly Language Lab 1 (Introduction to 8086 Programming) Microprocessors & Assembly Language Lab 1 (Introduction to 8086 Programming) Learning any imperative programming language involves mastering a number of common concepts: Variables: declaration/definition

More information

The Purpose of Interrupt

The Purpose of Interrupt Interrupts 3 Introduction In this chapter, the coverage of basic I/O and programmable peripheral interfaces is expanded by examining a technique called interrupt-processed I/O. An interrupt is a hardware-initiated

More information

Table 1 - GET CONFIGURATION Command Descriptor Block

Table 1 - GET CONFIGURATION Command Descriptor Block Doc Number: T0/97-263r0 TO: T0 Membership From: Ron Roberts RE: Get Configuration Command Date: 0/22/97 0.. GET CONFIGURATION Command This command is intended to provide information to the initiator about

More information

Assembly Language Each statement in an assembly language program consists of four parts or fields.

Assembly Language Each statement in an assembly language program consists of four parts or fields. Chapter 3: Addressing Modes Assembly Language Each statement in an assembly language program consists of four parts or fields. The leftmost field is called the label. - used to identify the name of a memory

More information

Processes, Coroutines, and Concurrency Chapter 19

Processes, Coroutines, and Concurrency Chapter 19 Thi d t t d ith F M k 4 0 2 Processes, Coroutines, and Concurrency Chapter 19 When most people speak of multitasking, they usually mean the ability to run several different application programs concurrently

More information

Error num: 1 Meaning: Not owner Error num: 2 Meaning: No such file or directory Error num: 3 Meaning: No such process Error num: 4 Meaning:

Error num: 1 Meaning: Not owner Error num: 2 Meaning: No such file or directory Error num: 3 Meaning: No such process Error num: 4 Meaning: Error num: 1 Meaning: Not owner Error num: 2 Meaning: No such file or directory Error num: 3 Meaning: No such process Error num: 4 Meaning: Interrupted system call Error num: 5 Meaning: I/O error Error

More information

Assembly Language for Intel-Based Computers, 4 th Edition

Assembly Language for Intel-Based Computers, 4 th Edition Assembly Language for Intel-Based Computers, 4 th Edition Kip R. Irvine Chapter 3: Assembly Language Fundamentals Assembling, Linking and Running Programs Example Programs Slides prepared by Kip R. Irvine

More information

INSTRUCTOR: ABDULMUTTALIB A. H. ALDOURI

INSTRUCTOR: ABDULMUTTALIB A. H. ALDOURI Note: PUSHF / POPF have no operands The figure below shows that if (SS) = 3000H, (SP) = 0042H, so the execution of POP CX loads CX by the word 4050H form the stack segment. The SP is incremented by 2.

More information

Experiment N o 8. String Handling Instructions

Experiment N o 8. String Handling Instructions Experiment N o 8 String Handling Instructions Introduction: In this experiment you will deal with string handling instructions, such as reading a string, moving a string from one memory location to another,

More information

Computer Systems. Assembly Language for x86 Processors 6th Edition, Kip Irvine

Computer Systems. Assembly Language for x86 Processors 6th Edition, Kip Irvine Computer Systems Assembly Language for x86 Processors 6th Edition, Kip Irvine Chapter 15: Disk Fundamentals Yonsei University Department of Computer Science Jaekyung Kim(kimjk@cs.yonsei.ac.kr) (c) Pearson

More information

1. Introduction to Assembly Language

1. Introduction to Assembly Language www.vchowk.com 1. Introduction to Assembly Language Solved EXERCISE 1 Note: Dear fellows I tried my best to solve this exercise questions if there s any mistake or doubt in any question correct it and

More information

COS 318: Operating Systems. Overview. Prof. Margaret Martonosi Computer Science Department Princeton University

COS 318: Operating Systems. Overview. Prof. Margaret Martonosi Computer Science Department Princeton University COS 318: Operating Systems Overview Prof. Margaret Martonosi Computer Science Department Princeton University http://www.cs.princeton.edu/courses/archive/fall11/cos318/ Announcements Precepts: Tue (Tonight)!

More information

MODE (mod) FIELD CODES. mod MEMORY MODE: 8-BIT DISPLACEMENT MEMORY MODE: 16- OR 32- BIT DISPLACEMENT REGISTER MODE

MODE (mod) FIELD CODES. mod MEMORY MODE: 8-BIT DISPLACEMENT MEMORY MODE: 16- OR 32- BIT DISPLACEMENT REGISTER MODE EXERCISE 9. Determine the mod bits from Figure 7-24 and write them in Table 7-7. MODE (mod) FIELD CODES mod 00 01 10 DESCRIPTION MEMORY MODE: NO DISPLACEMENT FOLLOWS MEMORY MODE: 8-BIT DISPLACEMENT MEMORY

More information

UNIT 2 PROCESSORS ORGANIZATION CONT.

UNIT 2 PROCESSORS ORGANIZATION CONT. UNIT 2 PROCESSORS ORGANIZATION CONT. Types of Operand Addresses Numbers Integer/floating point Characters ASCII etc. Logical Data Bits or flags x86 Data Types Operands in 8 bit -Byte 16 bit- word 32 bit-

More information

Lecture 5: Computer Organization Instruction Execution. Computer Organization Block Diagram. Components. General Purpose Registers.

Lecture 5: Computer Organization Instruction Execution. Computer Organization Block Diagram. Components. General Purpose Registers. Lecture 5: Computer Organization Instruction Execution Computer Organization Addressing Buses Fetch-Execute Cycle Computer Organization CPU Control Unit U Input Output Memory Components Control Unit fetches

More information

Hong Kong Polytechnic University Department of Electronic and Information Engineering. Experiment On DOS File system

Hong Kong Polytechnic University Department of Electronic and Information Engineering. Experiment On DOS File system DOSFS/CC/v1 Hong Kong Polytechnic University Department of Electronic and Information Engineering Experiment On DOS File system Objectives : To study how an OS manages its file system in a floppy disk.

More information

Philadelphia University Student Name: Student Number:

Philadelphia University Student Name: Student Number: Philadelphia University Student Name: Student Number: Faculty of Engineering Serial Number: Final Exam, Second Semester: 2016/2017 Dept. of Computer Engineering Course Title: Microprocessors Date: 12/06/2017

More information

EC 333 Microprocessor and Interfacing Techniques (3+1)

EC 333 Microprocessor and Interfacing Techniques (3+1) EC 333 Microprocessor and Interfacing Techniques (3+1) Lecture 7 8086/88 Microprocessor Programming (Data Movement Instructions) Dr Hashim Ali Spring 2018 Department of Computer Science and Engineering

More information

Virus.Dos.Honey.666 Report

Virus.Dos.Honey.666 Report Virus.Dos.Honey.666 Report Feng Zhu (fzhu001@fiu.edu), Jinpeng Wei (weijp@cs.fiu.edu) 1 Malware General Information Malware Name: Virus.Dos.Honey.666 named by Kaspersky File size: 1698 bytes File type:

More information

Certified Ethical Hacker. Module 25 Writing Virus Codes

Certified Ethical Hacker. Module 25 Writing Virus Codes Certified Ethical Hacker Module 25 Writing Virus Codes Module Objective This module will familiarize you with the following: Introduction of viruses Prerequisites for virus writing Tools required for virus

More information

INT 21H and INT 10H Programming and Macros

INT 21H and INT 10H Programming and Macros Dec Hex Bin 4 4 00000100 ORG ; FOUR INT 21H and INT 10H Programming and Macros OBJECTIVES this chapter enables the student to: Use INT 10H function calls to: Clear the screen. Set the cursor position.

More information

Lecture (02) The Microprocessor and Its Architecture By: Dr. Ahmed ElShafee

Lecture (02) The Microprocessor and Its Architecture By: Dr. Ahmed ElShafee Lecture (02) The Microprocessor and Its Architecture By: Dr. Ahmed ElShafee ١ INTERNAL MICROPROCESSOR ARCHITECTURE Before a program is written or instruction investigated, internal configuration of the

More information

INT 13 command: SCSI Pass Through Proposal

INT 13 command: SCSI Pass Through Proposal INT 13 command: SCSI Pass Through Proposal 8/25/2000 To: T13 Membership From: Ron Roberts, Adaptec Corp. Subject: EDD 3.0 comment Referencing the EDD specification, Rev 3.0 Feb 18, 2000 section 6.11, the

More information

Chapter 3: Addressing Modes

Chapter 3: Addressing Modes Chapter 3: Addressing Modes Chapter 3 Addressing Modes Note: Adapted from (Author Slides) Instructor: Prof. Dr. Khalid A. Darabkh 2 Introduction Efficient software development for the microprocessor requires

More information

EXPERIMENT NINE DEVELOPING MACRO SEQUENCES

EXPERIMENT NINE DEVELOPING MACRO SEQUENCES EXPERIMENT NINE DEVELOPING MACRO SEQUENCES INTRODUCTION Although not essential to programming, macro sequences relieve the programmer of retyping the same instructions and also allow additional instructions

More information

Q1: Multiple choice / 20 Q2: Memory addressing / 40 Q3: Assembly language / 40 TOTAL SCORE / 100

Q1: Multiple choice / 20 Q2: Memory addressing / 40 Q3: Assembly language / 40 TOTAL SCORE / 100 16.317: Microprocessor-Based Systems I Fall 2012 Exam 1 October 3, 2012 Name: ID #: For this exam, you may use a calculator and one 8.5 x 11 double-sided page of notes. All other electronic devices (e.g.,

More information

Week /8086 Microprocessor Programming II

Week /8086 Microprocessor Programming II Week 5 8088/8086 Microprocessor Programming II Quick Review Shift & Rotate C Target register or memory SHL/SAL 0 C SHR 0 SAR C Sign Bit 2 Examples Examples Ex. Ex. Ex. SHL dest, 1; SHL dest,cl; SHL dest,

More information

Addressing Modes on the x86

Addressing Modes on the x86 Addressing Modes on the x86 register addressing mode mov ax, ax, mov ax, bx mov ax, cx mov ax, dx constant addressing mode mov ax, 25 mov bx, 195 mov cx, 2056 mov dx, 1000 accessing data in memory There

More information

Computer Processors. Part 2. Components of a Processor. Execution Unit The ALU. Execution Unit. The Brains of the Box. Processors. Execution Unit (EU)

Computer Processors. Part 2. Components of a Processor. Execution Unit The ALU. Execution Unit. The Brains of the Box. Processors. Execution Unit (EU) Part 2 Computer Processors Processors The Brains of the Box Computer Processors Components of a Processor The Central Processing Unit (CPU) is the most complex part of a computer In fact, it is the computer

More information

Week /8086 Microprocessor Programming I

Week /8086 Microprocessor Programming I Week 4 8088/8086 Microprocessor Programming I Example. The PC Typewriter Write an 80x86 program to input keystrokes from the PC s keyboard and display the characters on the system monitor. Pressing any

More information

EC 333 Microprocessor and Interfacing Techniques (3+1)

EC 333 Microprocessor and Interfacing Techniques (3+1) EC 333 Microprocessor and Interfacing Techniques (3+1) Lecture 6 8086/88 Microprocessor Programming (Arithmetic Instructions) Dr Hashim Ali Fall 2018 Department of Computer Science and Engineering HITEC

More information

Contents. Error Message Descriptions... 7

Contents. Error Message Descriptions... 7 2 Contents Error Message Descriptions.................................. 7 3 4 About This Manual This Unify DataServer: Error Messages manual lists the errors that can be produced by the Unify DataServer

More information

Question: How to generate.com file? Answer: For BorlandC 3.1: 1- copy myfile.c into BIN folder of BORLANDC. 2- From command prompt goto BIN

Question: How to generate.com file? Answer: For BorlandC 3.1: 1- copy myfile.c into BIN folder of BORLANDC. 2- From command prompt goto BIN Question: How to generate.com file? Answer: For BorlandC 3.1: 1- copy myfile.c into BIN folder of BORLANDC. 2- From command prompt goto BIN directory. You will see C:\BORLANDC\BIN> at command prompt. 3-

More information