feat: reprogrammation en utilisant la librairie video

This commit is contained in:
Nicolas Hordé 2004-11-28 22:55:03 +00:00
parent 708590c85e
commit 0070bf3d5d
2 changed files with 102 additions and 136 deletions

View File

@ -1,10 +1,16 @@
.model tiny .model tiny
.386c .486
smart
.code .code
org 0h org 0h
include ..\include\mem.h
start: start:
header exe <,1,0,,,offset imports,,>
realstart:
mov ax,0305h mov ax,0305h
mov bx,0008h mov bx,0008h
int 16h int 16h
@ -43,62 +49,43 @@ Adres:
int 47h int 47h
mov bh,infos mov bh,infos
mov edi,ebp mov edi,ebp
mov ah,21
mov cl,7
int 47h
lines: lines:
xor edx,edx
mov dx,di
push edx
mov edx,edi mov edx,edi
shr edx,4*4 shr edx,4*4
shl edx,4*3 shl edx,4*3
mov cx,16 push edx
mov ah,10 push offset spaces
int 47h call [print]
mov si,offset dep
mov ah,13
int 47h
mov dx,di mov dx,di
mov ah,10
int 47h
mov ah,13
mov si,offset spaces
int 47h
mov ah,5
int 47h
mov al,infos+1 mov al,infos+1
mov cl,7
mov ah,21
int 47h
mov esi,edi mov esi,edi
doaline: doaline:
mov edx,edi mov edx,edi
shr edx,4*4 shr edx,4*4
shl edx,4*3 shl edx,4*3
mov fs,dx mov fs,dx
mov dl,fs:[di] push dword ptr fs:[di]
mov ah,10 push 8
mov cl,8 call [showhex]
int 47h push ' '
mov ah,5 call [showchar]
int 47h
inc edi inc edi
dec al dec al
jnz doaline jnz doaline
mov edi,esi mov edi,esi
mov si,offset spaces push offset spaces2
mov ah,13 call [print]
int 47h
mov al,infos+1 mov al,infos+1
mov ah,21
mov cl,7
int 47h
doaline2: doaline2:
mov edx,edi mov edx,edi
shr edx,4*4 shr edx,4*4
shl edx,4*3 shl edx,4*3
mov fs,dx mov fs,dx
mov dl,fs:[di] push word ptr fs:[di]
mov ah,7 call [showchar]
int 47h
inc edi inc edi
dec al dec al
jnz doaline2 jnz doaline2
@ -110,14 +97,12 @@ doaline2:
int 47h int 47h
jmp lines jmp lines
outes: outes:
mov ah,21
mov cl,112
int 47h
mov bh,0 mov bh,0
mov bl,infos mov bl,infos
mov si,offset menu mov ah,25
mov ah,14h
int 47h int 47h
push offset menu
call [print]
waitkey: waitkey:
mov ax,0 mov ax,0
int 16h int 16h
@ -153,18 +138,13 @@ outes:
suit6: suit6:
cmp ax,4100h cmp ax,4100h
jne suit7 jne suit7
mov ah,21
mov cl,116
int 47h
mov dword ptr [pope],'TIDE' mov dword ptr [pope],'TIDE'
mov bh,0
mov bl,infos mov bl,infos
xor bh,bh mov ah,25
mov si,offset menu
mov ah,14h
int 47h
mov ah,21
mov cl,7
int 47h int 47h
push offset menu
call [print]
mov ax,0B800h mov ax,0B800h
mov es,ax mov es,ax
mov xxyy2,3 mov xxyy2,3
@ -243,28 +223,20 @@ writs:
cmp ch,cl cmp ch,cl
je no je no
push si ax push si ax
mov ah,25 mov bh,0
mov bl,infos mov bl,infos
xor bh,bh mov ah,25
int 47h
mov ah,21
mov cl,117
int 47h
mov si,offset msg
mov ah,13
int 47h int 47h
push offset msg
call [print]
mov ax,0 mov ax,0
int 16h int 16h
mov bh,0
mov bl,infos mov bl,infos
xor bh,bh
mov ah,25 mov ah,25
int 47h int 47h
mov ah,21 push offset menu
mov cl,116 call [print]
int 47h
mov ah,13
mov si,offset menu
int 47h
pop bx si pop bx si
mov es:[bx-1],edi mov es:[bx-1],edi
mov es:[si-1],dx mov es:[si-1],dx
@ -289,8 +261,7 @@ cursor:
jne adres jne adres
mov ah,29h mov ah,29h
int 47h int 47h
db 0CBH ; +++++++ retf
ret
calc1: calc1:
push ax dx si push ax dx si
@ -377,14 +348,25 @@ yy dw 0
xxyy dw 3 xxyy dw 3
xxyy2 dw 3 xxyy2 dw 3
msg db 'Erreur : zone non modifiable (ROM) pressez une touche pour continuer ',0 msg db '\c74Erreur : zone non modifiable (ROM) pressez une touche pour continuer ',0
menu db 'haut/bas [F1/2] Offset [F3/4] Segment [F5/6] Mode F7, Quitter F8 MODE ' menu db '\c70haut/bas [F1/2] Offset [F3/4] Segment [F5/6] Mode F7, Quitter F8 MODE '
pope db 'VUE ',0 pope db 'VUE ',0
spaces db ' ³ ',0 spaces db '\c02%hW:%hW \c04| \c07',0
spaces2 db '\c04 | \c07',0
showbuffer db 35 dup (0FFh) showbuffer db 35 dup (0FFh)
oldmode db 0 oldmode db 0
infos db 40 dup (0) infos db 40 dup (0)
imports:
db "VIDEO.LIB::print",0
print dd 0
db "VIDEO.LIB::showhex",0
showhex dd 0
db "VIDEO.LIB::showchar",0
showchar dd 0
dw 0
end start end start

View File

@ -1,10 +1,16 @@
.model tiny .model tiny
.386c .486
smart
.code .code
org 0h org 0h
include ..\include\mem.h
start: start:
header exe <,1,0,,,offset imports,,>
realstart:
mov ax,0305h mov ax,0305h
mov bx,0008h mov bx,0008h
int 16h int 16h
@ -38,12 +44,8 @@ Adres:
mov bl,infos mov bl,infos
xor bh,bh xor bh,bh
int 47h int 47h
mov ah,21 push offset errordisk
mov cl,116 call [print]
int 47h
mov ah,13
mov si,offset errordisk
int 47h
mov ax,0 mov ax,0
int 16h int 16h
noerror: noerror:
@ -71,52 +73,32 @@ Adres:
int 47h int 47h
mov bh,infos mov bh,infos
mov di,bp mov di,bp
mov ah,21
mov cl,7
int 47h
lines: lines:
mov dx,sect xor edx,edx
mov cx,16
mov ah,10
int 47h
mov si,offset dep
mov ah,13
int 47h
mov dx,di mov dx,di
mov ah,10 push edx
int 47h mov dx,sect
mov ah,13 push edx
mov si,offset spaces push offset spaces
int 47h call [print]
mov ah,5
int 47h
mov al,infos+1 mov al,infos+1
mov cl,7
mov ah,21
int 47h
mov si,di mov si,di
doaline: doaline:
mov dl,[di+offset buffer] push dword ptr [di+offset buffer]
mov ah,10 push 8
mov cl,8 call [showhex]
int 47h push ' '
mov ah,5 call [showchar]
int 47h
inc di inc di
dec al dec al
jnz doaline jnz doaline
mov di,si mov di,si
mov si,offset spaces push offset spaces2
mov ah,13 call [print]
int 47h
mov al,infos+1 mov al,infos+1
mov ah,21
mov cl,7
int 47h
doaline2: doaline2:
mov dl,[di+offset buffer] push word ptr [di+offset buffer]
mov ah,7 call [showchar]
int 47h
inc di inc di
dec al dec al
jnz doaline2 jnz doaline2
@ -128,14 +110,12 @@ doaline2:
int 47h int 47h
jmp lines jmp lines
outes: outes:
mov ah,21
mov cl,112
int 47h
mov bh,0 mov bh,0
mov bl,infos mov bl,infos
mov si,offset menu mov ah,25
mov ah,14h
int 47h int 47h
push offset menu
call [print]
waitkey: waitkey:
mov ax,0 mov ax,0
int 16h int 16h
@ -183,19 +163,12 @@ outes:
cmp ax,4100h cmp ax,4100h
jne suit7 jne suit7
mov dword ptr [pope],'TIDE' mov dword ptr [pope],'TIDE'
mov bh,0
mov bl,infos mov bl,infos
xor bh,bh
mov ah,25 mov ah,25
int 47h int 47h
mov ah,21 push offset menu
mov cl,116 call [print]
int 47h
mov si,offset menu
mov ah,13
int 47h
mov ah,21
mov cl,7
int 47h
mov ax,0B800h mov ax,0B800h
mov es,ax mov es,ax
mov xxyy2,3 mov xxyy2,3
@ -290,8 +263,7 @@ cursor:
jne adres2 jne adres2
mov ah,29h mov ah,29h
int 47H int 47H
db 0CBH retf
ret
calc1: calc1:
push ax dx si push ax dx si
@ -375,16 +347,28 @@ xx dw 0
yy dw 0 yy dw 0
xxyy dw 3 xxyy dw 3
xxyy2 dw 3 xxyy2 dw 3
errordisk db 'Une erreur est apparue sur le lecteur, appuyez sur une touche ',0
menu db 'Haut&Bas [F1/2] Secteur [F3/4] Charger/Sauver [F5/6] Mode [F7] Quit. [F8] ' errordisk db '\c74Une erreur est apparue sur le lecteur, appuyez sur une touche ',0
pope db 'VIEW',0 menu db '\c70Haut&Bas [F1/2] Secteur [F3/4] Charger/Sauver [F5/6] Mode [F7] Quit. [F8] '
spaces db ' ³ ',0 pope db 'VUE ',0
spaces db '\c02%hW:%hW \c04| \c07',0
spaces2 db '\c04 | \c07',0
showbuffer db 35 dup (0FFh) showbuffer db 35 dup (0FFh)
oldmode db 0 oldmode db 0
infos db 40 dup (0) infos db 40 dup (0)
buffer db 2048 dup (0) buffer db 2048 dup (0)
imports:
db "VIDEO.LIB::print",0
print dd 0
db "VIDEO.LIB::showhex",0
showhex dd 0
db "VIDEO.LIB::showchar",0
showchar dd 0
dw 0
end start end start