home *** CD-ROM | disk | FTP | other *** search
- title MPUREST
- page 64,132
-
- code segment 'code'
- assume cs:code,ds:code,es:code
-
- org 100h
-
- ; -------
- ; resetmpu - Reset MPU
-
- resetmpu:call waitrcv
- cli
- mov dx,0331h
- mov al,0ffh
- out dx,al
-
- call waitrcv
- dec dx
- in al,dx
- sti
- mov ax,4c00h
- int 21h
-
- ; -------
- ; waitrcv - Wait For MPU Receive Ready
-
- waitrcv: push ax
- push dx
- mov dx,0331h
-
- waitr10: in al,dx
- test al,40h
- jnz waitr10
-
- pop dx
- pop ax
- ret
-
- code ends
- end resetmpu