dosseg

.model small

.stack

.data

public sector_offset

                ;sector offset is half sector diaplay into full sector

                ; it must be a multiple of 16 & < 256

                sector_offset dw 0

 

public current_sector_no,disk_drive_no

                current_sector_no dw 0 ;initially sector 0

                disk_drive_no dw 0 ;initially drive A:

 

public lines_before_sector,header_line_no,header_part_1,header_part_2

                ;lines before sector is  the number of lines at the top

                ;of screen before the half sector display

                lines_before_sector db 2

                header_line_no db 0

                header_part_1 db 'Disk',0

                header_part_2 db 'Sector',0

 

.data?

                public sector

                ;the entire sector up to 8192 is stored in this part of memory

                sector db 8192 dup(?)

 

.code

                extrn clear_screen:proc

                extrn init_sec_disp:proc

                extrn read_sector:proc

                extrn init_sec_disp:proc

                extrn write_header:proc

disk_patch proc

                mov ax,dgroup

                mov ds,ax

                call clear_screen

                call write_header

                call read_sector

                call init_sec_disp

 

                mov ah,4ch

                int 21h

disk_patch endp

                end disk_patch