. , , ,

,,,

,

1. 8- 2- - ISA.


ISA 6 IBM PC AT .

ISA ( ) 16- . 8- 16- . 16 (24 ). - 64 (16 ), 10 (1). , .

1.1. (.2).

: IOR, IOW, AEN, IRQ N.

IOR - -.

IOW -.

AEN ( ) , .

IRQ N .

ISA , , : 360h , 361h , 362h -.

(). (SA2-SA9). AEN. (SA0-SA1) (). IOR IOW.

(), (), - (/) - (/). 1.1. .


1.1.

/ ISA




/


/

SA0

0

1

0

0

SA1

0

0

1

1

I
OR

0

1

0

1

I
OW

1

0

1

0


() (SD0-SD7) (IOR).

() () , . / (/) , / /.

, / .

1.2.(.4).

15331, 15332 5551. , .

15333, - 4 16.

1.1. , .

15336, .

153322, / 153334.


2. , 166 , Multibus , . .


2.1 (.6). , .. , .

1. MULTIBUS, : IORC ; IOWC- . XACK.

() 2-9, SEL. (A0-A1) (). IOR IOW.

, 12, 1, 2, 5, .

() (0-7), SEL IORC.

.

RG1 RG2 .

12. ( 55510), 0-15 . 15335 0-5. .. , ( 15332) .

, , , .. INT N. .

0-15 , . 15335 0-5. .


3. , 8- () 378h, 5- () 37Ah 5- ( 3-7), 379h. ISA.


. 3.1.(.8).

, 1, : 378h- ; 379h ; 37h- .

, 3.1.

3.1.

/ ISA



SA0

0

0

1

SA1

0

1

0

I
OR

1

1

0

I
OW

0

0

1


15336.

153322, 55510.

, .

, BUSY ACK. (). IN, 379h. (), 0-4 SD0-SD4 ISA. OUT (378h). (). . OUT () 37h, () .


. BUSY, ACK, BUSY, ACK, .


4. , C7h, 1, MFM.


MFM .


. 4.1. MFM


, . , , .

, 4.1. . , . , , , , , .

, . , , , , .. .

, , .. . , .. . , .


5. ISA () Multibus () . .

5.1. (.11).

Isa Multibus, , . , 0-9 Multibus SA0-SA9 ISA (36036F).

Multibus (). ISA IRQ N .

() (), IRQ N ISA .


6. . , .

.model tiny ; , .

.code ;

org 100h ;. . - 100

; ---------------------------------------------------

start: call clear ;- .

;

mov cx,len1 ;

mov dh,10 ;

mov dl,27 ;

mov bp,offset mes1 ;

call symv ; .

;

call nklav ;.

call clsym ;

;

call clear ;- .

;

mov cx,len2 ;

mov dh,10 ;

mov dl,23 ;

mov bp,offset mes2 ;

call symv ; .

;

mov cx,len3 ;

mov dh,12 ;

mov dl,23 ;

mov bp,offset mes3 ;

call symv ; .

;

nrv2: call nklav ;.

;

cmp ah,02h ;

je nrv3 ;

cmp ah,03h ;

je nrv10 ;

call clsym ;

jmp nrv2 ;

nrv10: jmp nrv6 ;

;

nrv3: call clear ;- .

call clsym ;

;

mov cx,len4 ;

mov dh,0 ;

mov dl,10 ;

mov bp,offset mes4 ;

call symv ; .

;

mov ah,06h ;

mov al,0 ;

mov bh,2Fh ; - /-

mov ch,1 ; Y-

mov cl,0 ; -

mov dh,24 ; Y-

mov dl,79 ; -

int 10h ; BIOS

;

mov ah,02 ;

mov bh,0 ;

mov dh,1 ;

mov dl,0 ;

int 10h ;

; (buf1)

mov ah,3Fh ;

mov bx,0 ;

mov cx,100 ;

mov dx,offset buf1 ;

int 21h ;

;

mov lensym,ax ;

inc lensym ;


call nrv11 ; ACK,BUSY


mov si,0 ;

dlsh: dec lensym ;

mov al,offset buf1[si] ;

mov dx,378h ;

out dx,al ;

mov dx,1000 ;

call delay

mov dx,37Ah

mov al,00001001b

out dx,al ;

mov dx,1000

call delay

mov dx,37Ah

mov al,00001000b

out dx,al ;

cmp lensym,0

jz kon

inc si

call nrv11

jmp dlsh

;

kon: call nrv11

mov al,10

mov dx,1000

call delay

mov dx,378h

out dx,al

mov dx,1000

call delay

mov dx,37Ah

mov al,00001000b

out dx,al

mov dx,1000

call delay

mov dx,37Ah

mov al,00001001b

out dx,al

mov dx,10000

call delay

mov al,13

mov dx,378h

out dx,al

mov dx,10000

call delay

mov dx,37Ah

mov al,00001000b

out dx,al

mov dx,10000

call delay

mov dx,37Ah

mov al,00001001b

out dx,al

jmp nrv6

;

nrv6: mov ax,0003h

int 10h

;

call clsym

ret

;

; : - .---------------------------------

clear: mov ah,06h ;

mov al,0 ;

mov bh,1Fh ; - c/-

mov ch,0 ; Y-

mov cl,0 ; -

mov dh,24 ; Y-

mov dl,79 ; -

int 10h ; BIOS

ret

;. .-----------------------------------------

symv: mov ah,13h

mov al,0

mov bh,0

mov bl,1Fh

push ds

pop es

int 10h

ret

;. .------------------------------------------

nklav: lahf

or ah,01000000b

sahf

nrv1: mov ah,11h

int 16h

jz nrv1

ret

;. .---------------------------------------------

clsym: mov ax,0C00h

int 21h

ret

;. ----------------------------------------------------------------

delay: mov ah,86h

mov cx,0

int 15h

ret

;. ---------------------------------------------

nrv11: mov cx,1000

nrv112: push cx

mov dx,379h

in al,dx

mov ack,al

mov busy,al

and ack,40h

cmp ack,40h

jne nrv111

and busy,80h

cmp busy,80h

jne nrv111

nrv111: pop cx

loop nrv112

ret

;.---------------------------------------------------------------------

mes1 db ' - "PRINT"'

len1=$-mes1

mes2 db '1. .'

len2=$-mes2

mes3 db '2. .'

len3=$-mes3

mes4 db ' .'

len4=$-mes4

buf1 db 100 dup('*')

lensym dw 0

ack db ?

busy db ?

;----------------------------------------------------------------------------

end start


7. . .


.model tiny ; , .

.code ;

org 100h ;. . - 100

; ---------------------------------------------------

start: call clear ;- .

;

mov cx,len1 ;

mov dh,10 ;

mov dl,27 ;

mov bp,offset mes1 ;

call symv ; .

;

call nklav ;.

call clsym ;

;

call clear ;- .

;

mov cx,len2 ;

mov dh,10 ;

mov dl,23 ;

mov bp,offset mes2 ;

call symv ; .

;

mov cx,len3 ;

mov dh,12 ;

mov dl,23 ;

mov bp,offset mes3 ;

call symv ; .

;

nrv2: call nklav ;.

;

cmp ah,02h ;

je nrv3 ;

cmp ah,03h ;

je nrv10 ;

call clsym ;

jmp nrv2 ;

nrv10: jmp nrv6 ;

;

nrv3: call clear ;- .

call clsym ;

;

mov cx,len4 ;

mov dh,0 ;

mov dl,10 ;

mov bp,offset mes4 ;

call symv ; .

;

mov ah,06h ;

mov al,0 ;

mov bh,2Fh ; - /-

mov ch,1 ; Y-

mov cl,0 ; -

mov dh,24 ; Y-

mov dl,79 ; -

int 10h ; BIOS

;

mov ah,02

mov bh,0

mov dh,1

mov dl,0

int 10h

;

mov ah,3Fh

mov bx,0

mov cx,100

mov dx,offset buf1

int 21h

; 1

initcom1 proc

mov ax,40h

mov es,ax

mov dx,es:[0]

add dx,3

mov al,10000000b

out dx,al

dec dx

dec dx

mov al,0

out dx,al

dec dx

mov al,0C0h

out dx,al

ret

initcom1 endp

;

initrg proc

add dx,3

mov al,00000000b

or al,00000011b

or al,00000000b

or al,00000000b

out dx,al

inc dx

mov al,10h

out dx,al

sub dx,3

mov al,0

out dx,al

ret

initrg endp

; 1

check proc

try: mov dx,es:[0]

add dx,5

in al,dx

test al,1Eh

jz m0

lea dx,error

mov cx,len5

mov dh,10

mov dl,23

mov bp,offset mes5

call symv ; .

jmp exit

m03: test al,01h

jnz m4

test al,20h

jz try

ret

check endp

;

work proc

m4: mov ah,0

int 16h

push ax

push ax

mov dx,es:[0]

add dx,5

mov cx,10

m1: in al,dx

test al,20h

jz m2

loop m1

m2: sub dx,5

pop ax

out dx,al

add dx,5

m3: in al,dx

test al,1

jz m3

sub dx,5

in al,dx

mov ah,0Eh

int 10h

pop ax

cmp al,1Bh

jne m4

ret

work endp

;

exit: mov ax,4C00h

int 21h

nrv6: call clsym

ret

; : - .---------------------------------

clear: mov ah,06h ;

mov al,0 ;

mov bh,1Fh ; - c/-

mov ch,0 ; Y-

mov cl,0 ; -

mov dh,24 ; Y-

mov dl,79 ; -

int 10h ; BIOS

ret

;. .-----------------------------------------

symv: mov ah,13h

mov al,0

mov bh,0

mov bl,1Fh

push ds

pop es

int 10h

ret

;. .------------------------------------------

nklav: lahf

or ah,01000000b

sahf

nrv1: mov ah,11h

int 16h

jz nrv1

ret

;. .---------------------------------------------

clsym: mov ax,0C00h

int 21h

ret

;. ----------------------------------------------------------------

delay: mov ah,86h

mov cx,0

int 15h

ret

;

;.---------------------------------------------------------------------

mes1 db ' - "COM"'

len1=$-mes1

mes2 db '1. -.'

len2=$-mes2

mes3 db '2. .'

len3=$-mes3

mes4 db ' - .'

len4=$-mes4

buf1 db 100 dup('*')

mes5 db ' 1',7,0Dh,0Ah,S

len5=$-mes5

;----------------------------------------------------------------------------

end start



1. 8- 2- - ISA. ISA

 

 

 

! , , , .
. , :