Title CHGTYPE
page 55,132
cseg segment
org 2ch
envir label word
org 100h
assume cs:cseg, ds:cseg
start: jmp short begin
table dw 820 ; cylinders
db 6 ; heads
dw 0 ; not used
dw -1 ; precomp
db 0 ; not used
db 0 ; control byte bit 3 = more than 8 heads, bits 6 or 7 disable retries
db 0 ; 3 timeout bytes
db 0
db 0
dw 820 ; landing zone
db 17 ; sectors/track
db 0 ; reserved
; First we will move the new drive table to the environment space to
; save a few bytes of memory
begin: mov ax,envir ; get the environment segment
mov es,ax ; to es
mov di,0 ; start of environment space
mov si,offset table ; point di to table
mov cx,16 ; move 16 bytes
rep movsb ; transfer table to environment space
; Then point the INT 41H vector to the new table
mov ax,2546h ; point the INT 46H vector to new drive table for second fixed disk
mov dx,0
push ds
push es
pop ds
int 21h
pop ds
; And do a Terminate and Stay Resident saving nothing but the environment
mov dx,0 ; terminate and stay resident
int 27h
cseg ends
end start