" 0. . ;--- "" MOV DX,3B4H ; 6845 MOV AL,10 ; 6845 OUT DX,AL ; MOV AL,0 ; " " 0 INC DX ; OUT DX,AL ; " " ;--- " " MOV AL,11 ; 11 DEC DX ; OUT DX,AL ; MOV AL,7 ; " " 7 INC DX ; OUT DX,AL ; " " 4.2.5 // . , , . BIOS. 2- , 0040:0050. 0, - 1 .. , - . , , . . CRSLIN , POS - . POS , .. POS(0). , - . , INPUT [4.2.3]. 100 ROW = CRSLIN ' 110 COL = POS(0) ' 120 LOCATE 25,1 ' 130 INPUT "Enter file name", F$ ' 140 LOCATE ROW,COL,1 ' . 3 10H DH, - DL. BH ( 0 ). ;--- MOV AH,3 ; MOV BH,0 ; 0 INT 10H ;: DH:DL MS DOS Esc- . , "" . - . - - Esc[s, - - Esc[u. . ;--- SAVE_CURSOR DB 27,'[s$' RESTORE_CURSOR DB 27,'[u$' ;--- LEA DX,SAVE_CURSOR ; DX MOV AH,9 ; INT 21H ; ;--- LEA DX,RESTORE_CURSOR ; DX MOV AH,9 ; INT 21H ; . 14 15 6845 - , [4.1.1]. 14. 0 1999 80 0 999 40 . - . , . , - , - . , BIOS , - [4.5.3]. 14 15 - , , - BIOS. 4.2.6 . , , . [4.2.4] [4.2.3]. , - [4.3.1]. "" , - . "" . - , . - - ASCII 112. - , . 128 , , 128, . - ( ASCII 1). , , - - , , - ASCII 17 27. , , - . . . CURSORPOSITION , . 0 3998. - 1 - 112 . - FORMERATTRIBUTE , . 500 ''' . 560 IF EXTENDEDCODE = 77 THEN GOSUB 5000 ' 5000 ''' 5010 POKE CURSORPOSITION+1,FORMERATTRIBUTE '. 5020 CURSORPOSITION = CURSORPOSITION+2 ' 5030 FORMERATTRIBUTE = PEEK(CURSORPOSITION+1) '. 5040 POKE CURSORPOSITION+1,112 ' 5050 RETURN ' . : ;--- CURSOR_RIGHT: MOV BX,CURSORPOSITION ; INC BX ; MOV AL,FORMERATTRIBUTE ; MOV ES:[BX],AL ; INC BX ; MOV CURSORPOSITION,BX ; MOV AL,ES:[BX]+1 ; MOV FORMERATTRIBUTE,AL ; MOV AL,112 ; MOV ES:[BX]+1,AL ;  3. . . , , . , , . . , , , ASCII - ; . - , . , , , , . IBM , , . IBM , . 4.3.1 . BIOS DOS ( ) . , 80- [4.2.2]. - , , . , , . , , . B000:0000 B800:0000 - - PCjr. EGA - . ( ) ASCII , - - . . 4-2 . [4.2.3]. , . . , , PRINT WRITE. , PRINT; WRITE - - , . PRINT - . , - , , PRINT S$ PRINT X. , ( ) PRINT, , PRINT "This words are printed". - , ASCII, PRINT CHR$, , PRINT CHR$(65), A ( ASCII #65). PRINT , . . , - . , , (, PRINT - , WRITE ). PRINT - , . - PRINT , , PRINT S$;. - LOCATE. LOCATE PRINT , . - PRINT , 24- , , PRINT 24- . PRINT 25- LOCATE; . - PRINT . - 24 25. - , . [7.1.9] - PRINT . , CHR$(13), . PRINT "One"+CHR$(13)+"Two"+CHR$(13)+"Three", - . ASCII 28-31 , , . PRINT , , PRINT . . - , - . &HB000, POKE . , . 80- 160 (2 ). , . - PRINT, - . , - 24 25, . PRINT: 10 CLS: KEY OFF ' 20 DEF SEG = &HB000 ' 30 LOCATE 1,1: PRINT CHR$(201) ' 40 LOCATE 1,80: PRINT CHR$(187) ' 50 LOCATE 1,24: PRINT CHR$(186) ' 60 LOCATE 1,25: PRINT CHR$(200) ' 70 POKE 3838,186 ' 80 24 80 POKE 3998,188 ' 80 25 90 FOR N=2 TO 79 ' 100 LOCATE 1,N: PRINT CHR$(205);: LOCATE 25,N: PRINT CHR$(205) 110 NEXT ' 120 FOR N=2 TO 23 ' 130 LOCATE N,1: PRINT CHR$(186): LOCATE N,80: PRINT CHR$(186) 140 NEXT : 10 CLS: KEY OFF ' 20 DEF SEG = &HB000 ' 30 POKE 0,201 ' 40 POKE 158,187 ' 50 POKE 3840,200 ' 60 POKE 3998,188 ' 70 FOR N=2 TO 156 STEP 2 ' 80 POKE N,205: POKE N+3840,205 ' , 90 NEXT 100 FOR N=160 TO 3680 STEP 160 ' 110 POKE N,186: POKE N+158,186 ' 120 NEXT . - BIOS DOS. , , , , , ( BackSpace, , ). : 10H: 9 A E "" ( ) 21H: 2 6 9 9 A 10H - . DOS , . E 10H - , ASCII 9. ASCII 7 ASCII 8 (BackSpace) ASCII 9 ASCII 10 ASCII 13 10H . 9 , A - , - . AL , BL - . - BH. - , - . , - 0. BIOS , , - CX. CX 1, , - . , , - . - , - . ;--- MOV AH,9 ; MOV AL,THE_CHARACTER ; AL MOV BL,112 ; BL MOV BH,0 ; 1 MOV CX,1 ; INT 10H , CX BIOS , . - E. , A, CX. AL . - BL - , . ;--- MOV AH,0EH ; MOV BH,0 ; LEA BX,STRING ;BX NEXT_CHAR: MOV AL,[BX] ; AL CMP AL,'$' ; JE ALL_DONE ; , INT 10H ; INC BX ; JMP SHORT NEXT_CHAR ; ALL_DONE: DOS 21H , , - . DOS - , 5 10H [4.5.3]. , - 2 6. Ctrl-Break [3.2.8], - . ( Ctrl-Break, Ctrl-Break , - , ). , , ANSI.SYS [4.1.3]. DL, AH 21H. 6 , . DL FF [3.1.5]. - DL. 6 ( [3.1.4] - , ). MOV AH,6 ; NEXT: MOV DL,0FFH ; INT 21H ; JZ NEXT ; , CMP AL,13 ; ? JE END_INPUT ; , MOV DL,AL ; DL INT 21H ; JMP SHORT NEXT ; . . , - , IBM - . , , MOVSB, . , - . , . 16K 32K BIOS . , . [4.2.1] - [4.2.6]. ;--- SAMPLE_STRING DB 'PRINT THIS STRING$' ;--- MOV AX,0B000H ; MOV ES,AX ; LEA BX,SAMPLE_STRING ;BX MOV DI,CURSOR_START ; NEXT: MOV AL,[BX] ; CMP AL,'$' ; JE ALL_DONE ; , MOV ES:[DI],AL ; INC DI ; 2 INC DI ; INC BX ; - JMP SHORT NEXT ; ALL_DONE: PCjr ( EGA) , . - , . - " " (all clear) . 3DAH. 0 1, . (3DAH - , PCjr ; , , - .) ;--- MOV DX,3DAH ; CHECK_AGAIN: IN AL,DX ; TEST AL,1 ; JNE CHECK_AGAIN ; 0, ;--- LEA BX,MESSAGE ; MOV DI,2000 ; MOV AH,01000001B ; NEXT_CHAR: MOV AL,[BX] ; CMP AL,'$' ; JE ALL_DONE ; , MOV ES:[DI],AX ; INC BX ; INC DI ; INC DI ; JMP SHORT NEXT_CHAR ; ALL_DONE: . , , , . PCjr , , - , . , . 4.3.2 . , - , . , (, ..) , . AT BIOS , MS DOS . BIOS . , - . - , EGA , ROM-BIOS . IBM PC XT . . , . PRINT S$, S$ 255 , . - 10 , : ASCII 7 ASCII 9 ASCII 10 ASCII 11 (Home) ASCII 12 ( + Home) ASCII 13 ASCII 28 ASCII 29 ASCII 30 ASCII 31 . . 9 21H . DS:DX - . $, , $ . . ; 0AH ( ) 0DH ( ). ;--- FIRST_STRING DB 'This is the first string',0AH,0DH,'$' SECOND_STRING DB 'And this is the second string$' ;--- MOV AH,9 ; LEA DX,FIRST_STRING ; INT 21H ; LEA DX,SECOND_STRING ; INT 21H ; : ASCII 7 ASCII 8 (BackSpace) ASCII 9 ASCII 10 ASCII 13 DOS 40H 21H . , , -; . . , - . #1. BX, CX. DS:DX . ( ) . , "" , . : ;--- 1000 MOV AH,40H ; MOV BX,1 ; LEA DX,STRING ; MOV CX,1000 ; INT 21H ; MS DOS Esc-, . 9 21H, , , . - . , Esc-- - . , . AT , EGA, 13H 10H - . ES:BP , CX. DX , ( , ). BX . 0 3, - AL . AL = 0 , AL = 1 , AL = 2 , AL = 3 AL 0 1, BL. . - , , , . . $ 9 - . - , . ( [1.2.3] ), [4.3.1]. - , , ASCII 0, $. , . , - MS DOS. 4.3.3 . - . "" . , - (, ) . , . BIOS - ; [4.3.1]. 0 39 (1,40 ) 80 (0*160) (39*2) . . [4.5.3]. , - . . SCREEN ( SCREEN ). SCREEN 5,10 ASCII , 5, 10 ( 1). 1, , SCREEN 5,10,1. 0, () . 0 255. , , . ATTRIBUTE MOD 16. , (((ATTIBUTE - FOREGROUND)/16) MOD 128). 127, (, , [4.1.3]). . . 8 10H . BH ( 0 0 - ). AL, AH. , , AH. [4.3.4]. 0,39 - 2 : ;--- MOV AH,2 ; MOV DH,0 ; MOV DL,39 ; MOV BH,0 ; INT 10H ; ;--- MOV AH,8 ; / MOV BH,2 ; INT 10H ; AH:AL . . . 7,39 2 : ;--- 7,39 2 MOV AX,0B800H ; MOV ES,AX ;ES MOV DI,1000H ; MOV AL,80 ; 160 MOV BL,7 ; MUL BL ; AX (-1)*160 MOV AX,39 ; ADD BX,AX ; SHL BX,1 ; MOV AX,ES:[BX][DI] ; AH:AL / 4.3.4 . , . 128 , , PCjr - 256, EGA - 1024 512. ROM-BIOS 128 ASCII ( 0 127). 128 , , - . , MS DOS 3.00 GRAFTABL, 128 . PCjr 128 . EGA 200 - 350 . PCjr 8*8 . . , , ( 7) - . 1, . . . 4-3 8 . 128 1024 , , . ( [1.2.0]) - , .. 128. 128, . 129, , .. 1FH 0000:007C. ( ), - (, ). , , ; , , , . , ASCII 128-255 [4.3.5]. PCjr 1FH 128 ASCII, 44H - . , 256 , . EGA , . - (8*8 8*14) EGA 2 . , - 0. , EGA . , . , 8*8 8*256 2048 . , 3 . 0-3 , 3C5H. 3 3C4H, . 1-0 , 3 0, 3-2 - , 3 1. , 3 . 0. . , . . , - , - . , - ; , - CLEAR , . . 128 . DATA - , . 255, 129; 1, 1 . , . . 100 ''' , &H3000 110 DATA 255, 129, 129, 129, 129, 129, 129, 255 120 DEF SEG = &H3000 ' 130 FOR N = 0 TO 7 ' 8 140 READ Q ' 1 150 POKE N,Q ' 160 NEXT ' .. 170 ''' 180 DEF SEG = 0 ' 190 POKE 124,0 ' 200 POKE 125,0 ' 210 POKE 126,0 ' 220 POKE 127,&H30 ' 230 ''' 240 LOCATE 12,12: PRINT CHR$(128) ' 128 . PCjr 25H - 21H 1FH. DS:DX . . [1.2.3]. - 128 129. , . ;--- CHARACTER_DATA DB 11111111B, 10000000B, 10000000B, 10000000B DB 10000000B, 10000000B, 10000000B, 11111111B DB 11111111B, 00000001B, 00000001B, 00000001B DB 00000001B, 00000001B, 00000001B, 11111111B ;--- PUSH DS ; DS LEA DX,CHAR_DATA ; DX MOV AX,SEG CHAR_DATA ; DS MOV DS,AX ; MOV AH,25H ;