: .36 . DL (0 - , 1 - A, 2 - B ..): MOV AH,36H ; MOV DL,0 ; INT 21H ; DOS AX .FFFF, : AX BX CX DX DOS 2.0 .1B ( FAT). : .41 ( " ") .41. DX ASCIIZ , : MOV AH,41H ; LEA DX,PATHNAM ; ASCIIZ- INT 21H ; DOS AX 02 ( ) 05 ( ). : .42 DOS , 0 1 . .42, . BX CX:DX . 65.535 CX 0, DX - . AL , : 0 - . IBM PC. 17. 9 1 - , , . 2 - . ( ) , CX:DX 0 2 AL. 1024 : MOV AH,42H ; MOV AL,00 ; LEA BX,HANDLE1 ; MOV CX,00 ; MOV DX,1024 ; 1024 INT 21H ; DOS JC error CF DX:AX. CF 1 AX 01 ( ) 06 ( ). : .43 .43H. DX ASCIIZ . AL 00. AL 01, CX - . : MOV AH,43H ; MOV AL,01 ; MOV CX,00 ; LEA DX,PATHNM2 ; ASCIIZ- INT 21H ; DOS CX. CX. AX 02, 03 05. : .47 .47. , DX. DL : 0 - , 1 - A, 2 - B .. IBM PC. 17. 10 ( ), , : ASSEMBLE\EXAMPLES (.00) . - .00. . .17.5 . : .4E .4F . 11 12 DOS. 4E , 4F - . DX ASCIIZ-, . ? *. CX (, , ). MOV AH,4EH ; MOV CX,00H ; LEA DX,PATHNM1 ; ASCIIZ- INT 21H ; DOS , , DTA FCB : 00 - DOS 21 - 22 - 24 - 26 - : , 30 - 13- ASCIIZ , .00. AX 02 ( ) 18 ( ). ( .4E) 4F. DTA. MOV AH,4FH ; INT 21H ; DOS AX - 18 ( ). CF. : . 56 IBM PC. 17. 11 .56. DX ASCIIZ- , , , , DI ( ES:DI) - ASCIIZ-, , , . , . , , . MOV AH,56H ; LEA DX,oldstring ; DS:DX LEA DI,newstring ; ES:DI INT 21H ; DOS AX 03 ( ), 05 ( ?) 17 ( ). DOS, , (.39), (.3A), (. 3B), - (.44), (.45), (.46), ? (.54). ------------------------------------------------------------ - DOS ASCIIZ- , , .00. - , . - CF AX. - , , - . - , , , . ------------------------------------------------------------ 17.1. " " " " ? 17.2. ASCIIZ- PATH1 CUST.LST C. 17.3. (.17.2) ) CUSTHAN , ) , ) CUSTOUT (128 ) ) . . IBM PC. 17. 12 17.4. (.17.3) ) ) CUSTIN. . 17.5. , ? 17.6. .17.4 , , . , .. Return. IBM PC. 18. 1  18. IV: BIOS ----------------------------------------------------------- IV: BIOS : BIOS . ----------------------------------------------------------- BIOS, BIOS / . BIOS INT 13H "", , . , : AH : , , . AL . CH . CL . DH () : 0 1 . DL : 0=A, 1=B .. ES:BX / ( ). BIOS ----------------------------------------------------------- INT 13H AH . AH = 00: INT 13H AH .00. , . AH = 01: AL / (. ). 01 AH. AH = 02: . 1, 8 9. BX, , IBM PC. 18. 2 EX, ES:BX. INSECT, , : MOV AH,02 ; MOV AL,01 ; LEA BX,INSERT ; ES:BX MOV CH,05 ; 05 MOV CL,03 ; 03 MOV DH,00 ; () 00 MOV DL,01 ; 01 (B) INT 13H ; BIOS AL. DS, BX, CX DX . . CH CL. , , 01, 1 0 1 ( ). AH = 03: ( 512 512) . ( 02). AL , . DX, BX, CX DX . AH = 04: , , . ( 03) , /. - ( 03), - ES:BX - . AL . - DX, BX, CX DX . AH = 05: ( PC - 512). . IBM PC. 18. 3 ES:BX , . T/H/S|B, T , H , S , B , (00-128, 01-256, 02-512, 03-1024). , 03 , 00 512 , .03000102 . AT BIOS. ------------------------------------------------------------ (02, 03, 04 05) CF AH 0. CF 1, AH , . AL 01. AH 0000 0001 0000 0010 0000 0011 0000 0100 0000 1000 DMA ( ) 0000 1001 64K 0001 0000 0010 0000 0100 0000 () 1000 0000 , (AH=00) . , . : BIOS ------------------------------------------------------------ , .18.1, BIOS INT 13H . , .16.3, : 1. FCB . IBM PC. 18. 4 2. . . 10 C10ADDR 01. = 1, ; : 0 1 1 0. 3. CURADR ( ), ENDADR - . - . DEBUG. , , FAT ( FAT ). G () FAT . ------------------------------------------------------------ ------------------------------------------------------------ .18.1. BIOS . , DEBUG ASCII- . , DEBUG (. .14.5). ( ""), . , DOS , . , BIOS INT 13H . ------------------------------------------------------------ - BIOS INT 13 . - BIOS INT 13 , , . - , . - BIOS. ------------------------------------------------------------ IBM PC. 18. 5 18.1. . 18.2. . 18.3. BIOS INT 13H, INDISK, A, 0, 6 3. 18.4. BIOS INT 13H, OUTDISK, B, 0, 8 1. 18.5. 18.4, ? 18.6. 18.4 ( ). IBM PC. 19 1  19.  ------------------------------------------------------------ : (). ------------------------------------------------------------ . , DOS INT 21H BIOS INT 17H. , , " ", " " " ". . , . , , , , , - . "" , . 10,12 15 , , , . , . . IBM PC , . , , . , . (). "" , , , . , "" , "". - . ------------------------------------------------------------ : . . IBM PC. 19 2 08 08 09 09 10 0A 11 0B 12 0C 13 0D . (. 09) , , . . . (.OA) . . . . 11 . , . , . (, 55 ) (.OC) , , 0 1. " " " " , . " " . DOS ------------------------------------------------------------ DOS 2.0 , . DOS .40 04. 25 HEADG: HEADG DB 'Industrial Bicycle Mfrs', 0DH, 0AH ... MOV AH,40H ; MOV BX,04 ; MOV CX,25 ; 25 LEA DX,HEADG ; INT 21H ; DOS IBM PC. 19 3 CF AX. : ------------------------------------------------------------ , .19.1, .9.1, , , . : List of Employee Names Page 01 Clancy Alderson Ianet Brown David Christie ... . : D10INPT . E10PRNT ( ); M10PAGE. M10PAGE , , . P100UT . , . M10PAGE , PAGECTR 01 ( ). PAGECTR PAGECTR DB '01' , . M10PAGE , PAGECTR 01 ( ). PAGECTR PAGECTR DB '01' ASCII - . 3031. M10PAGE PAGECTR 1 , 3032, 3033 .. 3039, 303A, , (:). , PAGECTR .3A, IBM PC. 19 4 .30, . .303A . 3130, .. 10 . ------------------------------------------------------------ ------------------------------------------------------------ .19.1. . ( ) , . ASCII- ------------------------------------------------------------ , , , , ( 09) , 8. , 8, 16, 24 .. , , . , , DOS PRINT, ASCII ( ) , . , , 8. , .19.2, , , . .17.3 ( ) . 0 7 8, 8 15 - 16 .. , , G10XFER G60. : : 1 9 21 : 00000001 00001001 00010101 : 00000000 00001000 00010000 8: 00001000 00010000 00011000 : 8 16 24 : 10PRMP . Return . E10OPEN . G10XFER , , , " " . . IBM PC. 19 5 P10PRNT . R10READ . " ", " " " " . (.OC) , , 62. ------------------------------------------------------------ ------------------------------------------------------------ .19.2. ASCII . " " ASCII , , . , 05 DOS. . . DOS ------------------------------------------------------------ DOS AH 05, DL , , INT 21H : MOV AH,05 ; MOV DL,char ; INT 21H ; DOS . , , , , . . SI HEADG, CX - . , P20, HEADG . HEADG - " ", - " ", . HEADG DB 0CH,'Industrial Bicycle Mfrs',0DH,0AH,0AH LEA SI,HEADG ; MOV CX,27 ; P20: MOV AH,05 ; IBM PC. 19 6 MOV DL,[SI] ; INT 21H ; DOS INC SI ; LOOP P20 , DOS "Out of pap er". . Ctrl/Break. ------------------------------------------------------------ , . : . . 15 0F 14 0E 18 12 20 14 , Esc (.IB). : 1B 30 8 1B 32 6 1B 45 1B 46 : 1. . , 8 , " " " ": HEADG DB 0FH, 1BH, 30H, 'Title...', 0DH, 0AH 2. : MOV AH,05 ; MOV DL,0FH ; INT 21H , , . IBM PC. 19 7 . . BIOS INT 17H ------------------------------------------------------------ BIOS INT 17H , AH: AH=0: 0,1 2 ( - 0). MOV AH,00 ; MOV AL,char ;, MOV DX,00 ; 0 INT 17H ; BIOS , AH 01. AH=1: : MOV AH,01 ; MOV DX,00 ; 0 INT 17H ; BIOS " ", " ". . AH=2: : MOV AH,02 ; MOV DX,00 ; 0 INT 17H ; BIOS TEST AH,00101001B; ? JNZ errormsg ; - AH=1 AH=2 . AH 1: 7 6 5 4 3 / 0 IBM PC. 19 8 , .90 10010000 - " " "" - . 5 ( 3 ( ). , .B0 10110000, " ". , BIOS , , . , . , . , BIOS , , , . ( DOS , "Out of paper" ). , . . . ------------------------------------------------------------ , . " " " " . DOS . BIOS . BIOS INT 17H . ------------------------------------------------------------ 19.1. DOS ) ; ) ; ) ; ) / (); ) . 19.2. DOS. IBM PC. 19 9 19.3. , : , , , ( ) . 19.4. 19.1 BIOS INT 17H. . 19.5. 19.1 , ), ), ) 5 . 19.6. .19.1 DOS. 19.7. .19.2 , . IBM PC. 20 18  20.  ------------------------------------------------------------ : . ------------------------------------------------------------ . Pascal C ( ) . , . MASM , . , MACRO, ,