;*-------------------------------------------------------------* ;* Master --> Child Copy Program * ;*-------------------------------------------------------------* cgroup group code gdata segment dta db 10000 dup (0aah) gdata ends code segment public 'code' assume cs:code,ds:gdata,es:extra,ss:stack main:;========== Main Routine ========== mov ax,stack mov ss,ax mov ax,offset ss:ss_top mov sp,ax mov ax,extra mov es,ax call gds_set mov ah,0 mov dl,01000000b int 13h ; Disk System Reset mov ah,0 mov dl,01000000b int 13h ; Disk System Reset call gds_set mov ax,ds mov es,ax mov bx,offset dta mov cx,0001h mov dx,0040h mov ax,0201h int 13h ; Boot Load from call changer mov dx,0041h mov ax,0301h int 13h ; Boot Save to mov si,offset bank1 call disc_para_set mov cx,0201h mov dx,0040h mov ax,0208h int 13h ; 1st Load from mov dx,0041h mov ax,0308h int 13h ; 1st Save to mov cx,0401h mov dx,0040h mov ax,0208h int 13h ; 2nd Load from mov dx,0041h mov ax,0308h int 13h ; 2nd Save to mov ch,15h loop_001: mov si,offset bank2 call disc_para_set mov cl,06h mov dx,0140h mov ax,0203h int 13h ; 3rd Load from mov si,offset bank1 call disc_para_set mov cl,03h mov dx,0141h mov ax,0306h int 13h ; 3rd Save to sub ch,2 jns loop_001 mov cx,1301h loop_002: mov si,offset bank3 call disc_para_set mov dx,0140h mov ax,0205h int 13h ; 4th Load from mov si,offset bank1 call disc_para_set mov dx,0041h mov ax,0305h int 13h ; 4th Save to sub ch,2 jns loop_002 mov ah,4ch int 21h ; DOS Return bank1: db 0efh,003h,025h,002h,009h,02ah,0ffh bank2: db 0efh,003h,025h,003h,009h,02ah,0ffh bank3: db 0efh,003h,025h,001h,009h,02ah,0ffh changer:;========== Data Chane Routine ========== call gds_set push bx mov bx,97h mov dta[bx],0c3h ; Return mov bx,54h mov dta[bx],03h ; Sector No. = 3 mov bx,5ah mov dta[bx],06h ; Sector Count = 6 mov bx,7ah mov dta[bx],0 ; Head = 0 pop bx ret disc_para_set:;========== Disc Parameter ========== push es mov ax,0 mov es,ax mov di,0078h mov es:[di],si mov di,007ah mov es:[di],cs pop es ret gds_set:;========== Data Segment Set ========== push ax mov ax,gdata mov ds,ax pop ax ret code ends extra segment es_area db 1024 dup (?) extra ends stack segment stack ss_area db 2048 dup (?) ss_top label word stack ends end main ;*-------------------------------------------------------------* ;* Child --> Child Copy Program * ;*-------------------------------------------------------------* cgroup group code gdata segment dta db 10000 dup (0aah) gdata ends code segment public 'code' assume cs:code,ds:gdata,es:extra,ss:stack child:;========== Main Routine ========== mov ax,stack mov ss,ax mov ax,offset ss:ss_top mov sp,ax mov ax,extra mov es,ax call gds_set mov ah,0 mov dl,01000000b int 13h ; Disk System Reset mov ah,0 mov dl,01000000b int 13h ; Disk System Reset call gds_set mov ax,ds mov es,ax mov bx,offset dta mov cx,0001h mov dx,0040h mov ax,0201h int 13h ; Boot Load from mov dx,0041h mov ax,0301h int 13h ; Boot Save to mov cx,0201h mov dx,0040h mov ax,0208h int 13h ; 1st Load from mov dx,0041h mov ax,0308h int 13h ; 1st Save to mov cx,0401h mov dx,0040h mov ax,0208h int 13h ; 2nd Load from mov dx,0041h mov ax,0308h int 13h ; 2nd Save to mov cx,1503h loop_001: mov dx,0140h mov ax,0206h int 13h ; 3rd Load from mov dx,0141h mov ax,0306h int 13h ; 3rd Save to sub ch,2 jns loop_001 mov cx,1301h loop_002: mov dx,0040h mov ax,0205h int 13h ; 4th Load from mov dx,0041h mov ax,0305h int 13h ; 4th Save to sub ch,2 jns loop_002 mov ah,4ch int 21h ; DOS Return gds_set:;========== Data Segment Set ========== push ax mov ax,gdata mov ds,ax pop ax ret code ends extra segment es_area db 1024 dup (?) extra ends stack segment stack ss_area db 2048 dup (?) ss_top label word stack ends end child