Page    60,132
;Opens and reads mouse8.asm file from drive A
;Uses DOS int 21h disk i/o services

stk     segment stack                ; set up a stack
        dw      64 dup(?)
stk     ends

data    segment
buf     db      1200 dup (?)         ; buffer to hold read data
s       db      'A:\MOUSE8.ASM',0    ; file name
fh      dw      ?                    ;file handle
data    ends

code    segment
        assume  ds:data, cs:code
main    proc    far                  ; Bookkeeping...
        push    ds                   ; instructions--
        sub     ax,ax                ; Necessary...
        push    ax                   ; under DOS
        mov     ax,data
        mov     ds,ax

        mov     ah,3dh            ;open file...
        mov     al,0              ;for read      
        mov     dx,offset s
        int     21h
        mov     fh,ax             ;store file handle 
        mov     ah,3fh            ;read file
        mov     bx,fh
        mov     cx,1024
        mov     dx,offset buf
        int     21h

        mov     ah,3eh            ;close file
        mov     bx,fh
        int     21h

        ret                          ; Return to DOS
main    endp         
code    ends
        end     main