2001-02-03 21:48:09 +01:00
|
|
|
|
.model tiny
|
|
|
|
|
.486
|
|
|
|
|
smart
|
|
|
|
|
.code
|
|
|
|
|
|
|
|
|
|
org 0100h
|
|
|
|
|
|
2001-02-04 21:48:09 +01:00
|
|
|
|
start:
|
2001-02-18 21:48:09 +01:00
|
|
|
|
mov si,offset video
|
2001-05-09 22:48:10 +02:00
|
|
|
|
mov bx,400h
|
2001-04-27 22:48:09 +02:00
|
|
|
|
mov ax,47h
|
|
|
|
|
call installhandler
|
|
|
|
|
mov si,offset timer
|
2001-05-09 22:48:10 +02:00
|
|
|
|
mov bx,900h
|
2001-04-27 22:48:09 +02:00
|
|
|
|
mov ax,8h
|
|
|
|
|
call replacehandler
|
2001-05-09 22:48:10 +02:00
|
|
|
|
mov si,offset pic
|
|
|
|
|
mov bx,950h
|
|
|
|
|
mov ax,50h
|
|
|
|
|
call installhandler
|
2001-04-27 22:48:09 +02:00
|
|
|
|
mov si,offset drive
|
2001-05-09 22:48:10 +02:00
|
|
|
|
mov bx,1020h
|
2001-04-27 22:48:09 +02:00
|
|
|
|
mov ax,48h
|
|
|
|
|
call installhandler
|
2001-05-09 22:48:10 +02:00
|
|
|
|
mov si,offset keyboard
|
|
|
|
|
mov bx,1400h
|
|
|
|
|
mov ax,9h
|
|
|
|
|
call replacehandler
|
|
|
|
|
mov ax,40h
|
|
|
|
|
mov es,ax
|
|
|
|
|
mov dx,es:[8]
|
|
|
|
|
cmp dx,0
|
|
|
|
|
je nolpt1
|
|
|
|
|
mov al,0FFh
|
|
|
|
|
add dx,2
|
|
|
|
|
out dx,al
|
|
|
|
|
mov si,offset lpt
|
|
|
|
|
mov bx,1500h
|
|
|
|
|
mov ax,0Fh
|
|
|
|
|
call installhandler
|
|
|
|
|
mov es,bx
|
|
|
|
|
sub al,8
|
|
|
|
|
xor ah,ah
|
|
|
|
|
int 50h
|
|
|
|
|
mov byte ptr es:[105h],'1'
|
|
|
|
|
nolpt1:
|
|
|
|
|
push es
|
|
|
|
|
mov ax,40h
|
|
|
|
|
mov es,ax
|
|
|
|
|
mov dx,es:[10]
|
|
|
|
|
pop es
|
|
|
|
|
cmp dx,0
|
|
|
|
|
je nolpt2
|
|
|
|
|
mov al,0FFh
|
|
|
|
|
add dx,2
|
|
|
|
|
out dx,al
|
|
|
|
|
mov si,offset lpt
|
|
|
|
|
mov bx,1700h
|
|
|
|
|
mov ax,0Dh
|
|
|
|
|
call installhandler
|
|
|
|
|
sub al,8
|
|
|
|
|
xor ah,ah
|
|
|
|
|
int 50h
|
|
|
|
|
mov es,bx
|
|
|
|
|
mov byte ptr es:[105h],'2'
|
|
|
|
|
nolpt2:
|
|
|
|
|
mov si,offset mouse
|
|
|
|
|
mov bx,1900h
|
|
|
|
|
mov ax,74h
|
|
|
|
|
call installhandler
|
|
|
|
|
mov ax,0012
|
|
|
|
|
int 50h
|
|
|
|
|
;mov ah, 00010000b
|
|
|
|
|
;not ah
|
|
|
|
|
;in al, 0a1h
|
|
|
|
|
;and al, ah
|
|
|
|
|
;out 0a1h, al
|
|
|
|
|
mov ah,2
|
|
|
|
|
int 74h
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2001-02-04 21:48:09 +01:00
|
|
|
|
start2:
|
2001-02-03 21:48:09 +01:00
|
|
|
|
push cs
|
|
|
|
|
push cs
|
|
|
|
|
pop ds
|
|
|
|
|
pop es
|
2001-02-04 21:48:09 +01:00
|
|
|
|
mov ah,21
|
|
|
|
|
mov cl,7
|
|
|
|
|
int 47h
|
|
|
|
|
mov ax,0002
|
|
|
|
|
int 47h
|
|
|
|
|
mov ah,2
|
|
|
|
|
int 47h
|
|
|
|
|
mov ah,25
|
|
|
|
|
mov bx,0
|
|
|
|
|
int 47h
|
|
|
|
|
mov ah,13
|
|
|
|
|
mov si,offset msg1
|
|
|
|
|
int 47h
|
|
|
|
|
mov ah,6
|
|
|
|
|
int 47h
|
|
|
|
|
int 47h
|
|
|
|
|
mov ah,13
|
|
|
|
|
mov si,offset prompt
|
|
|
|
|
int 47h
|
|
|
|
|
mov ah,6
|
|
|
|
|
int 47h
|
2001-02-03 21:48:09 +01:00
|
|
|
|
xor di,di
|
2001-04-27 22:48:09 +02:00
|
|
|
|
mov ax,0001h
|
2001-02-03 21:48:09 +01:00
|
|
|
|
mov bx,offset buffer
|
2001-04-27 22:48:09 +02:00
|
|
|
|
mov cx,13
|
|
|
|
|
int 48h
|
2001-02-03 21:48:09 +01:00
|
|
|
|
xor bp,bp
|
|
|
|
|
showall:
|
|
|
|
|
cmp byte ptr [bx+di],0
|
|
|
|
|
je endof2
|
|
|
|
|
mov al,[bx+di+12]
|
|
|
|
|
mov byte ptr [bx+di+12],0
|
|
|
|
|
mov si,bx
|
|
|
|
|
add si,di
|
2001-02-04 21:48:09 +01:00
|
|
|
|
mov ah,13
|
|
|
|
|
int 47h
|
2001-02-03 21:48:09 +01:00
|
|
|
|
mov si,offset spaces
|
2001-02-04 21:48:09 +01:00
|
|
|
|
int 47h
|
2001-02-03 21:48:09 +01:00
|
|
|
|
mov [bx+di+12],al
|
|
|
|
|
mov byte ptr [bx+di+12+5],0
|
|
|
|
|
mov si,bx
|
|
|
|
|
add si,di
|
|
|
|
|
add si,12
|
2001-02-04 21:48:09 +01:00
|
|
|
|
int 47h
|
|
|
|
|
mov ah,6
|
|
|
|
|
int 47h
|
2001-02-03 21:48:09 +01:00
|
|
|
|
add di,32
|
|
|
|
|
inc bp
|
|
|
|
|
jmp showall
|
|
|
|
|
endof2:
|
2001-02-18 21:48:09 +01:00
|
|
|
|
mov ah,21
|
|
|
|
|
mov cl,112
|
|
|
|
|
int 47h
|
|
|
|
|
mov ah,13
|
|
|
|
|
mov si,offset menu
|
|
|
|
|
int 47h
|
2001-02-04 21:48:09 +01:00
|
|
|
|
mov xx,1
|
|
|
|
|
mov xxold,2
|
2001-02-03 21:48:09 +01:00
|
|
|
|
call Select
|
|
|
|
|
endof:
|
|
|
|
|
mov ax,0
|
|
|
|
|
int 16h
|
|
|
|
|
cmp ah,50h
|
|
|
|
|
jne tre1
|
2001-02-04 21:48:09 +01:00
|
|
|
|
cmp xx,bp
|
2001-02-03 21:48:09 +01:00
|
|
|
|
je endof
|
2001-02-04 21:48:09 +01:00
|
|
|
|
inc xx
|
2001-02-03 21:48:09 +01:00
|
|
|
|
call select
|
|
|
|
|
jmp endof
|
|
|
|
|
tre1:
|
|
|
|
|
cmp ah,48h
|
|
|
|
|
jne tre2
|
2001-02-04 21:48:09 +01:00
|
|
|
|
cmp xx,1
|
2001-02-03 21:48:09 +01:00
|
|
|
|
je endof
|
2001-02-04 21:48:09 +01:00
|
|
|
|
dec xx
|
2001-02-03 21:48:09 +01:00
|
|
|
|
call select
|
|
|
|
|
jmp endof
|
|
|
|
|
tre2:
|
|
|
|
|
cmp al,0Dh
|
|
|
|
|
jne tre3
|
2001-02-04 21:48:09 +01:00
|
|
|
|
mov di,xx
|
2001-02-03 21:48:09 +01:00
|
|
|
|
dec di
|
|
|
|
|
shl di,5
|
2001-02-18 21:48:09 +01:00
|
|
|
|
mov dx,[di+bx+26]
|
2001-02-04 21:48:09 +01:00
|
|
|
|
mov ah,6
|
|
|
|
|
int 47h
|
|
|
|
|
int 47h
|
2001-02-18 21:48:09 +01:00
|
|
|
|
mov ah,21
|
|
|
|
|
mov cl,7
|
|
|
|
|
int 47h
|
2001-02-04 21:48:09 +01:00
|
|
|
|
mov ah,13
|
|
|
|
|
mov si,offset msg2
|
|
|
|
|
int 47h
|
2001-02-18 21:48:09 +01:00
|
|
|
|
mov cx,dx
|
2001-02-04 21:48:09 +01:00
|
|
|
|
call executefatway
|
2001-02-03 21:48:09 +01:00
|
|
|
|
tre3:
|
2001-02-04 21:48:09 +01:00
|
|
|
|
cmp ah,59
|
2001-02-18 21:48:09 +01:00
|
|
|
|
jne tre4
|
2001-02-04 21:48:09 +01:00
|
|
|
|
mov lastread,0FFFFh
|
|
|
|
|
jmp start2
|
2001-02-18 21:48:09 +01:00
|
|
|
|
tre4:
|
|
|
|
|
cmp ah,67
|
|
|
|
|
jne endof
|
|
|
|
|
mov ax,0001
|
|
|
|
|
int 47h
|
|
|
|
|
mov ah,2
|
|
|
|
|
int 47h
|
|
|
|
|
mov ah,21
|
|
|
|
|
mov cl,4
|
|
|
|
|
int 47h
|
|
|
|
|
mov ah,13
|
|
|
|
|
mov si,offset msg3
|
|
|
|
|
int 47h
|
|
|
|
|
mov ax,0
|
|
|
|
|
int 16h
|
|
|
|
|
mov ax,40h
|
|
|
|
|
mov ds,ax
|
|
|
|
|
mov bx,1234h
|
|
|
|
|
mov ds:[072h],bx
|
|
|
|
|
push 0FFFFh
|
|
|
|
|
push 0000h
|
|
|
|
|
db 0CBh
|
2001-02-04 21:48:09 +01:00
|
|
|
|
|
|
|
|
|
executefatway:
|
|
|
|
|
push cs
|
|
|
|
|
mov bx,offset start2
|
|
|
|
|
push bx
|
|
|
|
|
mov bx,03000h
|
|
|
|
|
mov es,bx
|
|
|
|
|
push bx
|
|
|
|
|
mov bx,0100h
|
|
|
|
|
push bx
|
|
|
|
|
call loadfatway
|
|
|
|
|
push es
|
|
|
|
|
push es
|
|
|
|
|
push es
|
|
|
|
|
pop ds
|
|
|
|
|
pop fs
|
|
|
|
|
pop gs
|
|
|
|
|
push 7202h
|
|
|
|
|
popf
|
|
|
|
|
db 0CBh
|
|
|
|
|
|
|
|
|
|
;cx entr<74>e -> fatway chemin
|
|
|
|
|
getfatway:
|
|
|
|
|
push bx cx es
|
|
|
|
|
mov bx,offset fatway
|
2001-02-03 21:48:09 +01:00
|
|
|
|
fatagain:
|
2001-02-04 21:48:09 +01:00
|
|
|
|
mov cs:[bx],cx
|
|
|
|
|
add bx,2
|
2001-02-03 21:48:09 +01:00
|
|
|
|
cmp cx,0FFF0h
|
|
|
|
|
jae finishload
|
|
|
|
|
call getfat
|
|
|
|
|
jnc fatagain
|
2001-02-04 21:48:09 +01:00
|
|
|
|
finishload:
|
|
|
|
|
pop es cx bx
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
loadfatway:
|
2001-04-27 22:48:09 +02:00
|
|
|
|
push ax bx cx di
|
2001-02-04 21:48:09 +01:00
|
|
|
|
call getfatway
|
|
|
|
|
jc endload
|
|
|
|
|
mov di,offset fatway
|
|
|
|
|
mov si,offset dot
|
|
|
|
|
mov ah,13
|
|
|
|
|
loadagain:
|
|
|
|
|
mov cx,cs:[di]
|
|
|
|
|
cmp cx,0FFF0h
|
|
|
|
|
jae endload
|
|
|
|
|
add di,2
|
|
|
|
|
call readsector
|
|
|
|
|
jc endload
|
|
|
|
|
int 47h
|
|
|
|
|
add bx,cs:sizec
|
|
|
|
|
jmp loadagain
|
|
|
|
|
endload:
|
2001-04-27 22:48:09 +02:00
|
|
|
|
pop di cx bx ax
|
2001-02-04 21:48:09 +01:00
|
|
|
|
ret
|
2001-02-03 21:48:09 +01:00
|
|
|
|
|
|
|
|
|
sizec dw 512
|
|
|
|
|
reserv dw 1
|
|
|
|
|
|
|
|
|
|
;<-cx n<>secteur ->cx code FAT
|
|
|
|
|
getfat:
|
|
|
|
|
push es ax bx dx
|
|
|
|
|
mov ax,cx
|
|
|
|
|
xor dx,dx
|
2001-02-04 21:48:09 +01:00
|
|
|
|
div cs:sizec
|
2001-02-03 21:48:09 +01:00
|
|
|
|
mov cx,ax
|
2001-02-04 21:48:09 +01:00
|
|
|
|
add cx,cs:reserv
|
2001-02-03 21:48:09 +01:00
|
|
|
|
mov bx,offset buffer
|
|
|
|
|
push cs
|
|
|
|
|
pop es
|
|
|
|
|
call readsector
|
|
|
|
|
jc errorgetfat
|
|
|
|
|
shl dx,1
|
|
|
|
|
add bx,dx
|
2001-02-04 21:48:09 +01:00
|
|
|
|
mov cx,cs:[bx]
|
2001-02-03 21:48:09 +01:00
|
|
|
|
errorgetfat:
|
|
|
|
|
pop dx bx ax es
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
;selectionne la ligne xx
|
|
|
|
|
Select:
|
|
|
|
|
push ax di
|
|
|
|
|
mov di,xxold
|
|
|
|
|
mov al,7
|
2001-02-04 21:48:09 +01:00
|
|
|
|
add di,2
|
|
|
|
|
mov ah,32
|
|
|
|
|
int 47h
|
|
|
|
|
mov ax,xx
|
2001-02-03 21:48:09 +01:00
|
|
|
|
mov xxold,ax
|
2001-02-04 21:48:09 +01:00
|
|
|
|
mov di,xx
|
|
|
|
|
mov ah,32
|
2001-02-03 21:48:09 +01:00
|
|
|
|
mov al,112
|
|
|
|
|
add di,2
|
2001-02-04 21:48:09 +01:00
|
|
|
|
int 47h
|
|
|
|
|
pop di ax
|
|
|
|
|
ret
|
2001-02-03 21:48:09 +01:00
|
|
|
|
|
2001-02-04 21:48:09 +01:00
|
|
|
|
xx dw 1
|
2001-02-03 21:48:09 +01:00
|
|
|
|
xxold dw 0
|
2001-02-18 21:48:09 +01:00
|
|
|
|
menu db 'F1 Read disk F2 Read file F9 Quit F11 Change video F12 Debug ',0
|
2001-04-27 22:48:09 +02:00
|
|
|
|
msg1 db ' Cos 2000 menu loader release 1.0',0
|
2001-02-18 21:48:09 +01:00
|
|
|
|
msg2 db 'The program is loading',0
|
2001-04-27 22:48:09 +02:00
|
|
|
|
msg3 db ' Cos will restart your computer, eject the floppy disk and press a key',0
|
2001-02-04 21:48:09 +01:00
|
|
|
|
prompt db '>',0
|
2001-02-03 21:48:09 +01:00
|
|
|
|
spaces db ' ',0
|
|
|
|
|
dot db '.',0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ReadSector:
|
|
|
|
|
push ax cx dx si
|
|
|
|
|
cmp cx,cs:lastread
|
|
|
|
|
je done
|
|
|
|
|
mov cs:LastRead,cx
|
|
|
|
|
mov AX, CX
|
|
|
|
|
xor DX, DX
|
|
|
|
|
div cs:DiskSectorsPerTrack
|
|
|
|
|
mov CL, DL ;{ Set the sector }
|
|
|
|
|
and CL, 63 ;{ Top two bits are bits 8&9 of the cylinder }
|
|
|
|
|
xor DX, DX
|
|
|
|
|
div cs:DiskTracksPerHead
|
|
|
|
|
mov CH, DL ;{ Set the track bits 0-7 }
|
|
|
|
|
mov AL, DH
|
|
|
|
|
ror AL, 1
|
|
|
|
|
ror AL, 1
|
|
|
|
|
and AL, 11000000b
|
|
|
|
|
or CL, AL ;{ Set bits 8&9 of track }
|
|
|
|
|
xor dX, DX
|
|
|
|
|
div cs:DiskHeads
|
|
|
|
|
mov DH, DL ;{ Set the head }
|
|
|
|
|
inc CL
|
|
|
|
|
mov SI, 4
|
|
|
|
|
TryAgain:
|
|
|
|
|
mov AL, 1
|
|
|
|
|
mov DL, 0
|
|
|
|
|
mov AH, 2
|
|
|
|
|
int 13h
|
|
|
|
|
jnc Done
|
|
|
|
|
dec SI
|
|
|
|
|
jnz TryAgain
|
|
|
|
|
mov word ptr cs:lastread,0ffffh
|
|
|
|
|
Done:
|
|
|
|
|
pop si dx cx ax
|
2001-02-04 21:48:09 +01:00
|
|
|
|
ret
|
2001-02-03 21:48:09 +01:00
|
|
|
|
|
2001-04-27 22:48:09 +02:00
|
|
|
|
WriteSector:
|
2001-02-03 21:48:09 +01:00
|
|
|
|
push ax cx dx si
|
|
|
|
|
cmp cs:Lastread,cx
|
|
|
|
|
jne nodestruct
|
|
|
|
|
mov cs:Lastread,0ffffh
|
|
|
|
|
nodestruct:
|
|
|
|
|
mov AX, CX
|
|
|
|
|
xor DX, DX
|
|
|
|
|
div cs:DiskSectorsPerTrack
|
|
|
|
|
mov CL, DL ;{ Set the sector }
|
|
|
|
|
and CL, 63 ;{ Top two bits are bits 8&9 of the cylinder }
|
|
|
|
|
xor DX, DX
|
|
|
|
|
div cs:DiskTracksPerHead
|
|
|
|
|
mov CH, DL ;{ Set the track bits 0-7 }
|
|
|
|
|
mov AL, DH
|
|
|
|
|
ror AL, 1
|
|
|
|
|
ror AL, 1
|
|
|
|
|
and AL, 11000000b
|
|
|
|
|
or CL, AL ;{ Set bits 8&9 of track }
|
|
|
|
|
xor DX, DX
|
|
|
|
|
div cs:DiskHeads
|
|
|
|
|
mov DH, DL ;{ Set the head }
|
|
|
|
|
inc CL
|
|
|
|
|
mov SI, 4
|
|
|
|
|
TryAgain2:
|
|
|
|
|
mov AL, 1
|
|
|
|
|
mov DL, 0
|
|
|
|
|
mov AH, 3
|
|
|
|
|
int 13h
|
|
|
|
|
jnc Done2
|
|
|
|
|
dec SI
|
|
|
|
|
jnz TryAgain2
|
|
|
|
|
Done2:
|
|
|
|
|
pop si dx cx ax
|
|
|
|
|
ret
|
|
|
|
|
|
2001-04-27 22:48:09 +02:00
|
|
|
|
Lastread dw 0FFFFh
|
|
|
|
|
|
|
|
|
|
;remplace le handler pointer par ds:si en bx:100h interruption ax
|
|
|
|
|
replacehandler:
|
|
|
|
|
push ax bx si di ds es
|
|
|
|
|
mov es,bx
|
|
|
|
|
mov di,0100h
|
|
|
|
|
call loadfile
|
|
|
|
|
mov bx,ax
|
|
|
|
|
call getint
|
|
|
|
|
mov es:[102h],si
|
|
|
|
|
mov es:[104h],ds
|
|
|
|
|
call setint
|
|
|
|
|
pop es ds di si bx ax
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
;install le handler pointer par ds:si en bx:100h interruption ax
|
|
|
|
|
installhandler:
|
|
|
|
|
push bx di es
|
|
|
|
|
mov es,bx
|
|
|
|
|
mov di,100h
|
|
|
|
|
call loadfile
|
|
|
|
|
mov bx,ax
|
|
|
|
|
call setint
|
|
|
|
|
pop es di bx
|
|
|
|
|
ret
|
2001-02-04 21:48:09 +01:00
|
|
|
|
|
|
|
|
|
|
2001-04-27 22:48:09 +02:00
|
|
|
|
;Charge le fichier Ds:si en es:di
|
|
|
|
|
loadfile:
|
|
|
|
|
push bx cx
|
|
|
|
|
call searchfile
|
|
|
|
|
mov bx,di
|
|
|
|
|
call loadfatway
|
|
|
|
|
pop cx bx
|
|
|
|
|
ret
|
|
|
|
|
|
2001-02-04 21:48:09 +01:00
|
|
|
|
;met es:di le handle de l'int bx
|
|
|
|
|
setint:
|
|
|
|
|
push ax bx ds
|
|
|
|
|
cli
|
|
|
|
|
shl bx,2
|
|
|
|
|
xor ax,ax
|
|
|
|
|
mov ds,ax
|
|
|
|
|
mov ds:[bx],di
|
|
|
|
|
mov ds:[bx+2],es
|
|
|
|
|
pop ds bx ax
|
|
|
|
|
sti
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
;met ds:si le handle de l'int bx
|
|
|
|
|
getint:
|
|
|
|
|
push ax bx es
|
|
|
|
|
shl bx,2
|
|
|
|
|
xor ax,ax
|
|
|
|
|
mov es,ax
|
|
|
|
|
mov si,es:[bx]
|
|
|
|
|
mov ds,es:[bx+2]
|
|
|
|
|
pop es bx ax
|
2001-04-27 22:48:09 +02:00
|
|
|
|
ret
|
2001-02-18 21:48:09 +01:00
|
|
|
|
|
2001-04-27 22:48:09 +02:00
|
|
|
|
;Recherchele fichier et retourne sont path et en cx sont debut
|
2001-02-18 21:48:09 +01:00
|
|
|
|
Searchfile:
|
|
|
|
|
push bx dx si di ds es
|
2001-05-09 22:48:10 +02:00
|
|
|
|
xor dx,dx
|
2001-04-27 22:48:09 +02:00
|
|
|
|
push cs
|
|
|
|
|
pop es
|
2001-02-18 21:48:09 +01:00
|
|
|
|
mov di,offset temp
|
|
|
|
|
mov bx,offset buffer
|
|
|
|
|
call asciiztofit
|
|
|
|
|
mov cx,13
|
|
|
|
|
check:
|
|
|
|
|
call readsector
|
|
|
|
|
jc errorboot
|
|
|
|
|
xor di,di
|
|
|
|
|
findnext:
|
|
|
|
|
cmp byte ptr [bx+di],0
|
|
|
|
|
je errorboot
|
|
|
|
|
push si di cx
|
|
|
|
|
mov si,di
|
|
|
|
|
add si,bx
|
|
|
|
|
mov di,offset temp
|
|
|
|
|
mov cx,12+4
|
|
|
|
|
rep cmpsb
|
|
|
|
|
pop cx di si
|
|
|
|
|
je oksystem
|
|
|
|
|
add di,32
|
|
|
|
|
inc dx
|
|
|
|
|
cmp dx,nbfit
|
|
|
|
|
ja errorboot
|
|
|
|
|
cmp di,sizec
|
|
|
|
|
jb findnext
|
|
|
|
|
inc cx
|
|
|
|
|
jmp Check
|
|
|
|
|
oksystem:
|
|
|
|
|
mov cx,[di+BX+26]
|
|
|
|
|
errorboot:
|
|
|
|
|
pop es ds di si dx bx
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
;->name ds:si ->es:di
|
|
|
|
|
AsciiZtoFit:
|
|
|
|
|
push ax bx cx dx si di ds es
|
|
|
|
|
xor bx,bx
|
|
|
|
|
mov dx,di
|
|
|
|
|
noextens:
|
|
|
|
|
mov al,[si+bx]
|
|
|
|
|
cmp al,'.'
|
|
|
|
|
je extens
|
|
|
|
|
call Issystchar
|
|
|
|
|
jc errortranslate
|
|
|
|
|
mov es:[di],al
|
|
|
|
|
inc di
|
|
|
|
|
inc bx
|
|
|
|
|
cmp bx,namesize ;(.)
|
|
|
|
|
jne noextens
|
|
|
|
|
erro:
|
|
|
|
|
stc
|
|
|
|
|
jmp errortranslate
|
|
|
|
|
extens:
|
|
|
|
|
add si,bx
|
|
|
|
|
inc si
|
|
|
|
|
sub bx,namesize
|
|
|
|
|
neg bx
|
|
|
|
|
mov al,0
|
|
|
|
|
mov cx,bx
|
|
|
|
|
cld
|
|
|
|
|
rep stosb
|
|
|
|
|
xor bx,bx
|
|
|
|
|
wasextens:
|
|
|
|
|
mov al,[si+bx]
|
|
|
|
|
cmp al,0
|
|
|
|
|
je endextens
|
|
|
|
|
call Issystchar
|
|
|
|
|
jc errortranslate
|
|
|
|
|
mov es:[di],al
|
|
|
|
|
inc di
|
|
|
|
|
inc bx
|
|
|
|
|
cmp bx,extsize
|
|
|
|
|
jne wasextens
|
|
|
|
|
jmp erro
|
|
|
|
|
endextens:
|
|
|
|
|
sub bx,extsize
|
|
|
|
|
neg bx
|
|
|
|
|
mov al,0
|
|
|
|
|
mov cx,bx
|
|
|
|
|
cld
|
|
|
|
|
rep stosb
|
|
|
|
|
mov si,dx
|
|
|
|
|
mov di,dx
|
|
|
|
|
push es
|
|
|
|
|
pop ds
|
|
|
|
|
mov cx,extsize+namesize
|
|
|
|
|
call uppercaseMEM
|
|
|
|
|
clc
|
|
|
|
|
endtranslate:
|
|
|
|
|
pop es ds di si dx cx bx ax
|
|
|
|
|
ret
|
|
|
|
|
errortranslate:
|
|
|
|
|
stc
|
|
|
|
|
jmp endtranslate
|
|
|
|
|
|
|
|
|
|
;Carry si al = caract<63>re syst<73>me
|
|
|
|
|
isSystchar:
|
|
|
|
|
push di
|
|
|
|
|
mov di,offset exeptchar
|
|
|
|
|
isexcept:
|
|
|
|
|
cmp al,cs:[di]
|
|
|
|
|
je nogood
|
|
|
|
|
inc di
|
|
|
|
|
cmp byte ptr cs:[di],0
|
|
|
|
|
jne isexcept
|
|
|
|
|
endanal:
|
|
|
|
|
pop di
|
|
|
|
|
ret
|
|
|
|
|
exeptchar db '/\<>:|.',01,0,0
|
|
|
|
|
nogood:
|
|
|
|
|
stc
|
|
|
|
|
jmp endanal
|
|
|
|
|
|
|
|
|
|
;Transforme les x caract<63>res de la mem en ds:si en maj
|
|
|
|
|
uppercaseMEM:
|
|
|
|
|
push si di cx ax
|
|
|
|
|
mov di,si
|
|
|
|
|
uppercaser:
|
|
|
|
|
mov al,ds:[si]
|
|
|
|
|
inc si
|
|
|
|
|
cmp al,'A'
|
|
|
|
|
jb nonmaj
|
|
|
|
|
cmp al,'Z'
|
|
|
|
|
ja nonmaj
|
|
|
|
|
add al,'a'-'A'
|
|
|
|
|
nonmaj:
|
|
|
|
|
mov es:[di],al
|
|
|
|
|
inc di
|
|
|
|
|
dec cx
|
|
|
|
|
jnz uppercaser
|
|
|
|
|
enduppercase:
|
|
|
|
|
clc
|
|
|
|
|
pop ax cx di si
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
namesize equ 12
|
|
|
|
|
extsize equ 5
|
2001-02-04 21:48:09 +01:00
|
|
|
|
|
|
|
|
|
|
2001-02-18 21:48:09 +01:00
|
|
|
|
nbfit equ 255
|
2001-05-09 22:48:10 +02:00
|
|
|
|
mouse db 'mouse.sys',0
|
|
|
|
|
pic db 'pic8259a.sys',0
|
2001-04-27 22:48:09 +02:00
|
|
|
|
drive db 'drive.sys',0
|
|
|
|
|
timer db 'timer.sys',0
|
|
|
|
|
lpt db 'lpt.sys',0
|
2001-02-18 21:48:09 +01:00
|
|
|
|
video db 'video.sys',0
|
2001-04-27 22:48:09 +02:00
|
|
|
|
keyboard db 'keyboard.sys',0
|
2001-02-18 21:48:09 +01:00
|
|
|
|
temp db 12+5+1 dup (0)
|
2001-02-03 21:48:09 +01:00
|
|
|
|
|
|
|
|
|
DiskSectorsPerTrack dw 18
|
|
|
|
|
DiskTracksPerHead dw 80
|
|
|
|
|
DiskHeads dw 2
|
|
|
|
|
|
2001-02-04 21:48:09 +01:00
|
|
|
|
fatway equ $
|
2001-02-03 21:48:09 +01:00
|
|
|
|
|
2001-02-04 21:48:09 +01:00
|
|
|
|
buffer equ $+3000
|
2001-02-03 21:48:09 +01:00
|
|
|
|
end start
|