2019-07-13 20:49:22 +02:00
use16
align 1
2007-03-23 17:31:09 +01:00
include "..\include\fat.h"
include "..\include\mem.h"
include "..\include\divers.h"
2007-03-31 17:00:23 +02:00
include "..\include\pci.h"
include "..\include\cpu.h"
2004-06-12 23:34:04 +02:00
2007-03-23 17:31:09 +01:00
org 0h
2004-06-12 23:34:04 +02:00
2019-07-14 12:47:14 +02:00
header exe 1 , 0 , imports , 0 , realstart
2004-11-29 23:41:00 +01:00
realstart:
2019-07-09 18:30:00 +02:00
invoke print , msginit
2004-06-12 23:34:04 +02:00
xor bp , bp
replay:
2019-07-09 18:30:00 +02:00
invoke addline
2004-06-12 23:34:04 +02:00
noret:
2019-07-09 18:30:00 +02:00
invoke addline
mov di , di r
invoke getdir , di
invoke print , di
invoke print , prompt
mov di , buffer
2004-06-12 23:34:04 +02:00
waitchar:
2007-03-23 17:31:09 +01:00
xor ax , ax
2004-06-12 23:34:04 +02:00
int 16h
2019-07-09 18:30:00 +02:00
invoke convertfr
2004-06-12 23:34:04 +02:00
cmp ah , 59
jne norr
cmp bp , 0
je waitchar
2019-07-09 18:30:00 +02:00
invoke print , word [ cs : bp ]
invoke copy , word [ cs : bp ], di
invoke getlength , di
2007-03-23 17:31:09 +01:00
add di , ax
2004-06-12 23:34:04 +02:00
jmp waitchar
norr:
2004-11-30 20:30:30 +01:00
cmp al , 0dh ;entr<74> e
2004-06-12 23:34:04 +02:00
je entere
2004-11-30 20:30:30 +01:00
cmp al , 08h ;backspace
2004-11-10 17:50:43 +01:00
je backspace
2004-11-30 20:30:30 +01:00
cmp al , 27 ;echap
2004-11-10 17:50:43 +01:00
je es cape
2004-11-10 12:54:51 +01:00
cmp al , ' '
jb waitchar
2019-07-09 18:30:00 +02:00
cmp di , buffer + 256
2004-06-12 23:34:04 +02:00
je waitchar
mov [ di ], al
inc di
2019-07-09 18:30:00 +02:00
invoke showchar , ax
2004-06-12 23:34:04 +02:00
jmp waitchar
2004-11-10 17:50:43 +01:00
escape:
2019-07-09 18:30:00 +02:00
cmp di , buffer
2004-11-10 17:50:43 +01:00
je waitchar
2019-07-09 18:30:00 +02:00
invoke getxy
mov dx , buffer
2004-11-10 17:50:43 +01:00
mov cx , di
sub cx , dx
js waitchar
je waitchar
2007-03-23 17:31:09 +01:00
sub ah , cl
mov cl , ah
xor ah , ah
xor ch , ch
2019-07-09 18:30:00 +02:00
invoke setxy , cx , ax
mov di , buffer
mov byte [ di ], 0
2007-03-23 17:31:09 +01:00
jmp waitchar
2004-11-10 17:50:43 +01:00
backspace:
2019-07-09 18:30:00 +02:00
cmp di , buffer
2004-11-10 17:50:43 +01:00
je waitchar
2019-07-09 18:30:00 +02:00
invoke getxy
2007-03-23 17:31:09 +01:00
dec ah
mov cl , ah
xor ah , ah
xor ch , ch
2019-07-09 18:30:00 +02:00
invoke setxy , cx , ax
invoke showchar , ' '
invoke setxy , cx , ax
2004-11-10 17:50:43 +01:00
dec di
2019-07-09 18:30:00 +02:00
mov byte [ di ], 0
2004-11-10 17:50:43 +01:00
jmp waitchar
2004-06-12 23:34:04 +02:00
entere:
2019-07-09 18:30:00 +02:00
mov byte [ di ], 0
cmp di , buffer
2004-06-12 23:34:04 +02:00
je noret
2019-07-09 18:30:00 +02:00
mov si , temp
invoke addline
invoke getitem , buffer , si , 0 , ' '
invoke uppercase , si
mov bx , commands
2004-06-12 23:34:04 +02:00
xor bp , bp
2007-03-23 17:31:09 +01:00
xor dx , dx
2004-06-12 23:34:04 +02:00
tre:
mov di ,[ bx ]
cmp di , 0
je error
2019-07-09 18:30:00 +02:00
invoke evalue , si , di
2007-03-23 17:31:09 +01:00
cmp ax , dx
2004-06-12 23:34:04 +02:00
jb noadd
2007-03-23 17:31:09 +01:00
mov dx , ax
mov bp , bx
2004-11-30 20:30:30 +01:00
noadd:
2019-07-09 18:30:00 +02:00
invoke cmpstr , si , di
2007-03-23 17:31:09 +01:00
je strisok
add bx , 8
jmp tre
strisok:
2019-07-09 18:30:00 +02:00
mov di , temp
invoke copy , buffer , di
invoke uppercase , di
2004-06-12 23:34:04 +02:00
xor cx , cx
inc cx
2019-07-09 18:30:00 +02:00
invoke getpointeritem , di , cx , ' '
2007-03-23 17:31:09 +01:00
mov di , ax
2019-07-09 18:30:00 +02:00
cmp byte [ di - 1 ], 0
2004-06-12 23:34:04 +02:00
jne nopod
2019-07-09 18:30:00 +02:00
mov byte [ di ], 0
2004-06-12 23:34:04 +02:00
nopod:
2019-07-09 18:30:00 +02:00
invoke ch ecksyntax , di , word [ bx + 4 ], ' '
2004-06-12 23:34:04 +02:00
jc errorprec
2007-03-23 17:31:09 +01:00
mov bx ,[ bx + 2 ]
2019-07-09 18:30:00 +02:00
invoke bx
2004-06-12 23:34:04 +02:00
jmp replay
error:
2019-07-09 18:30:00 +02:00
mov di , buffer
invoke searchchar , di , '.'
2007-03-23 17:31:09 +01:00
je noaddext
2019-07-09 18:30:00 +02:00
invoke concat , extcom , di
2004-06-12 23:34:04 +02:00
noaddext:
2019-07-09 18:30:00 +02:00
invoke execfile , di
2004-06-12 23:34:04 +02:00
jc reallyerror
xor bp , bp
jmp replay
reallyerror:
2019-07-09 18:30:00 +02:00
push word [ cs : bp ]
push error_syntax
invoke print
2004-06-12 23:34:04 +02:00
jmp replay
errorprec:
2019-07-09 18:30:00 +02:00
push derror
invoke print
2004-06-12 23:34:04 +02:00
jmp replay
2004-11-30 20:30:30 +01:00
code_exit:
2004-06-12 23:34:04 +02:00
pop ax
2004-11-29 23:41:00 +01:00
retf
2004-11-30 20:30:30 +01:00
2007-03-23 17:31:09 +01:00
code_version:
2019-07-09 18:30:00 +02:00
invoke print , version_text
2004-06-12 23:34:04 +02:00
ret
2004-11-30 20:30:30 +01:00
2007-03-31 21:23:20 +02:00
version_text db 'Cos 2000 version 1.4Fr par \c04MrNop\c07' , 0
2004-11-30 20:30:30 +01:00
code_cls:
2019-07-09 18:30:00 +02:00
invoke cl earscreen
2004-06-12 23:34:04 +02:00
ret
2004-11-30 20:30:30 +01:00
code_reboot:
push 0ffffh
2004-06-12 23:34:04 +02:00
push 00000h
2004-11-30 20:30:30 +01:00
retf
2007-03-23 17:31:09 +01:00
code_command:
2019-07-09 18:30:00 +02:00
invoke print , def
mov bx , commands
2004-06-12 23:34:04 +02:00
showalls:
2019-07-09 18:30:00 +02:00
push word [ bx + 4 ]
push word [ bx + 6 ]
push word [ bx ]
invoke print , commandes
2004-06-12 23:34:04 +02:00
add bx , 8
2019-07-09 18:30:00 +02:00
cmp word [ bx ], 0
2007-03-23 17:31:09 +01:00
jne showalls
endoff:
2004-06-12 23:34:04 +02:00
ret
2007-03-28 23:49:41 +02:00
def db '\c02Liste des commandes internes\l\l\c07' , 0
2004-11-30 20:30:30 +01:00
commandes db '%0 \h10:\h12%0 \h70%0\l' , 0
2007-03-31 17:00:23 +02:00
code_detect:
2019-07-09 18:30:00 +02:00
invoke print , msg_cpu_detect
invoke cpuinfo , thecpu
invoke setinfo , thecpu , temp
invoke print , msg_ok2
push temp
2007-03-31 17:00:23 +02:00
xor eax , eax
mov al ,[ thecpu.family ]
push eax
mov al ,[ thecpu.models ]
push eax
mov al ,[ thecpu.stepping ]
push eax
2019-07-09 18:30:00 +02:00
push thecpu.names
push thecpu.vendor
invoke print , msg_cpu_detect_inf
invoke print , msg_pci
invoke pciinfo , thepci
2007-03-31 17:00:23 +02:00
jc nopci
2019-07-09 18:30:00 +02:00
invoke print , msg_ok2
2007-03-31 17:00:23 +02:00
xor eax , eax
mov al ,[ thepci.maxbus ]
push eax
mov al ,[ thepci.version_minor ]
push eax
mov al ,[ thepci.version_major ]
push eax
2019-07-09 18:30:00 +02:00
invoke print , msg_pci_info
invoke print , msg_pci_enum
2007-04-11 17:59:34 +02:00
xor ebx , ebx
xor ecx , ecx
2007-03-31 17:00:23 +02:00
xor si , si
searchpci:
2019-07-09 18:30:00 +02:00
invoke getcardinfo , bx , cx , si , temp
2007-03-31 17:00:23 +02:00
jc stopthis
2019-07-09 18:30:00 +02:00
virtual at temp
.pcidata pcidata
end virtual
mov al ,[ .pcidata.subclass ]
2007-03-31 17:00:23 +02:00
push ax
2019-07-09 18:30:00 +02:00
mov al ,[ .pcidata.class ]
2007-03-31 17:00:23 +02:00
push ax
2019-07-09 18:30:00 +02:00
invoke getpcisubclass
2007-03-31 17:00:23 +02:00
push dx
push ax
2019-07-09 18:30:00 +02:00
mov al ,[ .pcidata.class ]
2007-03-31 17:00:23 +02:00
xor ah , ah
push ax
2019-07-09 18:30:00 +02:00
invoke getpciclass
2007-03-31 17:00:23 +02:00
push dx
push ax
push 4
push esi
push 4
push ecx
push 4
push ebx
2019-07-09 18:30:00 +02:00
mov ax ,[ .pcidata.device ]
2007-03-31 17:00:23 +02:00
push eax
2019-07-09 18:30:00 +02:00
mov ax ,[ .pcidata.vendor ]
2007-03-31 17:00:23 +02:00
push eax
2019-07-09 18:30:00 +02:00
invoke print , msg_pci_card
2007-03-31 17:00:23 +02:00
inc si
cmp si , 7
jbe searchpci
stopthis:
xor si , si
inc cx
cmp cx , 31
jbe searchpci
xor cx , cx
inc bx
cmp bx , 16
jbe searchpci
jmp next
nopci:
2019-07-09 18:30:00 +02:00
invoke print , msg_echec2
2007-03-31 17:00:23 +02:00
next:
2019-07-09 18:30:00 +02:00
invoke detectvmware
2007-03-31 17:00:23 +02:00
jne novirtual
2019-07-09 18:30:00 +02:00
invoke print , msg_vmware
2007-03-31 17:00:23 +02:00
novirtual:
ret
2019-07-09 18:30:00 +02:00
thepci pciinf
thecpu cpu
2007-03-31 17:00:23 +02:00
msg_ok2 db "\h70 [\c02 Ok \c07]\l" , 0
msg_echec2 db "\h70 [\c0CPasser\c07]\l" , 0
msg_cpu_detect db "Dectection du processeur" , 0
msg_cpu_detect_inf db " -Fondeur : %0\l -Modele : %0\l -Revision : %u\l -Version : %u\l -Famille : %u\l -Technologies: %0\l" , 0
msg_pci db "Detection des systemes PCI" , 0
msg_pci_info db " -Version : %yB.%yB\l -Numero bus max: %u\l" , 0
msg_pci_enum db " -Enumeration des peripheriques PCI:\l"
2007-04-11 17:59:34 +02:00
db " | Vendeur | Modele |Bus |Dev.|Func|Classe.Sous-classe\l" , 0
msg_pci_card db " | 0x%hW | 0x%hW |%w|%w|%w|%0P.%0P\l" , 0
2007-03-31 17:00:23 +02:00
msg_vmware db "\c04 VMWare a ete detecte !!!\c07\l" , 0
2004-11-30 20:30:30 +01:00
code_mode:
2019-07-09 18:30:00 +02:00
invoke gettypeditem , di , 0 , ' '
2004-06-12 23:34:04 +02:00
and al , 1111b
2019-07-09 18:30:00 +02:00
invoke setvideomode , ax
invoke cl earscreen
2004-06-12 23:34:04 +02:00
ret
2004-11-30 20:30:30 +01:00
code_dir:
2019-07-09 18:30:00 +02:00
invoke getserial
2007-03-23 17:31:09 +01:00
push eax
2019-07-09 18:30:00 +02:00
mov si , nomdisque
invoke getname , si
2007-03-23 17:31:09 +01:00
push si
2019-07-09 18:30:00 +02:00
push present
invoke print
2007-03-23 17:31:09 +01:00
xor ecx , ecx
2019-07-09 18:30:00 +02:00
mov di , bufferentry
invoke findfirstfile , di
2004-11-30 20:30:30 +01:00
jc nofiles
2004-06-12 23:34:04 +02:00
go:
2019-07-09 18:30:00 +02:00
virtual at di
.find find
end virtual
push word [ .find.result.fileattr ]
push [ .find.result.filesize ]
push [ .find.result.filetime ]
push [ .find.result.filedate ]
push [ .find.result.filetimecrea ]
push [ .find.result.filedatecrea ]
lea bx ,[ .find.result.filename ]
2007-03-23 17:31:09 +01:00
push bx
2019-07-09 18:30:00 +02:00
push line
invoke print
2007-03-23 17:31:09 +01:00
inc ecx
2019-07-09 18:30:00 +02:00
invoke findnextfile , di
2004-11-30 20:30:30 +01:00
jnc go
2004-06-12 23:34:04 +02:00
nofiles:
2007-03-23 17:31:09 +01:00
push ecx
2019-07-09 18:30:00 +02:00
push filess
invoke print
2004-11-30 20:30:30 +01:00
ret
nomdisque db 13 dup ( 0 )
bufferentry db 512 dup ( 0 )
present db '\c02Le volume insere est nomme %0, Numero de serie : %hD\l\l' , 0
line db '\c07%n %d %t %d %t %z %a\l' , 0
2007-03-23 17:31:09 +01:00
filess db '\l\l\c02%u Fichier(s) au total\l\c07' , 0
2004-06-12 23:34:04 +02:00
code_cd:
2019-07-09 18:30:00 +02:00
invoke gettypeditem , di , 0 , ' '
2007-03-23 17:31:09 +01:00
push ax
2019-07-09 18:30:00 +02:00
push ch anging
invoke print
invoke ch angedir , ax
2004-11-30 20:30:30 +01:00
jnc okchange
2019-07-09 18:30:00 +02:00
push errorchanging
invoke print
2004-06-12 23:34:04 +02:00
okchange:
2004-11-30 20:30:30 +01:00
ret
changing db 'Changement de repertoire vers %0\l' , 0
2007-03-28 23:49:41 +02:00
errorchanging db '\c04Impossible d' 'atteindre ce dossier\c07' , 0
2004-11-30 20:30:30 +01:00
code_kill:
2019-07-09 18:30:00 +02:00
invoke gettypeditem , di , 0 , ' '
2007-03-23 17:31:09 +01:00
push ax
2019-07-09 18:30:00 +02:00
push killing
invoke print
invoke mbfind , ax
2004-11-30 20:30:30 +01:00
jc nochanged
2019-07-09 18:30:00 +02:00
invoke mbfree , ax
2004-11-30 20:30:30 +01:00
jnc okchanged
2007-03-27 16:51:28 +02:00
nochanged:
2019-07-09 18:30:00 +02:00
invoke print , errorkilling
2004-11-30 20:30:30 +01:00
okchanged:
ret
2007-03-27 16:51:28 +02:00
2004-11-30 20:30:30 +01:00
killing db 'Fermeture du processus %0\l' , 0
2007-03-28 23:49:41 +02:00
errorkilling db '\c04Impossible de fermer ce processus\c07' , 0
2004-06-12 23:34:04 +02:00
2007-03-28 17:50:22 +02:00
code_stack:
2007-03-31 17:00:23 +02:00
push ebp
push esp
push ss
push ss
2019-07-09 18:30:00 +02:00
invoke print , stackshow
2007-03-31 17:00:23 +02:00
mov cx , 12 ;12 derniers <20> l<EFBFBD> ments
xor esi , esi
mov si , sp
sub si , 2 * 12
showloop:
2019-07-09 18:30:00 +02:00
push dword [ ss : si ]
2007-03-31 17:00:23 +02:00
push esi
push ss
push ss
2019-07-09 18:30:00 +02:00
invoke print , itemshow
2007-03-31 17:00:23 +02:00
inc si
inc si
cmp si , sp
jne notspshow
2019-07-09 18:30:00 +02:00
invoke print , stresp
2007-03-31 17:00:23 +02:00
notspshow:
cmp si , bp
jne nextshow
2019-07-09 18:30:00 +02:00
invoke print , strebp
2007-03-31 17:00:23 +02:00
nextshow:
dec cx
jnz showloop
ret
stackshow db '\l\c02Vidage de la pile systeme\l\l\c07'
db 'Segment SS : 0x%hW\l'
db 'Pointeur ESP : 0x%hD\l'
db 'Pointeur EBP : 0x%hD\l'
db 'Seg :Adr | Donnees' , 0
itemshow db '\l0x%hW:0x%hW | 0x%hW' , 0
strebp db '<-- BP' , 0
stresp db '<-- SP' , 0
2007-03-28 17:50:22 +02:00
2007-04-11 17:59:34 +02:00
code_setbuffer:
2019-07-09 18:30:00 +02:00
invoke gettypeditem , di , 0 , ' '
invoke setbuffer , ax
2007-04-11 17:59:34 +02:00
code_getbuffer:
2019-07-09 18:30:00 +02:00
mov si , di skbuffers
invoke getbuffer , si
2007-04-11 17:59:34 +02:00
xor ecx , ecx
mov cx ,[ di skbuffers.current ]
push ecx
mov cx ,[ di skbuffers.size ]
push ecx
2019-07-09 18:30:00 +02:00
invoke print , showbuffers
mov si , di skbuffers.chain
2007-04-11 17:59:34 +02:00
xor bx , bx
showbuffer:
2019-07-09 18:30:00 +02:00
cmp word [ si ], 0FFFFh
2007-04-11 17:59:34 +02:00
jne notnoted
2019-07-09 18:30:00 +02:00
push noted
2007-04-11 17:59:34 +02:00
jmp islikeit
notnoted:
2019-07-09 18:30:00 +02:00
cmp word [ si ], 0FFFEh
2007-04-11 17:59:34 +02:00
jne notempty
2019-07-09 18:30:00 +02:00
push empty
2007-04-11 17:59:34 +02:00
jmp islikeit
notempty:
2019-07-09 18:30:00 +02:00
push dword [ si ]
push occup
2007-04-11 17:59:34 +02:00
islikeit:
cmp bx ,[ di skbuffers.current ]
jne notthecurrent
2019-07-09 18:30:00 +02:00
invoke showchar , '*'
2007-04-11 17:59:34 +02:00
jmp okletsgo
notthecurrent:
2019-07-09 18:30:00 +02:00
invoke showchar , ' '
2007-04-11 17:59:34 +02:00
okletsgo:
2019-07-09 18:30:00 +02:00
invoke print
2007-04-11 17:59:34 +02:00
inc si
inc si
inc bx
dec cx
jnz showbuffer
ret
empty db '\c06------' , 0
noted db '\c07------' , 0
occup db '\c170x%hW' , 0
showbuffers db '\l\c02Contenu des tampons disquette\l\l\c07'
db 'Nombre de tampons alloues : %u\l'
db 'Dernier element du tampon : %u\l\l' , 0
2019-07-09 18:30:00 +02:00
diskbuffers di skbuffer
2007-04-11 17:59:34 +02:00
2007-03-28 17:50:22 +02:00
code_dump:
2019-07-09 18:30:00 +02:00
invoke gettypeditem , di , 0 , ' '
invoke mbfind , di
2007-03-31 17:00:23 +02:00
jc notmbfind
mov fs , ax
dec ax
dec ax
mov gs , ax
2019-07-09 18:30:00 +02:00
cmp word [ fs : 0x0 ], 'EC'
2007-03-31 17:00:23 +02:00
jne notace2
2019-07-09 18:30:00 +02:00
push oui ;CE? str0 2
2007-03-31 17:00:23 +02:00
jmp suitelikeace2
notace2:
2019-07-09 18:30:00 +02:00
push non
2007-03-31 17:00:23 +02:00
suitelikeace2:
2019-07-14 11:26:53 +02:00
cmp word [ gs : mb.isnotlast ], true
2007-03-31 17:00:23 +02:00
je notlast2
2019-07-09 18:30:00 +02:00
push oui ;CE? str0 2
2007-03-31 17:00:23 +02:00
jmp suitelikelast2
notlast2:
2019-07-09 18:30:00 +02:00
push non
2007-03-31 17:00:23 +02:00
suitelikelast2:
mov dx , gs
push edx ;Emplacement memoire hex 2
;parent
2019-07-14 11:26:53 +02:00
cmp [ gs : mb.reference ], 0
2007-03-31 17:00:23 +02:00
jne nextdetect2
push cs
2019-07-09 18:30:00 +02:00
push none ;parent lstr0 2x2
2019-07-14 11:26:53 +02:00
add bx ,[ gs : mb.sizes ]
2007-03-31 17:00:23 +02:00
jmp suitemn2
nextdetect2:
2019-07-14 11:26:53 +02:00
mov dx ,[ gs : mb.reference ]
2007-03-31 17:00:23 +02:00
dec dx
dec dx
push dx ;parent lstr0 2x2
2019-07-14 11:26:53 +02:00
push mb.names
2007-03-31 17:00:23 +02:00
suitemn2:
2019-07-14 11:26:53 +02:00
cmp [ gs : mb.isresident ], true
2007-03-31 17:00:23 +02:00
jne notresident2
2019-07-09 18:30:00 +02:00
push oui ;resident str0 2
2007-03-31 17:00:23 +02:00
jmp suitelistmcb2
notresident2:
2019-07-09 18:30:00 +02:00
push non ;resident str0 2
2007-03-31 17:00:23 +02:00
suitelistmcb2:
xor edx , edx
2019-07-14 11:26:53 +02:00
mov dx ,[ gs : mb.sizes ]
2007-03-31 17:00:23 +02:00
shl edx , 4
push edx
push gs ;nom lstr0 2x2
2019-07-14 11:26:53 +02:00
push mb.names
2019-07-09 18:30:00 +02:00
push dumpshow ;ligne
invoke print
cmp word [ fs : 0x0 ], 'EC'
2007-03-31 17:00:23 +02:00
jne endofdumpformoment
2019-07-14 12:47:14 +02:00
push dword [ fs : exe.starting ]
2007-03-31 17:00:23 +02:00
push fs
push fs
2019-07-14 12:47:14 +02:00
push dword [ fs : exe.sections ]
2007-03-31 17:00:23 +02:00
push fs
push fs
2019-07-14 12:47:14 +02:00
push dword [ fs : exe.imports ]
2007-03-31 17:00:23 +02:00
push fs
push fs
2019-07-14 12:47:14 +02:00
push dword [ fs : exe.exports ]
2007-03-31 17:00:23 +02:00
push fs
push fs
2019-07-14 12:47:14 +02:00
cmp [ fs : exe.compressed ], true
2007-03-31 17:00:23 +02:00
jne notcompressed
2019-07-09 18:30:00 +02:00
push oui
2007-03-31 17:00:23 +02:00
jmp suiteiscompressed
notcompressed:
2019-07-09 18:30:00 +02:00
push non
2007-03-31 17:00:23 +02:00
suiteiscompressed:
2019-07-14 12:47:14 +02:00
push dword [ fs : exe.checksum ]
push dword [ fs : exe.major ]
2019-07-09 18:30:00 +02:00
invoke print , dumpshowce
2007-03-31 17:00:23 +02:00
endofdumpformoment:
ret
notmbfind:
2019-07-09 18:30:00 +02:00
invoke print , errornotmbfind
2007-03-31 17:00:23 +02:00
ret
errornotmbfind db '\c04Impossible de trouver le bloc specifie\l\l\c07' , 0
dumpshow db '\l\c02Dump du bloc de memoire nomme %0P\l\l'
db '\c02-----------------------------\l'
db '\c02Informations du bloc memoire\c07\l'
db 'Taille du bloc reserve : %u\l'
db 'Bloc resident en memoire : %0\l'
db 'Parent du bloc : %0P\l'
db 'Adresse du bloc memoire : 0x%hW:0x0000\l'
db 'Dernier bloc en memoire : %0\l'
db 'Heberge un format CE : %0\l' , 0
dumpshowce db '\c02-----------------------------\l'
db 'Informations du bloc executable\c07\l'
db 'Version de l' 'executable : %u\l'
db 'Somme de controle : %hD\l'
db 'Compression du code : %0\l'
db 'Exportation de fonctions : 0x%hW:0x%hW\l'
db 'Importation de fonctions : 0x%hW:0x%hW\l'
db 'Sections de donnees : 0x%hW:0x%hW\l'
db 'Point d' 'entree du code : 0x%hW:0x%hW\l' , 0
code_sections:
2019-07-09 18:30:00 +02:00
invoke gettypeditem , di , 0 , ' '
invoke mbfind , di
2007-03-31 17:00:23 +02:00
jc notmbfindssections
jmp haveatargetsections
notmbfindssections:
2019-07-09 18:30:00 +02:00
invoke searchfile , di
2007-03-31 17:00:23 +02:00
jc notmbfindall
2019-07-09 18:30:00 +02:00
invoke projfile , di
2007-03-31 17:00:23 +02:00
jc notmbfindall
2019-07-09 18:30:00 +02:00
invoke mbfind , di
2007-03-31 17:00:23 +02:00
jc notmbfindall
haveatargetsections:
mov fs , ax
2019-07-09 18:30:00 +02:00
cmp word [ fs : 0x0 ], 'EC'
2007-03-31 17:00:23 +02:00
jne errornotace2
2019-07-14 12:47:14 +02:00
mov si ,[ fs : exe.sections ]
2007-03-31 17:00:23 +02:00
cmp si , 0
je errornosections
xor edx , edx
2019-07-09 18:30:00 +02:00
invoke print , rets
2007-03-31 17:00:23 +02:00
showallsections:
add si , 4
push fs
push si
2019-07-09 18:30:00 +02:00
invoke print , functions
2007-03-31 17:00:23 +02:00
inc edx
findnextsections:
inc si
2019-07-09 18:30:00 +02:00
cmp byte [ fs : si ], 0
2007-03-31 17:00:23 +02:00
jne findnextsections
2019-07-09 18:30:00 +02:00
cmp dword [ fs : si ], 0
2007-03-31 17:00:23 +02:00
je finishsections
inc si
jmp showallsections
finishsections:
push edx
2019-07-09 18:30:00 +02:00
invoke print , al lsections
2007-03-31 17:00:23 +02:00
ret
errornosections:
2019-07-09 18:30:00 +02:00
invoke print , errornosection
2007-03-31 17:00:23 +02:00
ret
allsections db '\c02\lIl y avait %u sections dans le bloc ou fichier\l\c07' , 0
errornosection db '\c02Aucune section dans le bloc ou fichier\l\c07' , 0
code_exports:
2019-07-09 18:30:00 +02:00
invoke gettypeditem , di , 0 , ' '
invoke mbfind , di
2007-03-31 17:00:23 +02:00
jc notmbfindsimports
jmp haveatargetexports
notmbfindsexports:
2019-07-09 18:30:00 +02:00
invoke searchfile , di
2007-03-31 17:00:23 +02:00
jc notmbfindall
2019-07-09 18:30:00 +02:00
invoke projfile , di
2007-03-31 17:00:23 +02:00
jc notmbfindall
2019-07-09 18:30:00 +02:00
invoke mbfind , di
2007-03-31 17:00:23 +02:00
jc notmbfindall
haveatargetexports:
mov fs , ax
2019-07-09 18:30:00 +02:00
cmp word [ fs : 0x0 ], 'EC'
2007-03-31 17:00:23 +02:00
jne errornotace2
2019-07-14 12:47:14 +02:00
mov si ,[ fs : exe.exports ]
2007-03-31 17:00:23 +02:00
cmp si , 0
je errornoexports
xor edx , edx
2019-07-09 18:30:00 +02:00
invoke print , rets
2007-03-31 17:00:23 +02:00
showallexports:
push fs
push si
2019-07-09 18:30:00 +02:00
invoke print , functions
2007-03-31 17:00:23 +02:00
inc edx
findnextexports:
inc si
2019-07-09 18:30:00 +02:00
cmp byte [ fs : si ], 0
2007-03-31 17:00:23 +02:00
jne findnextexports
add si , 3
2019-07-09 18:30:00 +02:00
cmp dword [ fs : si ], 0
2007-03-31 17:00:23 +02:00
je finishexports
jmp showallexports
finishexports:
push edx
2019-07-09 18:30:00 +02:00
invoke print , al lexports
2007-03-31 17:00:23 +02:00
ret
errornoexports:
2019-07-09 18:30:00 +02:00
invoke print , errornoexport
2007-03-31 17:00:23 +02:00
ret
allexports db '\c02\lIl y avait %u exportations dans le bloc ou fichier\l\c07' , 0
errornoexport db '\c02Aucune exportation dans le bloc ou fichier\l\c07' , 0
code_imports:
2019-07-09 18:30:00 +02:00
invoke gettypeditem , di , 0 , ' '
invoke mbfind , di
2007-03-31 17:00:23 +02:00
jc notmbfindsimports
jmp haveatargetimports
notmbfindsimports:
2019-07-09 18:30:00 +02:00
invoke searchfile , di
2007-03-31 17:00:23 +02:00
jc notmbfindall
2019-07-09 18:30:00 +02:00
invoke projfile , di
2007-03-31 17:00:23 +02:00
jc notmbfindall
2019-07-09 18:30:00 +02:00
invoke mbfind , di
2007-03-31 17:00:23 +02:00
jc notmbfindall
haveatargetimports:
mov fs , ax
2019-07-09 18:30:00 +02:00
cmp word [ fs : 0x0 ], 'EC'
2007-03-31 17:00:23 +02:00
jne errornotace2
2019-07-14 12:47:14 +02:00
mov si ,[ fs : exe.imports ]
2007-03-31 17:00:23 +02:00
cmp si , 0
je errornoimports
xor edx , edx
2019-07-09 18:30:00 +02:00
invoke print , rets
2007-03-31 17:00:23 +02:00
showallimports:
push fs
push si
2019-07-09 18:30:00 +02:00
invoke print , functions
2007-03-31 17:00:23 +02:00
inc edx
findnextimports:
inc si
2019-07-09 18:30:00 +02:00
cmp byte [ fs : si ], 0
2007-03-31 17:00:23 +02:00
jne findnextimports
add si , 5
2019-07-09 18:30:00 +02:00
cmp dword [ fs : si ], 0
2007-03-31 17:00:23 +02:00
je finishimports
jmp showallimports
finishimports:
push edx
2019-07-09 18:30:00 +02:00
invoke print , al limports
2007-03-31 17:00:23 +02:00
ret
errornoimports:
2019-07-09 18:30:00 +02:00
invoke print , errornoimport
2007-03-31 17:00:23 +02:00
ret
notmbfindall:
2019-07-09 18:30:00 +02:00
invoke print , errornotmborfilefind
2007-03-31 17:00:23 +02:00
ret
errornotace2:
2019-07-09 18:30:00 +02:00
invoke print , errornotcefind
2007-03-31 17:00:23 +02:00
ret
functions db '%0P\l' , 0
rets db '\l\l' , 0
allimports db '\c02\lIl y avait %u importations dans le bloc ou fichier\l\c07' , 0
errornoimport db '\c02Aucune importation dans le bloc ou fichier\l\c07' , 0
errornotcefind db '\c04Le bloc ou le fichier sp<73> cifi<66> n' 'est pas CE\l\c07' , 0
errornotmborfilefind db '\c04Impossible de trouver le bloc ou le fichier specifie\l\c07' , 0
2007-03-28 17:50:22 +02:00
code_regs:
2019-07-09 18:30:00 +02:00
invoke savecontext , al lregs
2007-03-28 17:50:22 +02:00
push 6
push eax
push eax
2019-07-09 18:30:00 +02:00
mov ax , word [ al lregs.sss ]
2007-03-28 17:50:22 +02:00
push 6
push eax
push eax
2019-07-09 18:30:00 +02:00
mov ax , word [ al lregs.sgs ]
2007-03-28 17:50:22 +02:00
push 6
push eax
push eax
2019-07-09 18:30:00 +02:00
mov ax , word [ al lregs.sfs ]
2007-03-28 17:50:22 +02:00
push 6
push eax
push eax
2019-07-09 18:30:00 +02:00
mov ax , word [ al lregs.ses ]
2007-03-28 17:50:22 +02:00
push 6
push eax
push eax
2019-07-09 18:30:00 +02:00
mov ax , word [ al lregs.sds ]
2007-03-28 17:50:22 +02:00
push 6
push eax
push eax
2019-07-09 18:30:00 +02:00
mov ax , word [ al lregs.scs ]
2007-03-28 17:50:22 +02:00
xor eax , eax
push 10
2019-07-09 18:30:00 +02:00
pushd dword [ al lregs.seip ]
pushd dword [ al lregs.seip ]
2007-03-28 17:50:22 +02:00
push 10
2019-07-09 18:30:00 +02:00
pushd dword [ al lregs.sesp ]
pushd dword [ al lregs.sesp ]
2007-03-28 17:50:22 +02:00
push 10
2019-07-09 18:30:00 +02:00
pushd dword [ al lregs.sebp ]
pushd dword [ al lregs.sebp ]
2007-03-28 17:50:22 +02:00
push 10
2019-07-09 18:30:00 +02:00
pushd dword [ al lregs.sedi ]
pushd dword [ al lregs.sedi ]
2007-03-28 17:50:22 +02:00
push 10
2019-07-09 18:30:00 +02:00
pushd dword [ al lregs.sesi ]
pushd dword [ al lregs.sesi ]
2007-03-28 17:50:22 +02:00
push 10
2019-07-09 18:30:00 +02:00
pushd dword [ al lregs.sedx ]
pushd dword [ al lregs.sedx ]
2007-03-28 17:50:22 +02:00
push 10
2019-07-09 18:30:00 +02:00
pushd dword [ al lregs.secx ]
pushd dword [ al lregs.secx ]
2007-03-28 17:50:22 +02:00
push 10
2019-07-09 18:30:00 +02:00
pushd dword [ al lregs.sebx ]
pushd dword [ al lregs.sebx ]
2007-03-28 17:50:22 +02:00
push 10
2019-07-09 18:30:00 +02:00
pushd dword [ al lregs.seax ]
pushd dword [ al lregs.seax ]
2007-03-28 17:50:22 +02:00
push 10
2019-07-09 18:30:00 +02:00
pushd dword [ al lregs.seflags ]
pushd dword [ al lregs.seflags ]
invoke print , registershow
2007-03-28 17:50:22 +02:00
ret
registershow db '\l\c02Liste des registres du Microprocesseur\l\l\c07'
db '\c04CPU\h30FPU\c07\l'
2007-03-31 17:00:23 +02:00
db 'EFGS: 0x%hD : %w |\h32ST(0): ??\l'
db 'EAX : 0x%hD : %w |\h32ST(1): ??\l'
db 'EBX : 0x%hD : %w |\h32ST(2): ??\l'
db 'ECX : 0x%hD : %w |\h32ST(3): ??\l'
db 'EDX : 0x%hD : %w |\h32ST(4): ??\l'
db 'ESI : 0x%hD : %w |\h32ST(5): ??\l'
db 'EDI : 0x%hD : %w |\h32ST(6): ??\l'
db 'EBP : 0x%hD : %w |\h32ST(7): ??\l'
2007-03-28 17:50:22 +02:00
db 'ESP : 0x%hD : %w |\h32\l'
db 'EIP : 0x%hD : %w |\h32\l'
db 'CS : 0x%hW : %w |\h32\l'
db 'DS : 0x%hW : %w |\h32\l'
db 'ES : 0x%hW : %w |\h32\l'
db 'FS : 0x%hW : %w |\h32\l'
db 'GS : 0x%hW : %w |\h32\l'
db 'SS : 0x%hW : %w |\h32\l' , 0
2019-07-09 18:30:00 +02:00
allregs regs
2007-03-28 17:50:22 +02:00
code_irqs:
2019-07-09 18:30:00 +02:00
invoke mbfind , interruptionbloc
2007-03-27 16:51:28 +02:00
jc erroronint
2019-07-09 18:30:00 +02:00
invoke print , irqmsg1
2007-03-27 16:51:28 +02:00
mov es , ax
xor ebx , ebx
intoirq:
xor eax , eax
2019-07-09 18:30:00 +02:00
mov al ,[ bx + irqmap ]
2019-07-14 12:47:14 +02:00
mov dx , ints.sizeof
2007-03-27 16:51:28 +02:00
mul dx
mov si , ax
2019-07-09 18:30:00 +02:00
virtual at si
.ints ints
end virtual
pushd dword [ es : .ints.vector1.data.off ]
pushd dword [ es : .ints.vector1.data.seg ]
invoke isrequestirq , bx
2007-03-27 16:51:28 +02:00
jc requested
push ' '
jmp suiterequested
requested:
push 'X'
suiterequested:
2019-07-09 18:30:00 +02:00
invoke isinserviceirq , bx
2007-03-27 16:51:28 +02:00
jc inservice
push ' '
jmp suiteinservice
inservice:
push 'X'
suiteinservice:
2019-07-09 18:30:00 +02:00
invoke isenableirq , bx
2007-03-27 16:51:28 +02:00
jc activatemat
push ' '
jmp suiteactivatemat
activatemat:
push 'X'
suiteactivatemat:
2019-07-09 18:30:00 +02:00
virtual at si
.ints ints
end virtual
cmp [ es : .ints.activated ], 1
2007-03-27 16:51:28 +02:00
je activate2
push ' '
jmp suiteactivate2
activate2:
push 'X'
suiteactivate2:
2019-07-09 18:30:00 +02:00
virtual at si
.ints ints
end virtual
cmp [ es : .ints.locked ], 1
2007-03-27 16:51:28 +02:00
je verrouille2
push ' '
jmp suiteverrouille2
verrouille2:
push 'X'
suiteverrouille2:
2019-07-09 18:30:00 +02:00
virtual at si
.ints ints
end virtual
pushd dword [ es : .ints.calledlow ]
pushd dword [ es : .ints.calledhigh ]
pushd dword [ es : .ints.launchedlow ]
pushd dword [ es : .ints.launchedhigh ]
2007-03-27 16:51:28 +02:00
push 3
xor eax , eax
2019-07-09 18:30:00 +02:00
mov al ,[ bx + irqmap ]
2007-03-27 16:51:28 +02:00
push eax
push 3
push ebx
2019-07-09 18:30:00 +02:00
invoke print , irqmsg2
2007-03-27 16:51:28 +02:00
inc bl
cmp bl , 16
jb intoirq
ret
irqmap db 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 0x70 , 0x71 , 0x72 , 0x73 , 0x74 , 0x75 , 0x76 , 0x77
irqmsg1 db '\l\c02Listes des IRQs\c07\l\l'
db 'IRQ | Int | Appels | Executions |Ver|Act|IMR|ISR|IRR| Vecteur 1 \l' , 0
irqmsg2 db '%w | %w | 0x%hW%hD | 0x%hW%hD | %c | %c | %c | %c | %c | 0x%hW:0x%hW\l' , 0
code_int:
2019-07-09 18:30:00 +02:00
invoke mbfind , interruptionbloc
2007-03-27 16:51:28 +02:00
jc erroronint
mov es , ax
2019-07-09 18:30:00 +02:00
invoke gettypeditem , di , 0 , ' '
2007-03-27 16:51:28 +02:00
xor edi , edi
mov di , ax
2019-07-14 12:47:14 +02:00
mov cx , ints.sizeof
2007-03-27 16:51:28 +02:00
mul cx
mov si , ax
2019-07-09 18:30:00 +02:00
virtual at si
.ints ints
end virtual
pushd dword [ es : .ints.vector8.data.off ]
pushd dword [ es : .ints.vector8.data.seg ]
pushd dword [ es : .ints.vector7.data.off ]
pushd dword [ es : .ints.vector7.data.seg ]
pushd dword [ es : .ints.vector6.data.off ]
pushd dword [ es : .ints.vector6.data.seg ]
pushd dword [ es : .ints.vector5.data.off ]
pushd dword [ es : .ints.vector5.data.seg ]
pushd dword [ es : .ints.vector4.data.off ]
pushd dword [ es : .ints.vector4.data.seg ]
pushd dword [ es : .ints.vector3.data.off ]
pushd dword [ es : .ints.vector3.data.seg ]
pushd dword [ es : .ints.vector2.data.off ]
pushd dword [ es : .ints.vector2.data.seg ]
pushd dword [ es : .ints.vector1.data.off ]
pushd dword [ es : .ints.vector1.data.seg ]
pushd dword [ es : .ints.calledlow ]
pushd dword [ es : .ints.calledhigh ]
pushd dword [ es : .ints.launchedlow ]
pushd dword [ es : .ints.launchedhigh ]
cmp [ es : .ints.activated ], 1
2007-03-27 16:51:28 +02:00
je activate
2019-07-09 18:30:00 +02:00
push oui
2007-03-27 16:51:28 +02:00
jmp suiteactivate
activate:
2019-07-09 18:30:00 +02:00
push non
2007-03-27 16:51:28 +02:00
suiteactivate:
2019-07-09 18:30:00 +02:00
virtual at si
.ints ints
end virtual
cmp [ es : .ints.locked ], 1
2007-03-27 16:51:28 +02:00
je verrouille
2019-07-09 18:30:00 +02:00
push oui
2007-03-27 16:51:28 +02:00
jmp suiteverrouille
verrouille:
2019-07-09 18:30:00 +02:00
push non
2007-03-27 16:51:28 +02:00
suiteverrouille:
push esi
push es
push es
push edi
2019-07-09 18:30:00 +02:00
invoke print , infosint
2007-03-27 16:51:28 +02:00
ret
erroronint:
2019-07-09 18:30:00 +02:00
invoke print , errorint
2007-03-27 16:51:28 +02:00
okint:
ret
interruptionbloc db '/interrupts' , 0
errorint db '\c04Le gestionnaire d' 'interruption n' 'est pas actif\l\c07' , 0
infosint db '\c07Le bloc d' 'interruption est charge en memoire et le gestionnaire est actif\l\l'
db 'Interruption %u\l'
db 'Pointeur : 0x%hW:0x%hW\l\c07'
db 'Active : %0\l'
db 'Verrouillage : %0\l'
db 'Nombre d' 'appels : 0x%hD%hD\l'
db 'Nombre de lancements : 0x%hD%hD\l'
db '\c02Vecteur 1 : 0x%hW:0x%hW\l'
db 'Vecteur 2 : 0x%hW:0x%hW\l'
db 'Vecteur 3 : 0x%hW:0x%hW\l'
db 'Vecteur 4 : 0x%hW:0x%hW\l'
db 'Vecteur 5 : 0x%hW:0x%hW\l'
db 'Vecteur 6 : 0x%hW:0x%hW\l'
db 'Vecteur 7 : 0x%hW:0x%hW\l'
db 'Vecteur 8 : 0x%hW:0x%hW\l\c07' , 0
2004-06-12 23:34:04 +02:00
code_refresh:
2019-07-09 18:30:00 +02:00
invoke initdrive
2004-11-30 20:30:30 +01:00
jnc okrefresh
2019-07-09 18:30:00 +02:00
invoke print , errorrefreshing
2004-11-30 20:30:30 +01:00
ret
2004-06-12 23:34:04 +02:00
okrefresh:
2019-07-09 18:30:00 +02:00
invoke getserial
2007-03-23 17:31:09 +01:00
push eax
2019-07-09 18:30:00 +02:00
mov si , nomdisque
invoke getname , si
2007-03-23 17:31:09 +01:00
push si
2019-07-09 18:30:00 +02:00
push present
invoke print
2004-11-30 20:30:30 +01:00
ret
2007-03-27 16:51:28 +02:00
2004-11-29 23:41:00 +01:00
errorrefreshing db '\c04Impossible de lire le support' , 0
2004-11-30 20:30:30 +01:00
extcom db '.CE' , 0
2004-06-12 23:34:04 +02:00
2007-03-31 17:00:23 +02:00
2007-03-23 17:31:09 +01:00
code_mem:
2019-07-09 18:30:00 +02:00
invoke print , msg
2007-03-28 23:49:41 +02:00
xor edx , edx
2004-11-30 20:30:30 +01:00
xor ebx , ebx
xor cx , cx
2004-11-10 12:54:51 +01:00
listmcb:
2019-07-09 18:30:00 +02:00
invoke mbget , cx
2004-11-30 20:30:30 +01:00
jc fino
2007-03-28 23:49:41 +02:00
mov fs , ax
2007-03-23 17:31:09 +01:00
dec ax
dec ax
mov gs , ax
2004-11-30 20:30:30 +01:00
inc cx
2019-07-09 18:30:00 +02:00
cmp word [ fs : 0x0 ], 'EC'
2007-03-28 23:49:41 +02:00
jne notace
2019-07-09 18:30:00 +02:00
push oui ;CE? str0 2
2007-03-28 23:49:41 +02:00
jmp suitelikeace
notace:
2019-07-09 18:30:00 +02:00
push non
2007-03-28 23:49:41 +02:00
suitelikeace:
mov dx , fs
2007-03-23 17:31:09 +01:00
push edx ;Emplacement memoire hex 2
2004-11-29 23:41:00 +01:00
;parent
2019-07-14 11:26:53 +02:00
cmp [ gs : mb.reference ], 0
2007-03-31 17:00:23 +02:00
jne nextdetect
2004-11-30 20:30:30 +01:00
push cs
2019-07-09 18:30:00 +02:00
push none ;parent lstr0 2x2
2019-07-14 11:26:53 +02:00
add bx ,[ gs : mb.sizes ]
2004-11-30 20:30:30 +01:00
jmp suitemn
2007-03-31 17:00:23 +02:00
nextdetect:
2019-07-14 11:26:53 +02:00
mov dx ,[ gs : mb.reference ]
2004-11-30 20:30:30 +01:00
dec dx
dec dx
2007-03-23 17:31:09 +01:00
push dx ;parent lstr0 2x2
2019-07-14 11:26:53 +02:00
push mb.names
2004-11-29 23:41:00 +01:00
suitemn:
2019-07-14 11:26:53 +02:00
cmp [ gs : mb.isresident ], true
2004-11-30 20:30:30 +01:00
jne notresident
2019-07-09 18:30:00 +02:00
push oui ;resident str0 2
2004-11-30 20:30:30 +01:00
jmp suitelistmcb
2004-11-10 12:54:51 +01:00
notresident:
2019-07-09 18:30:00 +02:00
push non ;resident str0 2
2004-11-10 12:54:51 +01:00
suitelistmcb:
2004-11-30 20:30:30 +01:00
xor edx , edx
2019-07-14 11:26:53 +02:00
mov dx ,[ gs : mb.sizes ]
2004-11-30 20:30:30 +01:00
shl edx , 4
2007-03-23 17:31:09 +01:00
push 6 ;decimal 4 + type 2
2004-11-30 20:30:30 +01:00
push edx
2007-03-23 17:31:09 +01:00
push gs ;nom lstr0 2x2
2019-07-14 11:26:53 +02:00
push mb.names
2019-07-09 18:30:00 +02:00
push line2 ;ligne
invoke print
2004-11-30 20:30:30 +01:00
jmp listmcb
2004-11-10 12:54:51 +01:00
fino:
2004-11-30 20:30:30 +01:00
shl ebx , 4
push ebx
2019-07-09 18:30:00 +02:00
push fin
invoke print
2004-11-30 20:30:30 +01:00
ret
2007-03-31 17:00:23 +02:00
oui db "oui" , 0
non db "non" , 0
2007-04-11 17:59:34 +02:00
line2 db "%0P\h15| %w\h24| %0\h30| %0P\h47| 0x%hW\h57| %0\l" , 0
2007-03-23 17:31:09 +01:00
fin db "\l\l\c02%u octets de memoire disponible\l\c07" , 0
2007-04-11 17:59:34 +02:00
msg db "\l\c02Plan de la memoire\c07\l\lNom du bloc | Taille | Res | Bloc parent | Adresse | CE \l" , 0
2007-03-31 17:00:23 +02:00
none db "?????" , 0
2004-11-10 12:54:51 +01:00
2004-11-11 18:03:41 +01:00
;converti le jeux scancode/ascii en fr ax->ax
convertfr:
2004-11-30 20:30:30 +01:00
push dx si
2019-07-09 18:30:00 +02:00
mov si , fr
2004-11-11 18:03:41 +01:00
searchtouch:
2007-03-23 17:31:09 +01:00
mov dx ,[ cs : si ]
2004-11-30 20:30:30 +01:00
cmp dx , 0
je endofconv
add si , 4
cmp dx , ax
jne searchtouch
2007-03-23 17:31:09 +01:00
mov ax ,[ cs : si - 2 ]
2004-11-11 18:03:41 +01:00
endofconv:
2004-11-30 20:30:30 +01:00
pop dx si
ret
2004-06-12 23:34:04 +02:00
2004-11-30 20:30:30 +01:00
fr: db '1' , 02 , '&' , 02
db '!' , 02 , '1' , 02
db '2' , 03 , '<27> ' , 03
db '@' , 03 , '2' , 03
db '3' , 04 , '"' , 04
db '#' , 04 , '3' , 04
db '4' , 05 , 39 , 05
db '$' , 05 , '4' , 05
db '5' , 06 , '(' , 06
db '%' , 06 , '5' , 06
db '6' , 07 , '-' , 07
db '^' , 07 , '6' , 07
db '7' , 08 , '<27> ' , 08
db '&' , 08 , '7' , 08
db '8' , 09 , '_' , 09
db '*' , 09 , '8' , 09
db '9' , 10 , '<27> ' , 10
db '(' , 10 , '9' , 10
db '0' , 11 , '<27> ' , 11
db ')' , 11 , '0' , 11
db '-' , 12 , ')' , 12
db '_' , 12 , '<27> ' , 12
db 'Q' , 16 , 'A' , 16
db 'q' , 16 , 'a' , 16
db 'W' , 17 , 'Z' , 17
db 'w' , 17 , 'z' , 17
db '{' , 26 , '<27> ' , 26
db '[' , 26 , '<27> ' , 26
db ']' , 27 , '$' , 27
db '}' , 27 , '<27> ' , 27
db 'A' , 30 , 'Q' , 30
db 'a' , 30 , 'q' , 30
db ':' , 39 , 'M' , 39
db ';' , 39 , 'm' , 39
db 39 , 40 , '<27> ' , 40
db '"' , 40 , '%' , 40
db 00 , 40 , '%' , 40
db '\', 43, ' * ' , 43
db '|' , 43 , '<27> ' , 43
db 'Z' , 44 , 'W' , 44
db 'z' , 44 , 'w' , 44
db 'm' , 50 , ',' , 50
db 'M' , 50 , '?' , 50
db ',' , 51 , ';' , 51
db '<' , 51 , '.' , 51
db '.' , 52 , ':' , 52
db '>' , 52 , '/' , 52
db '?' , 53 , '<27> ' , 53
db '/' , 53 , '!' , 53
db '\', 86, ' < ' , 86
db '|' , 86 , '>' , 86
db 00 , 79h , '~' , 03
db 00 , 7ah , '#' , 04
db 00 , 7bh , '{' , 05
db 00 , 7ch , '[' , 06
db 00 , 7dh , '|' , 07
db 00 , 7eh , '`' , 08
db 00 , 7fh , '\' , 09
db 00 , 80h , '^' , 10
db 00 , 81h , '@' , 11
db 00 , 82h , ']' , 12
db 00 , 83h , '}' , 13
db 00 , 00 , 00 , 00
commands dw str_exit , code_exit , syn_exit , help_exit
2007-03-28 17:50:22 +02:00
dw str_version , code_version , syn_version , help_version
dw str_cls , code_cls , syn_cls , help_cls
dw str_reboot , code_reboot , syn_reboot , help_reboot
dw str_command , code_command , syn_command , help_command
dw str_mode , code_mode , syn_mode , help_mode
dw str_dir , code_dir , syn_dir , help_dir
dw str_refresh , code_refresh , syn_refresh , help_refresh
dw str_cd , code_cd , syn_cd , help_cd
dw str_mem , code_mem , syn_mem , help_mem
dw str_kill , code_kill , syn_kill , help_kill
dw str_int , code_int , syn_int , help_int
dw str_irqs , code_irqs , syn_irqs , help_irqs
dw str_regs , code_regs , syn_regs , help_regs
dw str_stack , code_stack , syn_stack , help_stack
dw str_dump , code_dump , syn_dump , help_dump
2007-03-31 17:00:23 +02:00
dw str_detect , code_detect , syn_detect , help_detect
dw str_exports , code_exports , syn_exports , help_exports
dw str_imports , code_imports , syn_imports , help_imports
dw str_sections , code_sections , syn_sections , help_sections
2007-04-11 17:59:34 +02:00
dw str_getbuffer , code_getbuffer , syn_getbuffer , help_getbuffer
dw str_setbuffer , code_setbuffer , syn_setbuffer , help_setbuffer
2007-03-28 17:50:22 +02:00
dw 0
2004-11-30 20:30:30 +01:00
str_exit db 'QUIT' , 0
str_version db 'VERS' , 0
str_cls db 'CLEAR' , 0
str_reboot db 'REBOOT' , 0
str_command db 'CMDS' , 0
str_mode db 'MODE' , 0
str_dir db 'DIR' , 0
str_refresh db 'DISK' , 0
str_cd db 'CD' , 0
str_mem db 'MEM' , 0
2007-03-27 16:51:28 +02:00
str_kill db 'KILL' , 0
str_int db 'INT' , 0
2007-03-28 17:50:22 +02:00
str_irqs db 'IRQS' , 0
str_regs db 'REGS' , 0
str_stack db 'STACK' , 0
str_dump db 'DUMP' , 0
2007-03-31 17:00:23 +02:00
str_detect db 'DETECT' , 0
str_exports db 'EXPORTS' , 0
str_imports db 'IMPORTS' , 0
str_sections db 'SECTIONS' , 0
2007-04-11 17:59:34 +02:00
str_getbuffer db 'GETBUFFER' , 0
str_setbuffer db 'SETBUFFER' , 0
2004-11-30 20:30:30 +01:00
syn_exit db 0
syn_version db 0
syn_cls db 0
syn_reboot db 0
syn_command db 0
2007-03-23 17:31:09 +01:00
syn_mode db 'FFh' , 0
2004-11-30 20:30:30 +01:00
syn_dir db 0
syn_refresh db 0
2007-03-23 17:31:09 +01:00
syn_cd db '?' , 0
2004-11-30 20:30:30 +01:00
syn_mem db 0
2007-03-23 17:31:09 +01:00
syn_kill db '?' , 0
2007-03-27 16:51:28 +02:00
syn_int db 'FFh' , 0
2007-03-28 17:50:22 +02:00
syn_irqs db 0
syn_regs db 0
syn_stack db 0
syn_dump db '?' , 0
2007-03-31 17:00:23 +02:00
syn_detect db 0
syn_exports db '?' , 0
syn_imports db '?' , 0
syn_sections db '?' , 0
2007-04-11 17:59:34 +02:00
syn_getbuffer db 0
syn_setbuffer db 'FFh' , 0
2004-11-30 20:30:30 +01:00
help_exit db 'Permet de quitter l' 'interpreteur' , 0
help_version db 'Affiche la version de COS' , 0
help_cls db 'Efface l' 'ecran' , 0
help_reboot db 'Redemarre l' 'ordinateur' , 0
help_command db 'Affiche le detail des commandes' , 0
help_mode db 'Modifie le mode video en cours' , 0
help_dir db 'Affiche le contenu du repertoire courant' , 0
help_refresh db 'Lit le support disquette insere' , 0
help_cd db 'Change le repertoire courant' , 0
help_mem db 'Affiche le plan de la memoire' , 0
help_kill db 'Termine le processus cible' , 0
2007-03-27 16:51:28 +02:00
help_int db 'Affiche des informations sur l' 'interruption' , 0
2007-03-28 17:50:22 +02:00
help_irqs db 'Affiche des informations sur les IRQs' , 0
help_regs db 'Affiche les registres du microprocesseur' , 0
help_stack db 'Affiche la pile systeme' , 0
help_dump db 'Affiche le contenu de la memoire' , 0
2007-03-31 17:00:23 +02:00
help_detect db 'Detecte et Affiche les peripheriques PCI et le CPU' , 0
help_exports db 'Affiche toutes les exportations du fichier specifie' , 0
help_imports db 'Affiche toutes les importations du fichier specifie' , 0
help_sections db 'Affiche toutes les sections du fichier specifie' , 0
2007-04-11 17:59:34 +02:00
help_getbuffer db 'Renvoi le contenu et la configuration des tampons disquette' , 0
help_setbuffer db 'Fixe la taille des tampons disquette' , 0
2004-11-30 20:30:30 +01:00
derror db '\c04Erreur de Syntaxe !' , 0
2007-03-23 17:31:09 +01:00
error_syntax db '\c04La commande ou l' 'executable n' 'existe pas ! F1 pour %0' , 0
2004-11-30 20:30:30 +01:00
prompt db '\c07>' , 0
2007-03-31 21:23:20 +02:00
msginit db '\m02\e\c07\l\lInterpreteur de commande COS V1.11\lSous license \c05GPL\c07 - Ecrit par \c04MrNop\l\c07Utilisez la commande CMDS pour connaitres les commandes disponibles\l' , 0
2004-11-30 20:30:30 +01:00
dir db 32 dup ( 0 )
2007-03-23 17:31:09 +01:00
buffer db 256 dup ( 0 )
temp db 256 dup ( 0 )
2004-11-30 20:30:30 +01:00
2007-03-23 17:31:09 +01:00
import ing
2007-03-31 17:00:23 +02:00
use DETECT.LIB , cpuinfo
use DETECT.LIB , setinfo
use DETECT.LIB , pciinfo
use DETECT.LIB , getcardinfo
use DETECT.LIB , getpcisubclass
use DETECT.LIB , getpciclass
use DETECT.LIB , detectvmware
2007-03-23 17:31:09 +01:00
use VIDEO , cl earscreen
use VIDEO , setvideomode
use VIDEO , getxy
use VIDEO , setxy
use VIDEO , addline
use VIDEO.LIB , showhex
use VIDEO.LIB , print
use VIDEO.LIB , showchar
use DI SQUE , getdir
use DI SQUE , getserial
use DI SQUE , getname
use DI SQUE , findfirstfile
use DI SQUE , findnextfile
use DI SQUE , execfile
use DI SQUE , initdrive
use DI SQUE , ch angedir
2007-03-31 17:00:23 +02:00
use DI SQUE , searchfile
use DI SQUE , projfile
2007-04-11 17:59:34 +02:00
use DI SQUE , getbuffer
use DI SQUE , setbuffer
2007-03-23 17:31:09 +01:00
use SYSTEME , mbget
use SYSTEME , mbfind
2007-03-27 16:51:28 +02:00
use SYSTEME , mbfindsb
2007-03-23 17:31:09 +01:00
use SYSTEME , mbfree
2007-03-27 16:51:28 +02:00
use SYSTEME , isenableirq
use SYSTEME , isinserviceirq
use SYSTEME , isrequestirq
2007-03-28 17:50:22 +02:00
use SYSTEME , savecontext
2007-03-23 17:31:09 +01:00
use STR0.LIB , uppercase
use STR0.LIB , evalue
use STR0.LIB , copy
use STR0.LIB , ch ecksyntax
use STR0.LIB , searchchar
use STR0.LIB , concat
use STR0.LIB , getitem
use STR0.LIB , cmpstr
use STR0.LIB , getpointeritem
use STR0.LIB , getlength
use STR0.LIB , gettypeditem
endi