feat: mise à jour du code pour compilation sur LZASM en stdcall
This commit is contained in:
parent
1d17c0fc92
commit
1f1e1628b1
|
@ -1,94 +1,100 @@
|
||||||
.model tiny
|
model tiny,stdcall
|
||||||
.486
|
p586N
|
||||||
smart
|
locals
|
||||||
.code
|
jumps
|
||||||
|
codeseg
|
||||||
|
option procalign:byte
|
||||||
|
|
||||||
|
include "..\include\mem.h"
|
||||||
|
include "..\include\fat.h"
|
||||||
|
include "..\include\divers.h"
|
||||||
|
include "..\include\graphic.h"
|
||||||
|
|
||||||
org 0h
|
org 0h
|
||||||
|
|
||||||
include ..\include\mem.h
|
|
||||||
include ..\include\fat.h
|
|
||||||
|
|
||||||
start:
|
start:
|
||||||
header exe <,1,0,,,offset imports,,>
|
header exe <"CE",1,0,0,,offset imports,,offset realstart>
|
||||||
|
|
||||||
realstart:
|
realstart:
|
||||||
push offset msg1
|
call [saveparamto],offset infos
|
||||||
call [print]
|
call [print],offset msg1
|
||||||
|
call [initdrive]
|
||||||
mov ah,3
|
xor bp,bp
|
||||||
int 48h
|
call [findfirstfile],offset bufferentry
|
||||||
xor bp,bp
|
jc nofiles
|
||||||
mov di,offset bufferentry
|
|
||||||
mov ah,7
|
|
||||||
int 48h
|
|
||||||
jc nofiles
|
|
||||||
go:
|
go:
|
||||||
push word ptr [di+Entries.FileAttr]
|
push [word bufferentry.result.fileattr]
|
||||||
push dword ptr [di+Entries.FileSize]
|
push [bufferentry.result.filesize]
|
||||||
push word ptr [di+Entries.FileTime]
|
push [bufferentry.result.filetime]
|
||||||
push word ptr [di+Entries.FileDate]
|
push [bufferentry.result.filedate]
|
||||||
push word ptr [di+Entries.FileTimeCrea]
|
push [bufferentry.result.filetimecrea]
|
||||||
push word ptr [di+Entries.FileDateCrea]
|
push [bufferentry.result.filedatecrea]
|
||||||
push di
|
mov bx,offset bufferentry.result.filename
|
||||||
push offset line
|
push bx
|
||||||
call [print]
|
push offset line
|
||||||
inc bp
|
call [print]
|
||||||
mov ah,8
|
|
||||||
int 48h
|
call [findnextfile],offset bufferentry
|
||||||
jnc go
|
jc nofiles
|
||||||
|
inc bp
|
||||||
|
jmp go
|
||||||
nofiles:
|
nofiles:
|
||||||
push offset menu
|
call [print],offset menu
|
||||||
call [print]
|
mov [xx],1
|
||||||
mov xx,1
|
call changelineattr,[xx],112
|
||||||
mov xxold,2
|
|
||||||
call Select
|
|
||||||
endof:
|
endof:
|
||||||
mov ax,0
|
mov ax,0
|
||||||
int 16h
|
int 16h
|
||||||
cmp ah,50h
|
cmp ah,50h
|
||||||
jne tre1
|
jne tre1
|
||||||
cmp xx,bp
|
cmp [xx],bp
|
||||||
ja endof
|
ja endof
|
||||||
inc xx
|
call changelineattr,[xx],7
|
||||||
call select
|
inc [xx]
|
||||||
jmp endof
|
call changelineattr,[xx],112
|
||||||
|
jmp endof
|
||||||
tre1:
|
tre1:
|
||||||
cmp ah,48h
|
cmp ah,48h
|
||||||
jne tre2
|
jne tre2
|
||||||
cmp xx,1
|
cmp [xx],1
|
||||||
je endof
|
je endof
|
||||||
dec xx
|
call changelineattr,[xx],7
|
||||||
call select
|
dec [xx]
|
||||||
jmp endof
|
call changelineattr,[xx],112
|
||||||
|
jmp endof
|
||||||
tre2:
|
tre2:
|
||||||
cmp al,0Dh
|
cmp al,0Dh
|
||||||
jne tre3
|
jne tre3
|
||||||
tre3:
|
tre3:
|
||||||
cmp ah,59
|
cmp ah,59
|
||||||
jne tre4
|
jne tre4
|
||||||
jmp realstart
|
jmp realstart
|
||||||
tre4:
|
tre4:
|
||||||
cmp ah,67
|
cmp ah,67
|
||||||
jne endof
|
jne endof
|
||||||
retf
|
retf
|
||||||
|
|
||||||
;selectionne la ligne xx
|
;couleur al pour ligne %0 en %1
|
||||||
Select:
|
PROC changelineattr near
|
||||||
push ax di
|
USES ax,bx,di,es
|
||||||
mov di,xxold
|
ARG @line:word,@attr:word
|
||||||
mov al,7
|
mov ax,0B800h
|
||||||
add di,3
|
mov es,ax
|
||||||
mov ah,32
|
mov ax,[@line]
|
||||||
int 47h
|
add ax,3
|
||||||
mov ax,xx
|
mul [cs:infos.columns]
|
||||||
mov xxold,ax
|
mov di,ax
|
||||||
mov di,xx
|
shl di,1
|
||||||
mov ah,32
|
mov al,[cs:infos.columns]
|
||||||
mov al,112
|
inc di
|
||||||
add di,3
|
mov bx,[@attr]
|
||||||
int 47h
|
@@popep:
|
||||||
pop di ax
|
mov [es:di],bl
|
||||||
ret
|
add di,2
|
||||||
|
dec al
|
||||||
|
jnz @@popep
|
||||||
|
ret
|
||||||
|
endp changelineattr
|
||||||
|
|
||||||
xx dw 1
|
xx dw 1
|
||||||
xxold dw 0
|
xxold dw 0
|
||||||
|
@ -96,14 +102,16 @@ menu db '\c70 [F1] Lire disque [F9] Quitter
|
||||||
msg1 db '\e\g00,00\c70 Gestionnaire de fichier Version 1.5 '
|
msg1 db '\e\g00,00\c70 Gestionnaire de fichier Version 1.5 '
|
||||||
db '\g00,01\c07--------------------------------------------------------------------------------'
|
db '\g00,01\c07--------------------------------------------------------------------------------'
|
||||||
db '\g00,02Nom Ext. Date creation Date modification Taille Attributs'
|
db '\g00,02Nom Ext. Date creation Date modification Taille Attributs'
|
||||||
db '\g00,03--------------------------------------------------------------------------------\l',0
|
db '\g00,03-------------------------------------------------------------------------------\l',0
|
||||||
line db '\c07%n %d %t %d %t %z %a\l',0
|
line db '\c07%n %d %t %d %t %z %a\l',0
|
||||||
bufferentry db 512 dup (0)
|
bufferentry find <>
|
||||||
|
infos vgainf <>
|
||||||
|
|
||||||
|
importing
|
||||||
|
use VIDEO.LIB,print
|
||||||
|
use VIDEO,saveparamto
|
||||||
|
use DISQUE,initdrive
|
||||||
|
use DISQUE,findfirstfile
|
||||||
|
use DISQUE,findnextfile
|
||||||
|
endi
|
||||||
|
|
||||||
imports:
|
|
||||||
db "VIDEO.LIB::print",0
|
|
||||||
print dd 0
|
|
||||||
dw 0
|
|
||||||
|
|
||||||
end start
|
|
||||||
|
|
Loading…
Reference in New Issue