: pop bx ; make stack right. ret ; jump here if no alternate found. alt2: mov cx,word ptr hrdtrk call mwseek ;do the seek. jc mwexit ; exit if seek error. mov al,byte ptr mwop ;get the operation. mov byte ptr dmaop,al ;tell the controller. mov al,byte ptr hrdsec ;get the requested sector. ; jump here if an alternate is found. altfnd: mov cl,al ;put in c. mov dh,0 ;clear head counter. seclp: sub al,hrdspt ;subtract out a heads worth. jb secfnd ;jump if found. inc dh word ptr dmarg0,cx ; set command channel cyl no. mov al,dh inc al mov bx,0ffffh jnz mwskip0 mov cl,stepout jmps mwskip mwskip0: mov bx,cx ; bx=new track, dx = old track. sub bx,dx ; bx = new track - old track. mov cl,stepout ; cl = step out code. jc mwsout ; hop if new track smaller. mov cl,stepin ; else cl = code to step in. jmps mwskip mwsout: call mwnegh1 mwskip: mov dmastep,bx ; save step count. mov al,hrddsk ; al = physical hard disk number. or al,cl mov du $ cseg org offset l_2 ; External Entry Point to Read/Write Routine. ; Read or Write the number of sectors indicated. ; Note: assumes all are on the same cylinder. ; nosecs = number of sectors to transfer. ; sector = starting sector number. ; track = track number. ; sekdsk = disk number (0-7 are floppies, 8-15 are hard disk). ; lsb20 = least significant word of 20-bit transfer address. ; msb20 = most significant byte of 20-bit transfer address. ; oper = 1 for read, 2 for wrhard disk r/w routine. ; Common Morrow hard disk read/write routine. mwtran: mov cl,hrddsk ; get hard disk number. mov bx,(offset badmap) ;get badmap address. all: mov dx,word ptr badptr ;get bad map pointer. or al,al ;clear carry. xch