feat: compression au format RIP du logo BMP. Ajout d'un logiciel de vérification de la disquette.

This commit is contained in:
Nicolas Hordé 2001-02-25 21:48:09 +01:00
parent f3db02caa1
commit 4c3f72e0ce
12 changed files with 951 additions and 38 deletions

BIN
cos.rip Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -44,6 +44,13 @@ Adres:
mov di,offset infos mov di,offset infos
mov ah,34 mov ah,34
int 47h int 47h
mov al,[di+7]
cmp al,oldmode
je noinit
mov ah,2
int 47h
mov oldmode,al
noinit:
dec infos dec infos
mov bx,0 mov bx,0
mov ah,25 mov ah,25
@ -422,7 +429,7 @@ TryAgain2:
Done2: Done2:
pop si dx cx ax pop si dx cx ax
ret ret
oldmode db 0
DiskSectorsPerTrack dw 18 DiskSectorsPerTrack dw 18
DiskTracksPerHead dw 80 DiskTracksPerHead dw 80
DiskHeads dw 2 DiskHeads dw 2

View File

@ -22,6 +22,13 @@ Adres:
mov ah,34 mov ah,34
int 47h int 47h
dec infos dec infos
mov al,[di+7]
cmp al,oldmode
je noinit
mov ah,2
int 47h
mov oldmode,al
noinit:
mov bx,0 mov bx,0
mov ah,25 mov ah,25
int 47h int 47h
@ -437,7 +444,7 @@ ret
DiskSectorsPerTrack dw 18 DiskSectorsPerTrack dw 18
DiskTracksPerHead dw 80 DiskTracksPerHead dw 80
DiskHeads dw 2 DiskHeads dw 2
oldmode db 0
infos db 10 dup (0) infos db 10 dup (0)
end start end start

84
keyboard.asm Executable file
View File

@ -0,0 +1,84 @@
.model tiny
.486
smart
.code
org 0100h
start:
mov al,0D0h
call keybcmd
in al,60h
ret
;============= PPI port A (Programmable Peripheral interface) ================
;8048 (old XT) 8042 (old AT) 8741 8742 (with PS2 mouse)
; R/W
;Port 60h : Scancode & keyboarddata
overrun equ 000h ;Error too many keys pressed
BATend equ 0AAh ;End of the test BAT (basic test assurance)
MF2code equ 0ABh ;Code send by MF2 keyboard
MF2code2 equ 041h ;Code send by MF2 keyboard
echo equ 0EEh ;Send by echo command
Ack equ 0FAh ;Send by every comman exept EEh et FEh (Aknoledge)
BATerror equ 0FCh ;BAT failed
Resend equ 0FEh ;Resend data please
Error equ 0FFh ;Error of keyboard
;Port 60h : command data
led equ 0EDh ;set the led like you want
echo equ 0EEh ;Echo byte for diagnostic
Set equ 0F0h ;Choose the Set of scancode
Id equ 0F2h ;Identify the keyboard
rate equ 0F3h ;Set the specified typematic rate
enable equ 0F4h ;clear buffer and scan
reset equ 0F5h ;Reset and no scan
reset2 equ 0F6h ;Reset and scan
;============= PPI port A (Programmable Peripheral interface) ================
;8048 (old XT) 8042 (old AT) 8741 8742 (with PS2 mouse)
; R/W
;Port 61h
;==================== Data and control keyboard registers ===================
;8042 (old AT) 8741 8742 (with PS2 mouse)
; R/W
;Port 64h
;Envoie la commande AL aux clavier et si besoin est la donne DL
Keybcmd:
push ax
xchg al,ah
xor cx,cx
clearbuffer:
in al,64h
test al,02h
loopnz clearbuffer
jnz errorkb
xchg al,ah
out 64h,al
clearbuffer2:
in al,64h
test al,02h
loopnz clearbuffer2
jnz errorkb
cmp dl,0
je endkeyb
mov al,dl
out 60h,al
endkeyb:
clc
pop ax
ret
errorkb:
stc
pop ax
ret
end start

View File

@ -7,24 +7,31 @@ org 0100h
start: start:
mov si,offset logo mov si,offset logo
call searchfile call searchfile
mov bx,7000h mov bx,6000h
mov es,bx mov es,bx
mov bx,0h mov bx,0h
call loadfatway call loadfatway
push es push es
pop ds pop ds
mov bx,5000h
mov es,bx
xor si,si
xor di,di
xor bx,bx
call DecompressRle
push es
pop ds
call loadbmp call loadbmp
xor ax,ax xor ax,ax
xor bx,bx xor bx,bx
call showbmp call showbmp
mov ax,0 mov ax,0
int 16h int 16h
ret
db 0CBH db 0CBH
loadbmp: loadbmp:
push ax bx cx dx bp ds push ax bx cx dx bp ds
mov ax,4 mov ax,6
int 47h int 47h
mov ax,ds:[18] mov ax,ds:[18]
mov si,ax mov si,ax
@ -309,11 +316,50 @@ Done:
pop si dx cx ax pop si dx cx ax
ret ret
DecompressRle:
push cx dx si di
mov dx,cx
mov bp,di
decompression:
mov eax,[si]
cmp al,'/'
jne nocomp
cmp si,07FFFh-6
jae thenen
mov ecx,eax
ror ecx,16
cmp cl,'*'
jne nocomp
cmp byte ptr [si+4],'/'
jne nocomp
mov al,ch
mov cl,ah
xor ah,ah
xor ch,ch
rep stosb
add si,5
sub dx,5
jnz decompression
jmp thenen
nocomp:
mov es:[di],al
inc si
inc di
dec dx
jnz decompression
thenen:
mov ax,dx
sub bp,di
neg bp
pop di si dx cx
ret
dot db '.',0 dot db '.',0
loadfatway: loadfatway:
push bx cx di push bx di
call getfatway call getfatway
jc endload jc endload
mov di,offset fatway mov di,offset fatway
@ -330,7 +376,8 @@ int 47h
add bx,cs:sizec add bx,cs:sizec
jmp loadagain jmp loadagain
endload: endload:
pop di cx bx mov cx,bx
pop di bx
ret ret
sizec dw 512 sizec dw 512
@ -356,7 +403,7 @@ errorgetfat:
pop dx bx ax es pop dx bx ax es
ret ret
logo db 'cos.bmp',0 logo db 'cos.rip',0
temp db 12+5+1 dup (0) temp db 12+5+1 dup (0)
DiskSectorsPerTrack dw 18 DiskSectorsPerTrack dw 18
@ -365,5 +412,5 @@ DiskHeads dw 2
fatway equ $ fatway equ $
buffer equ $+1000 buffer equ $+5000
end start end start

108
rip.asm Executable file
View File

@ -0,0 +1,108 @@
net segment
org 0100h
assume cs:net,ds:net
start:
jmp deb
taille dw 0
signe db 'rip'
signe2 db 64 dup (0)
p1 db '@'
p2 db '@'
min db 4
deb:
mov BL,DS:[0080h]
xor BH,BH
or BX,BX
mov byte ptr [0081h+BX],00h
mov AX,3D02h
mov DX,0082H
int 21h
mov bx,ax
mov ah,3fh
mov cx,0ffffh
mov dx,offset data
int 21h
mov taille,ax
mov ah,3eh
int 21h
mov si,82h
mov di,offset signe2
mov cx,64
rep movsb
mov di,offset signe2
mov cx,64
mov al,2eh
repne scasb
push di
mov si,di
mov di,offset data
add di,taille
mov cx,3
rep movsb
mov ax,di
pop di
mov cx,3
mov si,offset signe
rep movsb
mov di,ax
mov cx,taille
mov si,offset data
mov dx,1
boucle:
lodsb
cmp al,[si]
jne pas
inc dl
loop boucle
jmp fin
pas:
cmp dl,min
jb suite
cmp dl,1
jne go
suite:
mov bx,cx
mov cx,dx
rep stosb
mov cx,bx
mov dl,1
loop boucle
jmp fin
go:
mov ah,al
mov al,p1
stosb
mov al,dl
stosb
mov al,ah
stosb
mov al,p2
stosb
mov dl,1
loop boucle
fin:
mov ah,3ch
mov cx,0
mov dx,offset signe2
int 21h
mov bx,ax
mov ah,40h
mov cx,di
sub cx,offset data
sub cx,taille
mov dx,offset data
add dx,taille
int 21h
mov ah,3eh
int 21h
mov ah,41h
mov dx,82h
int 21h
ret
data db 0
net ends
end start
net

View File

@ -32,6 +32,15 @@ dat2 db '..',0
dta db 43 dup (0) dta db 43 dup (0)
copycos: copycos:
mov ah,4ah
mov bx,1000h
int 21h
jc error
mov ah,48h
mov bx,65536/16
int 21h
jc error
mov fs,ax
mov ah,3Bh mov ah,3Bh
mov dx,offset dat mov dx,offset dat
int 21h int 21h
@ -139,7 +148,7 @@ int 21h
ret ret
addfile: addfile:
push ax bx dx si di bp push ax bx dx si di bp ds es
mov cx,1 mov cx,1
mov bx,offset fat mov bx,offset fat
call readsector call readsector
@ -166,14 +175,20 @@ xor cx,cx
xor dx,dx xor dx,dx
int 21h int 21h
jc error2 jc error2
push fs
pop ds
push fs
pop es
mov ah,3fh mov ah,3fh
mov cx,07FFFh mov cx,0FFFFh
mov dx,offset buffer xor dx,dx
int 21h int 21h
push cs
pop ds
jc error2 jc error2
mov si,-2 mov si,-2
mov di,0 mov di,0
mov bx,offset buffer xor bx,bx
fats: fats:
add si,2 add si,2
cmp si,512 cmp si,512
@ -199,10 +214,12 @@ jnz fats
mov word ptr [offset fat+di],0FFFFh mov word ptr [offset fat+di],0FFFFh
mov bx,offset fat mov bx,offset fat
mov cx,1 mov cx,1
push cs
pop es
call writesector call writesector
mov cx,entrie mov cx,entrie
end1: end1:
pop bp di si dx bx ax pop es ds bp di si dx bx ax
ret ret
entrie dw 0 entrie dw 0
error2: error2:

View File

@ -17,6 +17,7 @@ call loadfatway
mov di,bx mov di,bx
mov bx,47h mov bx,47h
call setint call setint
ret
mov bx,9 mov bx,9
call getint call getint
mov cs:int9seg,ds mov cs:int9seg,ds

274
test.asm Executable file
View File

@ -0,0 +1,274 @@
.model tiny
.486
smart
.code
org 0100h
start:
go:
call calc
jmp go
ret
calc:
pusha
mov ah,2Ch
int 21h
mov bh,dh
xor ebp,ebp
wait2:
xor bl,bl
waits:
mov dx,3dah
in al,dx
and al,1000b
jz wait2
cmp bl,1
je waits
inc ebp
inc bl
cmp ebp,300
jne waits
mov ah,2Ch
int 21h
sub dh,bh
mov bl,dh
xor bh,bh
mov ax,bp
shr ebp,16
mov dx,bp
div bx
xor edx,edx
mov dx,ax
call showint
popa
ret
;===================================Afficher un int EDX a l'cran en ah,al================
ShowInt:
push eax bx cx edx esi di es ds
mov di,0
mov cx,0B800h
mov es,cx
xor cx,cx
mov eax,edx
mov esi,10
mov bx,offset showbuffer+27
decint3:
xor edx,edx
div esi
add dl,'0'
mov dh,cs:colors
sub bx,2
add cx,2
mov cs:[bx],dx
cmp ax,0
jne decint3
mov si,bx
push cs
pop ds
cld
rep movsb
pop ds es di esi edx cx bx eax
ret
showbuffer db 35 dup (0FFh)
colors equ 1
;40*25 16 couleurs
mode0 DB 67H,00H, 03H,08H,03H,00H,02H
DB 2DH,27H,28H,90H,2BH,0A0H,0BFH,01FH,00H,4FH,0DH,0EH,00H,00H,00H,00H
DB 9CH,8EH,8FH,14H,1FH,96H,0B9H,0A3H,0FFH
DB 00H,00H,00H,00H,00H,10H,0EH,00H,0FFH
DB 00H,01H,02H,03H,04H,05H,14H,01H,38H,39H,3AH,3BH,3CH,3DH,3EH,3FH
DB 0CH,00H,0FH,08H,00H
db 40,25
;80*25 16 couleurs
mode1 DB 67H,00H, 03H,00H,03H,00H,02H
DB 5FH,4FH,50H,82H,55H,81H,0BFH,1FH,00H,4FH,0DH,0EH,00H,00H,00H,00H
DB 9CH,0EH,8FH,28H,1FH,96H,0B9H,0A3h,0FFH
DB 00H,00H,00H,00H,00H,10H,0EH,00H,0FFH
DB 00H,01H,02H,03H,04H,05H,6H,7H,8H,9H,0AH,0BH,0CH,0DH,0EH,0FH
DB 0CH,00H,0FH,08H,00H
db 80,25
;80*50 16 couleurs
mode2 DB 67H, 00H, 03H,00H,03H,00H,02H
DB 5FH,4FH,50H,82H,55H,81H,0BFH,1FH,00H,47H,06H,07H,00H,00H,00H
DB 00H,9CH,8EH,8FH,28H,1FH,96H,0B9H,0A3H,0FFH
DB 00H,00H,00H,00H,00H,10H,0EH,00H,0FFH
DB 00H,01H,02H,03H,04H,05H,14H,07H,10H,11H,3AH,3BH,3CH,3DH,3EH,3FH
DB 0CH,00H,0FH,00H,00H
db 80,50
;100*50 16 couleurs
mode3 DB 067H , 00H, 03H,01H,03H,00H,02H
DB 70H, 63H , 64H ,85H,68H,84H,0BFH,1FH,00H,47H,06H,07H,00H,00H,00H
DB 00H,9Ch, 08EH ,8FH, 32H ,1FH,96H,0B9H,0A3H,0FFH
DB 00H,00H,00H,00H,00H,10H,0EH,00H,0FFH
DB 00H,01H,02H,03H,04H,05H,14H,07H,10H,11H,3AH,3BH,3CH,3DH,3EH,3FH
DB 0CH,00H,0FH,00H,00H
db 100,50
;100*60 16 couleurs
mode22 DB 067H , 00H, 03H,01H,03H,00H,02H
DB 70H, 63H , 64H ,85H,68H,84H,0FFH,1FH,00H,47H,06H,07H,00H,00H,00H
DB 00H,0E7H,8EH,0DFH,32H,1FH,0DFH,0E5H,0A3H,0FFH
DB 00H,00H,00H,00H,00H,10H,0EH,00H,0FFH
DB 00H,01H,02H,03H,04H,05H,14H,07H,10H,11H,3AH,3BH,3CH,3DH,3EH,3FH
DB 0CH,00H,0FH,00H,00H
db 100,60
Sequencer equ 03C4h
misc equ 03C2h
misc2 equ 03CCh
CCRT equ 03D4h
Attribs equ 03C0h
graphic equ 03CEh
statut equ 3DAh
;====Met les cl registres conscutif … ds:si du port dx
Setregs:
push ax
xor ax,ax
initreg:
mov ah,[si]
out dx,ax
inc al
inc si
cmp al,cl
jb initreg
pop ax
ret
;met une serie de registres Cl a partir du port dx
Setlowregs:
push ax bx
xor bx,bx
cmp cl,0
je only
initreg2:
mov al,bl
out dx,al
only:
mov al,[si]
out dx,al
inc bl
inc si
cmp bl,cl
jb initreg2
pop bx ax
ret
Setvideomode:
push ax cx dx si
xor ah,ah
mov si,ax
shl si,6
add si,offset mode0
xor cx,cx
mov dx,misc
call setlowregs
mov dx,statut
call setlowregs
mov dx,sequencer
mov cl,5
call setregs
mov ax,0E11h
mov dx,ccrt
out dx,ax
mov cl,25
call setregs
mov dx,graphic
mov cl,9
call setregs
mov dx,attribs
mov cl,20
call setlowregs
mov al,20h
out dx,al
pop dx cx ax si
ret
;====Met les cl registres conscutif … en es:DI du port dx TOUT REGISTRES
getregs:
push ax bx dx
xor bx,bx
cmp cl,0
je only2
initreg4:
mov al,bl
out dx,al
cmp dx,3C1h
je only2
inc dx
only2:
in al,dx
mov es:[di],al
dec dx
inc bl
inc di
cmp bl,cl
jb initreg4
pop dx bx ax
ret
;====Met le mode video present dans Es:di
getvideomode:
push ax cx dx di
xor cx,cx
mov dx,misc2
call getregs
mov dx,statut
call getregs
mov dx,sequencer
mov cl,5
call getregs
mov dx,ccrt
mov cl,25
call getregs
mov dx,graphic
mov cl,9
call getregs
mov dx,attribs
mov cl,20
call getregs
mov al,20h
out dx,al
pop di dx cx ax
ret
;mode scuris al
Safemode:
push cx si di ds es
call setvideomode
mov di,offset buffer
push cs
pop es
push cs
pop ds
call getvideomode
mov byte ptr es:[di+1],0
mov si,offset mode1
mov di,offset buffer
mov cx,62
rep cmpsb
jne errormode
clc
endsafe:
pop ds es di si cx
ret
errormode:
stc
jmp endsafe
buffer db 0
end start

88
unrip.asm Executable file
View File

@ -0,0 +1,88 @@
net segment
org 0100h
assume cs:net,ds:net
start:
jmp deb
taille dw 0
signe2 db 64 dup (0)
p1 db '@'
p2 db '@'
deb:
mov BL,DS:[0080h]
xor BH,BH
or BX,BX
mov byte ptr [0081h+BX],00h
mov AX,3D02h
mov DX,0082H
int 21h
mov bx,ax
mov ah,3fh
mov cx,0ffffh
mov dx,offset data
int 21h
mov taille,ax
mov ah,3eh
int 21h
mov si,82h
mov di,offset signe2
mov cx,64
rep movsb
mov di,offset signe2
mov cx,64
mov al,2eh
repne scasb
mov si,offset data
mov cx,3
rep movsb
mov cx,taille
mov di,offset data
add di,taille
mov dx,1
boucle:
lodsb
cmp al,p1
je pas
suite:
stosb
loop boucle
jmp fin
pas:
mov al,p2
cmp [si+2],al
jne suite
lodsb
mov bx,cx
mov cl,al
xor ch,ch
lodsb
rep stosb
mov cx,bx
sub cx,3
inc si
loop boucle
fin:
mov ah,3ch
mov cx,0
mov dx,offset signe2
int 21h
mov bx,ax
mov ah,40h
mov cx,di
sub cx,offset data
sub cx,taille
mov dx,offset data
add dx,taille
int 21h
mov ah,3eh
int 21h
mov ah,41h
mov dx,82h
int 21h
ret
data db 0
net ends
end start
net

262
verif.asm Executable file
View File

@ -0,0 +1,262 @@
.model tiny
.386c
.code
org 0100h
start:
mov ax,0002
int 47H
mov ah,26
int 47H
replay:
mov ah,2
int 47h
mov ah,21
mov cl,7
int 47h
xor di,di
xor cx,cx
mov ah,20
mov bx,1D00h
mov si,offset Msg
int 47h
mov ah,20
mov bx,0231h
mov si,offset msgapp
int 47h
VerifAll:
mov ah,1
int 16h
cmp al,32
je enend
mov ax,cx
mov si,100
mul si
mov si,2880
div si
xor edx,edx
mov dx,ax
mov ah,15
mov bx,0A14h
int 47h
mov ah,13
mov si,offset po
int 47h
mov ah,15
mov dx,cx
mov bx,0A10h
int 47h
mov ah,13
mov si,offset Msg2
int 47h
mov ah,8
mov edx,0
mov dx,di
int 47h
mov ah,13
mov si,offset Msg3
int 47h
call gauge
call verifysector
jc errors
je noprob
inc di
noprob:
inc cx
cmp cx,2880
jnz verifall
enend:
cmp di,0
je noatall
mov bx,0E09h
mov ah,20
mov si,offset error2
int 47h
jmp someof
noatall:
mov bx,0E09h
mov ah,20
mov si,offset noerror
int 47h
someof:
mov ah,0
int 16h
mov ah,27
int 47h
db 0CBH
errors:
mov ah,21
mov cl,4
int 47h
mov bx,0D09h
mov ah,20
mov si,offset errore
int 47h
mov ah,0
int 16h
jmp replay
errore db 'Error IO with floppy drive, insert a disk and Press a key',0
noerror db 'No defectuous Cluster, Press a key to Quit',0
error2 db 'This disk is bad, Press a key to Quit',0
po db ' %',0
msgapp db '<Press Space to quit>',0
msg db '- Disk Surface Test -',0
msg2 db ' cluster tested. ',0
msg3 db ' defectuous cluster.',0
;->Increment CX
gauge:
push ax bx cx dx si ds
push cs
pop ds
mov ax,cx
mul sizes
div max
mov dx,ax
mov bl,oldvalue
xor bh,bh
mov byte ptr [offset gaugetxt+bx],'Û'
cmp bx,0
jnz nono2
mov ah,21
mov cl,8
int 47h
mov bx,xy
mov ah,20
mov si,offset gaugetxt
int 47h
mov ah,21
mov cl,7
int 47h
nono2:
mov bx,dx
xor bh,bh
mov byte ptr [offset gaugetxt+bx],0
mov oldvalue,bl
mov bx,xy
mov ah,20
mov si,offset gaugetxt
int 47h
pop ds si dx cx bx ax
ret
oldvalue db 0
max dw 2880
sizes dw 50
xy dw 0A12h
gaugetxt db 'ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ',0
Inverse:
mov si,512/4
invert:
shl si,2
not dword ptr [bx+si-4]
shr si,2
dec si
jnz invert
ret
VerifySector:
push bx cx si di ds es
push cs
pop es
push cs
pop ds
mov bx,offset buffer
call ReadSector
jc errorverify
call inverse
call WriteSector
jc errorverify
mov bx,offset buffer2
call ReadSector
call inverse
jc errorverify
mov bx,offset buffer
call inverse
call WriteSector
jc errorverify
mov cx,512/4
mov si,offset buffer
mov di,offset buffer2
cld
rep cmpsd
errorverify:
pop es ds di si cx bx
ret
ReadSector:
push ax cx dx si
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
Done:
pop si dx cx ax
ret
WriteSector:
push ax cx dx si
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
DiskSectorsPerTrack dw 18
DiskTracksPerHead dw 80
DiskHeads dw 2
Buffer equ $
Buffer2 equ $+512
End Start

View File

@ -167,7 +167,7 @@ reg1 dw 0100h, 0402h, 0704h, 0300h
dw 0204h, 0005h, 0406h dw 0204h, 0005h, 0406h
;40*25 16 couleurs ;40*25 16 couleurs
mode0 DB 63H,00H, 03H,09H,03H,00H,02H mode0 DB 67H,00H, 03H,08H,03H,00H,02H
DB 2DH,27H,28H,90H,2BH,0A0H,0BFH,01FH,00H,4FH,0DH,0EH,00H,00H,00H,00H DB 2DH,27H,28H,90H,2BH,0A0H,0BFH,01FH,00H,4FH,0DH,0EH,00H,00H,00H,00H
DB 9CH,8EH,8FH,14H,1FH,96H,0B9H,0A3H,0FFH DB 9CH,8EH,8FH,14H,1FH,96H,0B9H,0A3H,0FFH
DB 00H,00H,00H,00H,00H,10H,0EH,00H,0FFH DB 00H,00H,00H,00H,00H,10H,0EH,00H,0FFH
@ -178,14 +178,14 @@ mode0 DB 63H,00H, 03H,09H,03H,00H,02H
;80*25 16 couleurs ;80*25 16 couleurs
mode1 DB 67H,00H, 03H,00H,03H,00H,02H mode1 DB 67H,00H, 03H,00H,03H,00H,02H
DB 5FH,4FH,50H,82H,55H,81H,0BFH,1FH,00H,4FH,0DH,0EH,00H,00H,00H,00H DB 5FH,4FH,50H,82H,55H,81H,0BFH,1FH,00H,4FH,0DH,0EH,00H,00H,00H,00H
DB 9CH,0EH,8FH,28H,1FH,96H,0B9H,0A3H,0FFH DB 9CH,0EH,8FH,28H,1FH,96H,0B9H,0A3h,0FFH
DB 00H,00H,00H,00H,00H,10H,0EH,00H,0FFH DB 00H,00H,00H,00H,00H,10H,0EH,00H,0FFH
DB 00H,01H,02H,03H,04H,05H,14H,07H,38H,39H,3AH,3BH,3CH,3DH,3EH,3FH DB 00H,01H,02H,03H,04H,05H,14H,07H,38H,39H,3AH,3BH,3CH,3DH,3EH,3FH
DB 0CH,00H,0FH,08H,00H DB 0CH,00H,0FH,08H,00H
db 80,25 db 80,25
;80*50 16 couleurs ;80*50 16 couleurs
mode2 DB 63H, 00H, 03H,01H,03H,01H,02H mode2 DB 67H, 00H, 03H,00H,03H,01H,02H
DB 5FH,4FH,50H,82H,55H,81H,0BFH,1FH,00H,47H,06H,07H,00H,00H,00H DB 5FH,4FH,50H,82H,55H,81H,0BFH,1FH,00H,47H,06H,07H,00H,00H,00H
DB 00H,9CH,8EH,8FH,28H,1FH,96H,0B9H,0A3H,0FFH DB 00H,9CH,8EH,8FH,28H,1FH,96H,0B9H,0A3H,0FFH
DB 00H,00H,00H,00H,00H,10H,0EH,00H,0FFH DB 00H,00H,00H,00H,00H,10H,0EH,00H,0FFH
@ -193,8 +193,28 @@ mode2 DB 63H, 00H, 03H,01H,03H,01H,02H
DB 0CH,00H,0FH,00H,00H DB 0CH,00H,0FH,00H,00H
db 80,50 db 80,50
;100*50 16 couleurs
mode3 DB 067H,00H,03H,01H,03H,01H,02H
DB 70H,63H,64H,85H,68H,84H,0BFH,1FH,00H,47H,06H,07H,00H,00H,00H
DB 00H,9Ch,08EH,8FH,32H,1FH,96H,0B9H,0A3H,0FFH
DB 00H,00H,00H,00H,00H,10H,0EH,00H,0FFH
DB 00H,01H,02H,03H,04H,05H,14H,07H,10H,11H,3AH,3BH,3CH,3DH,3EH,3FH
DB 0CH,00H,0FH,00H,00H
db 100,50
;100*60 16 couleurs
mode4b DB 067H,00H,03H,01H,03H,01H,02H
DB 70H,63H,64H,85H,68H,84H,0FFH,1FH,00H,47H,06H,07H,00H,00H,00H
DB 00H,0E7H,8EH,0DFH,32H,1FH,0DFH,0E5H,0A3H,0FFH
DB 00H,00H,00H,00H,00H,10H,0EH,00H,0FFH
DB 00H,01H,02H,03H,04H,05H,14H,07H,10H,11H,3AH,3BH,3CH,3DH,3EH,3FH
DB 0CH,00H,0FH,00H,00H
db 100,60
;320*200 16 couleurs ;320*200 16 couleurs
mode3 DB 63H,00H, 03H,09H,0FH,00H,06H mode4 DB 63H,00H, 03H,09H,0FH,00H,06H
DB 2DH,27H,28H,90H,2BH,080H,0BFH,01FH,00H,0C0H,00H,00H,00H,00H,00H,00H DB 2DH,27H,28H,90H,2BH,080H,0BFH,01FH,00H,0C0H,00H,00H,00H,00H,00H,00H
DB 9CH,8EH,8FH,14H,00H,96H,0B9H,0E3H,0FFH DB 9CH,8EH,8FH,14H,00H,96H,0B9H,0E3H,0FFH
DB 00H,00H,00H,00H,00H,00H,05H,0FH,0FFH DB 00H,00H,00H,00H,00H,00H,05H,0FH,0FFH
@ -203,7 +223,7 @@ mode3 DB 63H,00H, 03H,09H,0FH,00H,06H
db 40,25 db 40,25
;320*200 256 couleurs ;320*200 256 couleurs
mode4 DB 63H, 00H, 03H,01H,0FH,00H,0EH mode5 DB 63H, 00H, 03H,01H,0FH,00H,0EH
DB 5FH,4FH,50H,82H,54H,80H,0BFH,1FH,00H,41H,00H,00H,00H,00H,00H,00H DB 5FH,4FH,50H,82H,54H,80H,0BFH,1FH,00H,41H,00H,00H,00H,00H,00H,00H
DB 9CH,0EH,8FH,28H,40H,96H,0B9H,0A3H,0FFH DB 9CH,0EH,8FH,28H,40H,96H,0B9H,0A3H,0FFH
DB 00H,00H,00H,00H,00H,40H,05H,0FH,0FFH DB 00H,00H,00H,00H,00H,40H,05H,0FH,0FFH
@ -212,7 +232,7 @@ mode4 DB 63H, 00H, 03H,01H,0FH,00H,0EH
db 00,00 db 00,00
;640*400 16 couleurs ;640*400 16 couleurs
mode5 DB 63H, 00H, 03H,01H,0FH,00H,0EH mode6 DB 63H, 00H, 03H,01H,0FH,00H,0EH
DB 5FH,4FH,50H,82H,54H,80H,0BFH,1FH,00H,41H,00H,00H,00H,00H,00H,00H DB 5FH,4FH,50H,82H,54H,80H,0BFH,1FH,00H,41H,00H,00H,00H,00H,00H,00H
DB 9CH,0EH,8FH,28H,40H,96H,0B9H,0A3H,0FFH DB 9CH,0EH,8FH,28H,40H,96H,0B9H,0A3H,0FFH
DB 00H,00H,00H,00H,00H,10H,05H,0FH,0FFH DB 00H,00H,00H,00H,00H,10H,05H,0FH,0FFH
@ -220,8 +240,8 @@ mode5 DB 63H, 00H, 03H,01H,0FH,00H,0EH
DB 41H,00H,0FH,00H,00H DB 41H,00H,0FH,00H,00H
db 00,00 db 00,00
;640*400 16 couleurs ;640*400 256 couleurs
mode6 DB 63H, 00H, 03H,01H,0FH,00H,0EH mode7 DB 63H, 00H, 03H,01H,0FH,00H,0EH
DB 2DH,27H,27H,91H,2AH,9FH,0BFH,1FH,00H,0C0H,00H,00H,00H,00H,00H,00H DB 2DH,27H,27H,91H,2AH,9FH,0BFH,1FH,00H,0C0H,00H,00H,00H,00H,00H,00H
DB 9CH,0EH,8FH,50H,00H,8FH,0C0H,0E3H,0FFH DB 9CH,0EH,8FH,50H,00H,8FH,0C0H,0E3H,0FFH
DB 00H,00H,00H,00H,00H,40H,05H,0FH,0FFH DB 00H,00H,00H,00H,00H,40H,05H,0FH,0FFH
@ -229,14 +249,8 @@ mode6 DB 63H, 00H, 03H,01H,0FH,00H,0EH
DB 41H,00H,0FH,00H,00H DB 41H,00H,0FH,00H,00H
db 00,00 db 00,00
;640*400 16 couleurs
mode6 DB 63H, 00H, 03H,01H,0FH,00H,0EH
DB 2DH,27H,27H,91H,2AH,9FH,0BFH,1FH,00H,0C0H,00H,00H,00H,00H,00H,00H
DB 9CH,0EH,8FH,50H,00H,8FH,0C0H,0E3H,0FFH
DB 00H,00H,00H,00H,00H,40H,05H,0FH,0FFH
DB 00H,01H,02H,03H,04H,05H,06H,07H,08H,09H,0AH,0BH,0CH,0DH,0EH,0FH
DB 41H,00H,0FH,00H,00H
db 00,00
; ;
;=============CLEAR========= ;=============CLEAR=========
@ -287,11 +301,14 @@ statut equ 3DAh
initmode: initmode:
push bx cx si ds push bx cx si ds
mov bl,1 ;xor bx,bx
mov cl,8 ;mov ds,bx
;lds si,ds:[43h*4]
push cs push cs
pop ds pop ds
mov si,offset special mov si,offset font
mov cl,8
mov bl,1
call loadfont call loadfont
pop ds si cx bx pop ds si cx bx
ret ret
@ -524,8 +541,8 @@ mov bl,bh
xor bh,bh xor bh,bh
mov di,bx mov di,bx
mul cs:columns mul cs:columns
shl ax,1
add di,ax add di,ax
shl di,1
mov cs:xy,di mov cs:xy,di
mov ax,0B800h mov ax,0B800h
mov es,ax mov es,ax
@ -586,8 +603,6 @@ RestoreScreen:
rep movsd rep movsd
pop es ds di si cx pop es ds di si cx
ret ret
copy2 db 4000 dup (0)
copy db 4000 dup (0)
;===============================Page2to1============================ ;===============================Page2to1============================
Page2to1: Page2to1:
@ -905,7 +920,10 @@ xy dw 0
colors db 7 colors db 7
mode db 0FFh mode db 0FFh
pagesize dw 0 pagesize dw 0
special equ $ font equ $
endofme equ $ +4096 copy equ $+4000
copy2 equ $+8000
endofme equ $ +12000
end start end start