feat: version bêta 1.3.2fr

BREAKING CHANGE: attention modification majeure du code
This commit is contained in:
Nicolas Hordé 2007-03-31 18:43:09 +00:00
parent 23d5c9f89d
commit 17228ba373
145 changed files with 0 additions and 17897 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

File diff suppressed because it is too large Load Diff

View File

@ -1,59 +0,0 @@
all:
cd lib
make
cd ..
cd noyau
make
cd ..
cd install
make
cd ..
cd commande
make
cd ..
cd programs
make
cd ..
install:
if not exist data mkdir data
copy noyau\systeme.sys data
copy noyau\boot.bin data
copy commande\commande.ce data
copy lib\*.lib data
copy programs\*.ce data
copy programs\exem-lib.lib data
copy programs\cos.rip data
copy install\setup.com .
copy: clean all
copy noyau\systeme.sys b:
copy commande\*.ce b:
copy lib\*.lib b:
copy programs\*.ce b:
copy programs\*.lib b:
clean:
cd lib
make clean
cd ..
cd noyau
make clean
cd ..
cd install
make clean
cd ..
cd commande
make clean
cd ..
cd programs
make clean
cd ..

View File

@ -1,13 +0,0 @@
![logo](https://github.com/dahut87/cos2000v1/raw/master/Graphisme/logo.png)
## Copies d'écran de COS2000
![screen](https://github.com/dahut87/cos2000v1/raw/develop/Graphisme/screenshots/bootnew.jpg)
![screen](https://github.com/dahut87/cos2000v1/raw/develop/Graphisme/screenshots/chargement.jpg)
![screen](https://github.com/dahut87/cos2000v1/raw/develop/Graphisme/screenshots/dir.jpg)
![screen](https://github.com/dahut87/cos2000v1/raw/develop/Graphisme/screenshots/editeur.jpg)
![screen](https://github.com/dahut87/cos2000v1/raw/develop/Graphisme/screenshots/gestionnaire.jpg)
![screen](https://github.com/dahut87/cos2000v1/raw/develop/Graphisme/screenshots/installation.jpg)
![screen](https://github.com/dahut87/cos2000v1/raw/develop/Graphisme/screenshots/interpreteur.jpg)
![screen](https://github.com/dahut87/cos2000v1/raw/develop/Graphisme/screenshots/logo.jpg)
![screen](https://github.com/dahut87/cos2000v1/raw/develop/Graphisme/screenshots/pci.jpg)
![screen](https://github.com/dahut87/cos2000v1/raw/develop/Graphisme/screenshots/video.jpg)

View File

@ -1,20 +0,0 @@
asm= lzasm /z/t
lnk= elink
all: commande.ce
commande.ce: commande.obj
$(lnk) commande.obj commande.ce
commande.obj: commande.asm
$(asm) commande.asm
clean:
del *.obj
del *.ce
del *.bak
del *.lib
del *.com
del *.bin
del *.sys
del *.err

File diff suppressed because it is too large Load Diff

View File

@ -1,20 +0,0 @@
lnk_boot = tlink /x
asm= tasm /t/m5/zi
lnk= tlink /x/t
all: ex-tasm.com ex-nasm.com
ex-tasm.com: ex-tasm.asm
$(asm) ex-tasm
$(lnk) ex-tasm
ren ex-tasm.com ex-tasm.com
ex-nasm.com: ex-nasm.asm
nasm ex-nasm.asm -o ex-nasm.com
clean:
del *.obj
del *.exe
del *.com
del *.sys
del *.err

View File

@ -1,27 +0,0 @@
[bits 16] ;16 bits
[org 0x0] ;Point d'entré en 0h
section .text ;Segment de code
checks db "CE" ;signature de l'exe
major db 1 ;N° version
checksum dd 0 ;Checksum de l'exe
compressed db 0 ;a 1 si compressé par RLE
exports dw 0 ;importation de fonctions
imports dw imported ;exportation de fonctions
sections dw 0 ;sections des blocs mémoire
starting dw realstart
imported:
db "VIDEO.LIB::print",0
print dd 0
endofimport dd 0
realstart:
push msg
call far [cs:print] ;Afficher le texte (Showstring0)
xor ax,ax
int 0x16 ;Attendre l'appuie sur une touche
retf ;retour far
msg db 'Hello World !!',0

View File

@ -1,31 +0,0 @@
.model tiny ;model tiny (.com)
.486 ;Pour processeur 80486
Smart ;Optimisations
.code ;Segment de code
org 0h ;Point d'entré en 0h
checks db "CE" ;signature de l'exe
major db 1 ;N° version
checksum dd 0 ;Checksum de l'exe
compressed db 0 ;a 1 si compressé par RLE
exports dw 0 ;importation de fonctions
imports dw imported ;exportation de fonctions
sections dw 0 ;sections des blocs mémoire
starting dw realstart
imported:
db "VIDEO.LIB::print",0
print dd 0
start:
push msg
call far [cs:print] ;Afficher le texte (Showstring0)
xor ax,ax
int 16h ;Attendre l'appuie sur une touche
db 0CBH ;retour far
msg db 'Hello World !!',0
end start

Binary file not shown.

View File

@ -1,40 +0,0 @@
struc bmp_file
bmp_filetype db 'bm'
bmp_filesize dd ? ; taille du fichier
bmp_reserved dd 0 ; toujours 0
bmp_bitmapoffset dd ? ; offset de l'image
bmp_headersize dd ? ; taille de l'entete en octects
bmp_width dd ? ; largeur en pixels de l'image
bmp_height dd ? ; hauteur en pixels de l'image
bmp_planes dw 1 ; nombre de plan utilisés
bmp_bitsperpixel dw ? ; nombre de bits par pixels
bmp_compression dd ? ; méthode de compression
bmp_sizeofbitmap dd ? ; taille de l'image en octects
bmp_horzresolution dd ? ; resolution horizontale en pixels par mètre
bmp_vertresolution dd ? ; resolution verticale en pixels par mètre
bmp_colorsused dd ? ; nombre de couleur dans la palette si 0: palette entière si bitperpixel<=8
bmp_colorsimportant dd ? ; nombre de couleurs importantes masques pour les modes de plus de 8 bits par pixels
bmp_redmask dd ?
bmp_greenmask dd ?
bmp_bluemask dd ?
bmp_alphamask dd ?
bmp_colorspacetype dd ?
bmp_redx dd ?
bmp_redy dd ?
bmp_redz dd ?
bmp_greenx dd ?
bmp_greeny dd ?
bmp_greenz dd ?
bmp_bluex dd ?
bmp_bluey dd ?
bmp_bluez dd ?
bmp_gammared dd ?
bmp_gammagreen dd ?
bmp_gammeblue dd ?
ends bmp_file
;bmp_compression peut prendre les valeurs suivantes:
bmp_comp_uncomp equ 0 ; pas de compression
bmp_comp_rle8 equ 1 ; 8-bit run length encoding
bmp_comp_rle4 equ 2 ; 4-bit tun length encoding
bmp_comp_bfe equ 3 ; bitfields encoding

View File

@ -1,20 +0,0 @@
struc cpu
vendor db 13 dup(0) ;Chaine 0 du fabriquant
names db 32 dup(0)
stepping db 0
models db 0
family db 0
types db 0
emodels db 0
efamily db 0
mmx db 0
mmx2 db 0
sse db 0
sse2 db 0
sse3 db 0
fpu db 0
now3d db 0
now3d2 db 0
htt db 0
apic db 0
ends cpu

View File

@ -1,2 +0,0 @@
true equ 1
false equ 0

View File

@ -1,61 +0,0 @@
struc dpt
steprate&headunload db 0DFh ;Vitesse de progression & monte de la tˆte
dmaflag&headload db 002h ;Etat Dma et temps de descente de la tˆte
delaymotoroff db 025h ;Temps avant extinction moteur
bytepersector db 002h ;Taille des secteurs
sectorpertracks db 000h ;Nombre de secteur par piste
intersectgaplength db 01Bh ;Taille du GAP3 en lecture/criture
datalength db 0FFh ;Longueur du transfert de donnes
intersectgaplengthf db 054h ;Taille du GAP3 en formatage
formatbyte db 0F6h ;Octet de formatage
headsettlingtime db 000h ;Temps de repos des tˆtes
delaymotornormspeed db 008h ;Temps de monte en vitesse du moteur
ends dpt
struc entries
filename db 8 dup (0)
filext db 3 dup (0)
fileattr db 0
filereserved db 0
filetimecreams db 0 ;(*10 ms)
filetimecrea dw 0
filedatecrea dw 0
filedateacc dw 0
filenotused dw 0
filetime dw 0
filedate dw 0
filegroup dw 0
filesize dd 0
ends entries
;Pour recherches
struct find
files db 13 dup (0) ;le fichier
entryplace dw 0 ;En octet
adressdirectory dw 0 ;En cluster
firstsearch db 1 ;Premiere requete ?
result entries <>
ends find
struc bootinfo
vendor db 'COS2000A' ;Fabricant + n°série Formatage
sectorsize dw 512 ;octet/secteur
sectorspercluster db 1 ;secteur/cluster
reservedsectors dw 1 ;secteur reserv
fatsperdrive db 2 ;nb de copie de la FAT
directorysize dw 224 ;taille rep racine
sectorsperdrive dw 2880 ;nb secteur du volume si < 32 még
mediadescriptor db 0F0h ;Descripteur de média
sectorsperfat dw 9 ;secteur/FAT
sectorspertrack dw 18 ;secteur/piste
headsperdrive dw 2 ;nb de tˆteb de lecture/écriture
hiddensectorsh dw 0 ;nombre de secteur cachs
hiddensectorsl dw 0 ;
sectorperdisk2 dd 0 ;Nombre secteur du volume si > 32 Mo+20h ; the number of sectors
bootdrive db 0 ;Lecteur de dmarrage
reservedfornt db 0 ;NA
bootsign db 29h ;boot signature 29h
serialnumber dd 01020304h ;no de serie
drivename db 'COS2000 ' ;nom de volume
typeoffat db 'FAT16 ' ;FAT
ends bootinfo

View File

@ -1,26 +0,0 @@
struc point
coordx db 0
coordy db 0
ends point
struc vgainf
lines db 0
columns db 0
x db 0
y db 0
xy dw 0
colors db 7
mode db 0FFh
pagesize dw 0
style db 0
font db 0
graphic db 0
nbpage db 0
color db 0
cursor db 0
segments dw 0
linesize dw 0
adress dw 0
base dw 0
scrolling db 1
ends vgainf

View File

@ -1,124 +0,0 @@
struc regs
seip dd 0
seax dd 0
sebx dd 0
secx dd 0
sedx dd 0
sesi dd 0
sedi dd 0
sebp dd 0
sesp dd 0
scs dw 0
sds dw 0
ses dw 0
sfs dw 0
sgs dw 0
sss dw 0
seflags dd 0
ends regs
struc tuple ;vecteur d'interruption
off dw 0 ;adresse
seg dw 0 ;segment
ends tuple
union vector
data tuple <>
content dd 0
ends
struc ints ;bloc interruption
number db 0 ;numero de l'interruption
activated db 0 ;activé ou non
locked db 0 ;verrouillée
launchedlow dd 0
launchedhigh dd 0
calledlow dd 0
calledhigh dd 0
vector1 vector ?
vector2 vector ?
vector3 vector ?
vector4 vector ?
vector5 vector ?
vector6 vector ?
vector7 vector ?
vector8 vector ?
ends ints
struc mb ;Bloc de mémoire
check db "NH" ;signature du bloc de mémoire
isnotlast db 0 ;flag indiquant le dernier bloc
isresident db 0 ;flag indiquant que le bloc est resident
reference dw 0 ;pointeur vers le bloc parent
sizes dw 0 ;taille du bloc en paragraphe de 16 octet
names db 24 dup (0) ;nom du bloc
ends mb
struc exe ;Executable COS
checks db "CE" ;signature de l'exe
major db 1 ;N° version
checksum dd 0 ;Checksum de l'exe
compressed db 0 ;a 1 si compressé par RLE
exports dw 0 ;importation de fonctions
imports dw 0 ;exportation de fonctions
sections dw 0 ;sections des blocs mémoire
starting dw 15
ends exe
struc descriptor
limit_low dw 0
base_low dw 0
base_middle db 0
dpltype db 0
limit_high db 0
base_high db 0
ends descriptor
free equ 0 ;Reference quand libre
macro exporting
label exports
endm
macro importing
label imports
endm
macro noimporting
label imports
dd 0
endm
macro noexporting
label imports
dd 0
endm
macro ende
dd 0
endm
macro endi
dd 0
endm
macro use lib:req,fonction:req
db "&lib&::&fonction&",0
label &fonction& dword
dd 0
endm
macro declare fonction:req
db "&fonction&",0
dw offset fonction
endm
macro heading versmaj:req,versmin:req,start:req
header exe <"CE",offset &versmaj&,offset &versmin&,0,offset exports,offset imports,0,offset &start&>
db "&fonction&",0
dw offset fonction
endif
endm

View File

@ -1,34 +0,0 @@
struc pcidata
vendor dw 0 ;vendor ID (read-only), FFFFh returned if requested device non-existent
device dw 0 ;device ID (read-only)
command dw 0 ;command register
status dw 0 ;status register
revision db 0 ;revision ID
interface db 0 ;programming interface
subclass db 0 ;sub-class
class db 0 ;class code
cache db 0 ;cache line size
timer db 0 ;latency timer
typed db 0 ;header type
;bits 6-0: header format
;00h other
;01h PCI-to-PCI bridge
;02h PCI-to-CardBus bridge
;bit 7: multi-function device
result db 0 ;Built-In Self-Test result
ends pcidata
struc pciinf
version_major db 0
version_minor db 0
types db 0
maxbus db 0
ends pciinf
multifunction equ 80h
othercard equ 00h
pci2pcibridge equ 01h
pci2pcicard equ 02h
config1addr equ 0CF8h
config1data equ 0CFCh

View File

@ -1,256 +0,0 @@
DB 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 07Eh, 081h, 0A5h, 081h, 081h, 0BDh, 099h, 081h, 07Eh, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 07Eh, 0FFh, 0DBh, 0FFh, 0FFh, 0C3h, 0E7h, 0FFh, 07Eh, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 036h, 07Fh, 07Fh, 07Fh, 07Fh, 03Eh, 01Ch, 008h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 008h, 01Ch, 03Eh, 07Fh, 03Eh, 01Ch, 008h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 018h, 03Ch, 03Ch, 0E7h, 0E7h, 0E7h, 018h, 018h, 03Ch, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 018h, 03Ch, 07Eh, 0FFh, 0FFh, 07Eh, 018h, 018h, 03Ch, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 018h, 03Ch, 03Ch, 018h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 0FFh, 0FFh, 0FFh, 0FFh, 0FFh, 0E7h, 0C3h, 0C3h, 0E7h, 0FFh, 0FFh, 0FFh, 0FFh, 0FFh, 000h, 000h
DB 000h, 000h, 000h, 000h, 03Ch, 066h, 042h, 042h, 066h, 03Ch, 000h, 000h, 000h, 000h, 000h, 000h
DB 0FFh, 0FFh, 0FFh, 0FFh, 0C3h, 099h, 0BDh, 0BDh, 099h, 0C3h, 0FFh, 0FFh, 0FFh, 0FFh, 000h, 000h
DB 000h, 000h, 00Fh, 007h, 00Dh, 019h, 03Ch, 066h, 066h, 066h, 03Ch, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 03Ch, 066h, 066h, 066h, 03Ch, 018h, 07Eh, 018h, 018h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 03Fh, 033h, 03Fh, 030h, 030h, 030h, 070h, 0F0h, 0E0h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 07Fh, 063h, 07Fh, 063h, 063h, 063h, 067h, 0E7h, 0E6h, 0C0h, 000h, 000h, 000h, 000h
DB 000h, 000h, 018h, 018h, 0DBh, 03Ch, 0E7h, 03Ch, 0DBh, 018h, 018h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 040h, 060h, 070h, 07Ch, 07Fh, 07Ch, 070h, 060h, 040h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 001h, 003h, 007h, 01Fh, 07Fh, 01Fh, 007h, 003h, 001h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 018h, 03Ch, 07Eh, 018h, 018h, 018h, 07Eh, 03Ch, 018h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 033h, 033h, 033h, 033h, 033h, 033h, 000h, 033h, 033h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 07Fh, 0DBh, 0DBh, 0DBh, 07Bh, 01Bh, 01Bh, 01Bh, 01Bh, 000h, 000h, 000h, 000h, 000h
DB 000h, 03Eh, 063h, 030h, 01Ch, 036h, 063h, 063h, 036h, 01Ch, 006h, 063h, 03Eh, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 07Fh, 07Fh, 07Fh, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 018h, 03Ch, 07Eh, 018h, 018h, 018h, 07Eh, 03Ch, 018h, 07Eh, 000h, 000h, 000h, 000h
DB 000h, 000h, 018h, 03Ch, 07Eh, 018h, 018h, 018h, 018h, 018h, 018h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 018h, 018h, 018h, 018h, 018h, 018h, 07Eh, 03Ch, 018h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 00Ch, 006h, 07Fh, 006h, 00Ch, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 018h, 030h, 07Fh, 030h, 018h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 060h, 060h, 060h, 07Fh, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 024h, 066h, 0FFh, 066h, 024h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 008h, 01Ch, 01Ch, 03Eh, 03Eh, 07Fh, 07Fh, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 07Fh, 07Fh, 03Eh, 03Eh, 01Ch, 01Ch, 008h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 010h, 010h, 010h, 010h, 010h, 010h, 010h, 000h, 000h, 010h, 010h, 000h, 000h, 000h, 000h
DB 000h, 024h, 024h, 024h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 042h, 042h, 042h, 0FFh, 042h, 042h, 042h, 0FFh, 042h, 042h, 042h, 000h, 000h, 000h, 000h
DB 000h, 010h, 07Eh, 090h, 090h, 090h, 07Ch, 012h, 012h, 012h, 0FCh, 010h, 000h, 000h, 000h, 000h
DB 000h, 000h, 061h, 091h, 092h, 064h, 008h, 010h, 026h, 049h, 089h, 086h, 000h, 000h, 000h, 000h
DB 000h, 070h, 088h, 088h, 088h, 050h, 060h, 091h, 08Ah, 084h, 04Ah, 031h, 000h, 000h, 000h, 000h
DB 000h, 018h, 018h, 010h, 020h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 006h, 018h, 020h, 040h, 040h, 040h, 040h, 040h, 020h, 018h, 006h, 000h, 000h, 000h, 000h
DB 000h, 060h, 018h, 004h, 002h, 002h, 002h, 002h, 002h, 004h, 018h, 060h, 000h, 000h, 000h, 000h
DB 000h, 000h, 010h, 092h, 054h, 038h, 0FEh, 038h, 054h, 092h, 010h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 010h, 010h, 010h, 0FEh, 010h, 010h, 010h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 018h, 018h, 010h, 020h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 000h, 0FEh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 018h, 018h, 000h, 000h, 000h, 000h
DB 000h, 000h, 001h, 001h, 002h, 004h, 008h, 010h, 020h, 040h, 080h, 080h, 000h, 000h, 000h, 000h
DB 000h, 03Ch, 042h, 083h, 085h, 089h, 091h, 0A1h, 0C1h, 081h, 042h, 03Ch, 000h, 000h, 000h, 000h
DB 000h, 010h, 030h, 050h, 010h, 010h, 010h, 010h, 010h, 010h, 010h, 07Ch, 000h, 000h, 000h, 000h
DB 000h, 03Ch, 042h, 081h, 001h, 002h, 03Ch, 040h, 080h, 080h, 080h, 0FFh, 000h, 000h, 000h, 000h
DB 000h, 03Ch, 042h, 081h, 001h, 002h, 03Ch, 002h, 001h, 081h, 042h, 03Ch, 000h, 000h, 000h, 000h
DB 000h, 002h, 006h, 00Ah, 012h, 022h, 042h, 082h, 0FFh, 002h, 002h, 002h, 000h, 000h, 000h, 000h
DB 000h, 0FFh, 080h, 080h, 080h, 0FCh, 002h, 001h, 001h, 081h, 042h, 03Ch, 000h, 000h, 000h, 000h
DB 000h, 03Ch, 042h, 081h, 080h, 0BCh, 0C2h, 081h, 081h, 081h, 042h, 03Ch, 000h, 000h, 000h, 000h
DB 000h, 0FFh, 081h, 001h, 002h, 004h, 008h, 010h, 010h, 010h, 010h, 010h, 000h, 000h, 000h, 000h
DB 000h, 03Ch, 042h, 081h, 081h, 042h, 03Ch, 042h, 081h, 081h, 042h, 03Ch, 000h, 000h, 000h, 000h
DB 000h, 03Ch, 042h, 081h, 081h, 043h, 03Dh, 001h, 001h, 081h, 042h, 03Ch, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 018h, 018h, 000h, 000h, 000h, 018h, 018h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 018h, 018h, 000h, 000h, 000h, 018h, 018h, 010h, 020h, 000h, 000h
DB 000h, 002h, 004h, 008h, 010h, 020h, 040h, 020h, 010h, 008h, 004h, 002h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 0FEh, 000h, 000h, 000h, 0FEh, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 040h, 020h, 010h, 008h, 004h, 002h, 004h, 008h, 010h, 020h, 040h, 000h, 000h, 000h, 000h
DB 000h, 038h, 044h, 082h, 082h, 004h, 008h, 010h, 010h, 000h, 010h, 010h, 000h, 000h, 000h, 000h
DB 000h, 03Ch, 042h, 081h, 099h, 0A5h, 0A5h, 0A5h, 09Eh, 080h, 041h, 03Eh, 000h, 000h, 000h, 000h
DB 000h, 018h, 024h, 042h, 081h, 081h, 0FFh, 081h, 081h, 081h, 081h, 081h, 000h, 000h, 000h, 000h
DB 000h, 0FCh, 042h, 041h, 041h, 042h, 07Ch, 042h, 041h, 041h, 042h, 0FCh, 000h, 000h, 000h, 000h
DB 000h, 03Ch, 042h, 081h, 081h, 080h, 080h, 080h, 080h, 081h, 042h, 03Ch, 000h, 000h, 000h, 000h
DB 000h, 0FCh, 042h, 041h, 041h, 041h, 041h, 041h, 041h, 041h, 042h, 0FCh, 000h, 000h, 000h, 000h
DB 000h, 0FFh, 080h, 080h, 080h, 080h, 0FCh, 080h, 080h, 080h, 080h, 0FFh, 000h, 000h, 000h, 000h
DB 000h, 0FFh, 080h, 080h, 080h, 080h, 0FCh, 080h, 080h, 080h, 080h, 080h, 000h, 000h, 000h, 000h
DB 000h, 03Ch, 042h, 081h, 081h, 080h, 09Fh, 081h, 081h, 081h, 042h, 03Ch, 000h, 000h, 000h, 000h
DB 000h, 081h, 081h, 081h, 081h, 081h, 0FFh, 081h, 081h, 081h, 081h, 081h, 000h, 000h, 000h, 000h
DB 000h, 038h, 010h, 010h, 010h, 010h, 010h, 010h, 010h, 010h, 010h, 038h, 000h, 000h, 000h, 000h
DB 000h, 007h, 002h, 002h, 002h, 002h, 002h, 002h, 082h, 082h, 044h, 038h, 000h, 000h, 000h, 000h
DB 000h, 081h, 082h, 084h, 088h, 090h, 0E0h, 090h, 088h, 084h, 082h, 081h, 000h, 000h, 000h, 000h
DB 000h, 080h, 080h, 080h, 080h, 080h, 080h, 080h, 080h, 080h, 080h, 0FFh, 000h, 000h, 000h, 000h
DB 000h, 081h, 0C3h, 0A5h, 099h, 099h, 081h, 081h, 081h, 081h, 081h, 081h, 000h, 000h, 000h, 000h
DB 000h, 081h, 0C1h, 0A1h, 091h, 089h, 085h, 083h, 081h, 081h, 081h, 081h, 000h, 000h, 000h, 000h
DB 000h, 03Ch, 042h, 081h, 081h, 081h, 081h, 081h, 081h, 081h, 042h, 03Ch, 000h, 000h, 000h, 000h
DB 000h, 0FCh, 082h, 081h, 081h, 082h, 0FCh, 080h, 080h, 080h, 080h, 080h, 000h, 000h, 000h, 000h
DB 000h, 03Ch, 042h, 081h, 081h, 081h, 081h, 081h, 089h, 085h, 042h, 03Dh, 000h, 000h, 000h, 000h
DB 000h, 0FCh, 082h, 081h, 081h, 082h, 0FCh, 090h, 088h, 084h, 082h, 081h, 000h, 000h, 000h, 000h
DB 000h, 03Ch, 042h, 081h, 080h, 040h, 03Ch, 002h, 001h, 081h, 042h, 03Ch, 000h, 000h, 000h, 000h
DB 000h, 0FEh, 092h, 010h, 010h, 010h, 010h, 010h, 010h, 010h, 010h, 010h, 000h, 000h, 000h, 000h
DB 000h, 081h, 081h, 081h, 081h, 081h, 081h, 081h, 081h, 081h, 042h, 03Ch, 000h, 000h, 000h, 000h
DB 000h, 081h, 081h, 081h, 081h, 081h, 042h, 042h, 024h, 024h, 018h, 018h, 000h, 000h, 000h, 000h
DB 000h, 081h, 081h, 081h, 081h, 081h, 081h, 099h, 099h, 0A5h, 0A5h, 042h, 000h, 000h, 000h, 000h
DB 000h, 081h, 081h, 081h, 042h, 024h, 018h, 024h, 042h, 081h, 081h, 081h, 000h, 000h, 000h, 000h
DB 000h, 082h, 082h, 082h, 082h, 044h, 028h, 010h, 010h, 010h, 010h, 010h, 000h, 000h, 000h, 000h
DB 000h, 0FFh, 001h, 001h, 002h, 004h, 018h, 020h, 040h, 080h, 080h, 0FFh, 000h, 000h, 000h, 000h
DB 000h, 07Eh, 040h, 040h, 040h, 040h, 040h, 040h, 040h, 040h, 040h, 07Eh, 000h, 000h, 000h, 000h
DB 000h, 000h, 080h, 080h, 040h, 020h, 010h, 008h, 004h, 002h, 001h, 001h, 000h, 000h, 000h, 000h
DB 000h, 07Eh, 002h, 002h, 002h, 002h, 002h, 002h, 002h, 002h, 002h, 07Eh, 000h, 000h, 000h, 000h
DB 000h, 018h, 024h, 042h, 081h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0FFh, 000h, 000h, 000h
DB 000h, 008h, 004h, 002h, 001h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 07Ch, 002h, 002h, 07Eh, 082h, 082h, 07Dh, 000h, 000h, 000h, 000h
DB 000h, 080h, 080h, 080h, 080h, 0BCh, 0C2h, 081h, 081h, 081h, 0C2h, 0BCh, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 03Ch, 042h, 080h, 080h, 080h, 042h, 03Ch, 000h, 000h, 000h, 000h
DB 000h, 001h, 001h, 001h, 001h, 03Dh, 043h, 081h, 081h, 081h, 043h, 03Dh, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 03Ch, 042h, 081h, 0FFh, 080h, 040h, 03Eh, 000h, 000h, 000h, 000h
DB 000h, 00Eh, 011h, 010h, 010h, 0FEh, 010h, 010h, 010h, 010h, 010h, 010h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 03Dh, 043h, 081h, 081h, 043h, 03Dh, 001h, 002h, 07Ch, 000h, 000h
DB 000h, 080h, 080h, 080h, 080h, 0BCh, 0C2h, 081h, 081h, 081h, 081h, 081h, 000h, 000h, 000h, 000h
DB 000h, 000h, 008h, 008h, 000h, 038h, 008h, 008h, 008h, 008h, 008h, 03Eh, 000h, 000h, 000h, 000h
DB 000h, 000h, 002h, 002h, 000h, 006h, 002h, 002h, 002h, 002h, 002h, 082h, 044h, 038h, 000h, 000h
DB 000h, 080h, 080h, 080h, 080h, 082h, 084h, 088h, 090h, 0A8h, 0C4h, 082h, 000h, 000h, 000h, 000h
DB 038h, 008h, 008h, 008h, 008h, 008h, 008h, 008h, 008h, 008h, 008h, 03Eh, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 0ECh, 092h, 092h, 092h, 092h, 092h, 092h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 0B8h, 0C4h, 082h, 082h, 082h, 082h, 082h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 03Ch, 042h, 081h, 081h, 081h, 042h, 03Ch, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 0BCh, 0C2h, 081h, 081h, 081h, 0C2h, 0BCh, 080h, 080h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 03Dh, 043h, 081h, 081h, 081h, 043h, 03Dh, 001h, 001h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 0BEh, 0C1h, 080h, 080h, 080h, 080h, 080h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 07Eh, 081h, 080h, 07Eh, 001h, 081h, 07Eh, 000h, 000h, 000h, 000h
DB 010h, 010h, 010h, 010h, 010h, 0FEh, 010h, 010h, 010h, 010h, 011h, 00Eh, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 081h, 081h, 081h, 081h, 081h, 043h, 03Dh, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 081h, 081h, 081h, 081h, 042h, 024h, 018h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 082h, 082h, 092h, 092h, 092h, 0AAh, 044h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 081h, 042h, 024h, 018h, 024h, 042h, 081h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 081h, 081h, 081h, 081h, 043h, 03Dh, 001h, 002h, 07Ch, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 0FFh, 002h, 004h, 018h, 020h, 040h, 0FFh, 000h, 000h, 000h, 000h
DB 000h, 004h, 008h, 010h, 010h, 010h, 020h, 010h, 010h, 010h, 008h, 004h, 000h, 000h, 000h, 000h
DB 000h, 010h, 010h, 010h, 010h, 000h, 000h, 010h, 010h, 010h, 010h, 000h, 000h, 000h, 000h, 000h
DB 000h, 040h, 020h, 010h, 010h, 010h, 008h, 010h, 010h, 010h, 020h, 040h, 000h, 000h, 000h, 000h
DB 000h, 000h, 070h, 099h, 00Eh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 008h, 01Ch, 036h, 063h, 063h, 07Fh, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 01Eh, 033h, 061h, 060h, 060h, 061h, 033h, 01Eh, 006h, 003h, 03Eh, 000h, 000h, 000h
DB 000h, 000h, 066h, 066h, 000h, 066h, 066h, 066h, 066h, 066h, 03Bh, 000h, 000h, 000h, 000h, 000h
DB 000h, 006h, 00Ch, 018h, 000h, 03Eh, 063h, 07Fh, 060h, 063h, 03Eh, 000h, 000h, 000h, 000h, 000h
DB 000h, 008h, 01Ch, 036h, 000h, 03Ch, 006h, 03Eh, 066h, 066h, 03Bh, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 066h, 066h, 000h, 03Ch, 006h, 03Eh, 066h, 066h, 03Bh, 000h, 000h, 000h, 000h, 000h
DB 000h, 030h, 018h, 00Ch, 000h, 03Ch, 006h, 03Eh, 066h, 066h, 03Bh, 000h, 000h, 000h, 000h, 000h
DB 000h, 01Ch, 036h, 01Ch, 000h, 03Ch, 006h, 03Eh, 066h, 066h, 03Bh, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 03Ch, 066h, 060h, 066h, 03Ch, 00Ch, 006h, 03Ch, 000h, 000h, 000h, 000h
DB 000h, 008h, 01Ch, 036h, 000h, 03Eh, 063h, 07Fh, 060h, 063h, 03Eh, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 066h, 066h, 000h, 03Eh, 063h, 07Fh, 060h, 063h, 03Eh, 000h, 000h, 000h, 000h, 000h
DB 000h, 030h, 018h, 00Ch, 000h, 03Eh, 063h, 07Fh, 060h, 063h, 03Eh, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 066h, 066h, 000h, 038h, 018h, 018h, 018h, 018h, 03Ch, 000h, 000h, 000h, 000h, 000h
DB 000h, 018h, 03Ch, 066h, 000h, 038h, 018h, 018h, 018h, 018h, 03Ch, 000h, 000h, 000h, 000h, 000h
DB 000h, 060h, 030h, 018h, 000h, 038h, 018h, 018h, 018h, 018h, 03Ch, 000h, 000h, 000h, 000h, 000h
DB 000h, 063h, 063h, 008h, 01Ch, 036h, 063h, 063h, 07Fh, 063h, 063h, 000h, 000h, 000h, 000h, 000h
DB 01Ch, 036h, 01Ch, 000h, 01Ch, 036h, 063h, 063h, 07Fh, 063h, 063h, 000h, 000h, 000h, 000h, 000h
DB 00Ch, 018h, 030h, 000h, 07Fh, 033h, 030h, 03Eh, 030h, 033h, 07Fh, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 06Eh, 03Bh, 01Bh, 07Eh, 0D8h, 0DCh, 077h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 01Fh, 036h, 066h, 066h, 07Fh, 066h, 066h, 066h, 067h, 000h, 000h, 000h, 000h, 000h
DB 000h, 008h, 01Ch, 036h, 000h, 03Eh, 063h, 063h, 063h, 063h, 03Eh, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 063h, 063h, 000h, 03Eh, 063h, 063h, 063h, 063h, 03Eh, 000h, 000h, 000h, 000h, 000h
DB 000h, 030h, 018h, 00Ch, 000h, 03Eh, 063h, 063h, 063h, 063h, 03Eh, 000h, 000h, 000h, 000h, 000h
DB 000h, 018h, 03Ch, 066h, 000h, 066h, 066h, 066h, 066h, 066h, 03Bh, 000h, 000h, 000h, 000h, 000h
DB 000h, 030h, 018h, 00Ch, 000h, 066h, 066h, 066h, 066h, 066h, 03Bh, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 063h, 063h, 000h, 063h, 063h, 063h, 063h, 03Fh, 003h, 006h, 03Ch, 000h, 000h, 000h
DB 000h, 063h, 063h, 01Ch, 036h, 063h, 063h, 063h, 063h, 036h, 01Ch, 000h, 000h, 000h, 000h, 000h
DB 000h, 063h, 063h, 000h, 063h, 063h, 063h, 063h, 063h, 063h, 03Eh, 000h, 000h, 000h, 000h, 000h
DB 000h, 018h, 018h, 07Eh, 0C3h, 0C0h, 0C0h, 0C3h, 07Eh, 018h, 018h, 000h, 000h, 000h, 000h, 000h
DB 000h, 01Ch, 036h, 032h, 030h, 078h, 030h, 030h, 030h, 073h, 07Eh, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 0C3h, 066h, 03Ch, 018h, 0FFh, 018h, 0FFh, 018h, 018h, 000h, 000h, 000h, 000h, 000h
DB 000h, 0FCh, 066h, 066h, 07Ch, 062h, 066h, 06Fh, 066h, 066h, 0F3h, 000h, 000h, 000h, 000h, 000h
DB 000h, 00Eh, 01Bh, 018h, 018h, 018h, 07Eh, 018h, 018h, 018h, 018h, 0D8h, 070h, 000h, 000h, 000h
DB 000h, 00Ch, 018h, 030h, 000h, 03Ch, 006h, 03Eh, 066h, 066h, 03Bh, 000h, 000h, 000h, 000h, 000h
DB 000h, 00Ch, 018h, 030h, 000h, 038h, 018h, 018h, 018h, 018h, 03Ch, 000h, 000h, 000h, 000h, 000h
DB 000h, 00Ch, 018h, 030h, 000h, 03Eh, 063h, 063h, 063h, 063h, 03Eh, 000h, 000h, 000h, 000h, 000h
DB 000h, 00Ch, 018h, 030h, 000h, 066h, 066h, 066h, 066h, 066h, 03Bh, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 03Bh, 06Eh, 000h, 06Eh, 033h, 033h, 033h, 033h, 033h, 000h, 000h, 000h, 000h, 000h
DB 03Bh, 06Eh, 000h, 063h, 073h, 07Bh, 07Fh, 06Fh, 067h, 063h, 063h, 000h, 000h, 000h, 000h, 000h
DB 000h, 03Ch, 06Ch, 06Ch, 03Eh, 000h, 07Eh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 038h, 06Ch, 06Ch, 038h, 000h, 07Ch, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 018h, 018h, 000h, 018h, 018h, 030h, 063h, 063h, 03Eh, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 000h, 07Fh, 060h, 060h, 060h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 000h, 07Fh, 003h, 003h, 003h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 060h, 0E0h, 063h, 066h, 06Ch, 018h, 030h, 06Eh, 0C3h, 006h, 00Ch, 01Fh, 000h, 000h, 000h
DB 000h, 060h, 0E0h, 063h, 066h, 06Ch, 018h, 033h, 067h, 0CFh, 01Fh, 003h, 003h, 000h, 000h, 000h
DB 000h, 000h, 018h, 018h, 000h, 018h, 018h, 03Ch, 03Ch, 03Ch, 018h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 01Bh, 036h, 06Ch, 036h, 01Bh, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 06Ch, 036h, 01Bh, 036h, 06Ch, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 011h, 044h, 011h, 044h, 011h, 044h, 011h, 044h, 011h, 044h, 011h, 044h, 011h, 044h, 000h, 000h
DB 055h, 0AAh, 055h, 0AAh, 055h, 0AAh, 055h, 0AAh, 055h, 0AAh, 055h, 0AAh, 055h, 0AAh, 000h, 000h
DB 0DDh, 077h, 0DDh, 077h, 0DDh, 077h, 0DDh, 077h, 0DDh, 077h, 0DDh, 077h, 0DDh, 077h, 000h, 000h
DB 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 000h, 000h
DB 018h, 018h, 018h, 018h, 018h, 018h, 018h, 0F8h, 018h, 018h, 018h, 018h, 018h, 018h, 000h, 000h
DB 018h, 018h, 018h, 018h, 018h, 0F8h, 018h, 0F8h, 018h, 018h, 018h, 018h, 018h, 018h, 000h, 000h
DB 036h, 036h, 036h, 036h, 036h, 036h, 036h, 0F6h, 036h, 036h, 036h, 036h, 036h, 036h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0FEh, 036h, 036h, 036h, 036h, 036h, 036h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 0F8h, 018h, 0F8h, 018h, 018h, 018h, 018h, 018h, 018h, 000h, 000h
DB 036h, 036h, 036h, 036h, 036h, 0F6h, 006h, 0F6h, 036h, 036h, 036h, 036h, 036h, 036h, 000h, 000h
DB 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 036h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 0FEh, 006h, 0F6h, 036h, 036h, 036h, 036h, 036h, 036h, 000h, 000h
DB 036h, 036h, 036h, 036h, 036h, 0F6h, 006h, 0FEh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 036h, 036h, 036h, 036h, 036h, 036h, 036h, 0FEh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 018h, 018h, 018h, 018h, 018h, 0F8h, 018h, 0F8h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0F8h, 018h, 018h, 018h, 018h, 018h, 018h, 000h, 000h
DB 018h, 018h, 018h, 018h, 018h, 018h, 018h, 01Fh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 018h, 018h, 018h, 018h, 018h, 018h, 018h, 0FFh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0FFh, 018h, 018h, 018h, 018h, 018h, 018h, 000h, 000h
DB 018h, 018h, 018h, 018h, 018h, 018h, 018h, 01Fh, 018h, 018h, 018h, 018h, 018h, 018h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0FFh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 018h, 018h, 018h, 018h, 018h, 018h, 018h, 0FFh, 018h, 018h, 018h, 018h, 018h, 018h, 000h, 000h
DB 018h, 018h, 018h, 018h, 018h, 01Fh, 018h, 01Fh, 018h, 018h, 018h, 018h, 018h, 018h, 000h, 000h
DB 036h, 036h, 036h, 036h, 036h, 036h, 036h, 037h, 036h, 036h, 036h, 036h, 036h, 036h, 000h, 000h
DB 036h, 036h, 036h, 036h, 036h, 037h, 030h, 03Fh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 03Fh, 030h, 037h, 036h, 036h, 036h, 036h, 036h, 036h, 000h, 000h
DB 036h, 036h, 036h, 036h, 036h, 0F7h, 000h, 0FFh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 0FFh, 000h, 0F7h, 036h, 036h, 036h, 036h, 036h, 036h, 000h, 000h
DB 036h, 036h, 036h, 036h, 036h, 037h, 030h, 037h, 036h, 036h, 036h, 036h, 036h, 036h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 0FFh, 000h, 0FFh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 036h, 036h, 036h, 036h, 036h, 0F7h, 000h, 0F7h, 036h, 036h, 036h, 036h, 036h, 036h, 000h, 000h
DB 018h, 018h, 018h, 018h, 018h, 0FFh, 000h, 0FFh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 036h, 036h, 036h, 036h, 036h, 036h, 036h, 0FFh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 0FFh, 000h, 0FFh, 018h, 018h, 018h, 018h, 018h, 018h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0FFh, 036h, 036h, 036h, 036h, 036h, 036h, 000h, 000h
DB 036h, 036h, 036h, 036h, 036h, 036h, 036h, 03Fh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 018h, 018h, 018h, 018h, 018h, 01Fh, 018h, 01Fh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 01Fh, 018h, 01Fh, 018h, 018h, 018h, 018h, 018h, 018h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 000h, 000h, 03Fh, 036h, 036h, 036h, 036h, 036h, 036h, 000h, 000h
DB 036h, 036h, 036h, 036h, 036h, 036h, 036h, 0FFh, 036h, 036h, 036h, 036h, 036h, 036h, 000h, 000h
DB 018h, 018h, 018h, 018h, 018h, 0FFh, 018h, 0FFh, 018h, 018h, 018h, 018h, 018h, 018h, 000h, 000h
DB 018h, 018h, 018h, 018h, 018h, 018h, 018h, 0F8h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 000h, 000h, 01Fh, 018h, 018h, 018h, 018h, 018h, 018h, 000h, 000h
DB 0FFh, 0FFh, 0FFh, 0FFh, 0FFh, 0FFh, 0FFh, 0FFh, 0FFh, 0FFh, 0FFh, 0FFh, 0FFh, 0FFh, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0FFh, 0FFh, 0FFh, 0FFh, 0FFh, 0FFh, 0FFh, 000h, 000h
DB 0F0h, 0F0h, 0F0h, 0F0h, 0F0h, 0F0h, 0F0h, 0F0h, 0F0h, 0F0h, 0F0h, 0F0h, 0F0h, 0F0h, 000h, 000h
DB 00Fh, 00Fh, 00Fh, 00Fh, 00Fh, 00Fh, 00Fh, 00Fh, 00Fh, 00Fh, 00Fh, 00Fh, 00Fh, 00Fh, 000h, 000h
DB 0FFh, 0FFh, 0FFh, 0FFh, 0FFh, 0FFh, 0FFh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 03Bh, 06Eh, 06Ch, 06Ch, 06Eh, 03Bh, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 03Eh, 063h, 07Eh, 063h, 063h, 07Eh, 060h, 060h, 020h, 000h, 000h, 000h
DB 000h, 000h, 07Fh, 063h, 063h, 060h, 060h, 060h, 060h, 060h, 060h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 07Fh, 036h, 036h, 036h, 036h, 036h, 036h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 07Fh, 063h, 030h, 018h, 00Ch, 018h, 030h, 063h, 07Fh, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 03Fh, 06Ch, 06Ch, 06Ch, 06Ch, 038h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 033h, 033h, 033h, 033h, 03Eh, 030h, 030h, 060h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 03Bh, 06Eh, 00Ch, 00Ch, 00Ch, 00Ch, 00Ch, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 07Eh, 018h, 03Ch, 066h, 066h, 066h, 03Ch, 018h, 07Eh, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 01Ch, 036h, 063h, 063h, 07Fh, 063h, 063h, 036h, 01Ch, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 01Ch, 036h, 063h, 063h, 063h, 036h, 036h, 036h, 077h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 01Eh, 030h, 018h, 00Ch, 03Eh, 066h, 066h, 066h, 03Ch, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 07Eh, 0DBh, 0DBh, 07Eh, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 003h, 006h, 07Eh, 0DBh, 0DBh, 0F3h, 07Eh, 060h, 0C0h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 01Ch, 030h, 060h, 060h, 07Ch, 060h, 060h, 030h, 01Ch, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 03Eh, 063h, 063h, 063h, 063h, 063h, 063h, 063h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 07Fh, 000h, 000h, 07Fh, 000h, 000h, 07Fh, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 018h, 018h, 018h, 0FFh, 018h, 018h, 018h, 000h, 0FFh, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 030h, 018h, 00Ch, 006h, 00Ch, 018h, 030h, 000h, 07Eh, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 00Ch, 018h, 030h, 060h, 030h, 018h, 00Ch, 000h, 07Eh, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 00Eh, 01Bh, 01Bh, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 000h, 000h
DB 018h, 018h, 018h, 018h, 018h, 018h, 018h, 018h, 0D8h, 0D8h, 070h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 018h, 018h, 000h, 000h, 0FFh, 000h, 000h, 018h, 018h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 03Bh, 06Eh, 000h, 03Bh, 06Eh, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 038h, 06Ch, 06Ch, 038h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 000h, 018h, 018h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 000h, 000h, 018h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 00Fh, 00Ch, 00Ch, 00Ch, 00Ch, 00Ch, 0ECh, 06Ch, 03Ch, 01Ch, 000h, 000h, 000h, 000h, 000h
DB 000h, 0D8h, 06Ch, 06Ch, 06Ch, 06Ch, 06Ch, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 070h, 0D8h, 030h, 060h, 0C8h, 0F8h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 03Eh, 03Eh, 03Eh, 03Eh, 03Eh, 03Eh, 000h, 000h, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h

View File

@ -1,128 +0,0 @@
DB 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 07Eh, 081h, 0A5h, 081h, 0BDh, 099h, 081h, 07Eh
DB 07Eh, 0FFh, 0DBh, 0FFh, 0C3h, 0E7h, 0FFh, 07Eh, 06Ch, 0FEh, 0FEh, 0FEh, 07Ch, 038h, 010h, 000h
DB 010h, 038h, 07Ch, 0FEh, 07Ch, 038h, 010h, 000h, 038h, 07Ch, 038h, 0FEh, 0FEh, 07Ch, 038h, 07Ch
DB 010h, 010h, 038h, 07Ch, 0FEh, 07Ch, 038h, 07Ch, 000h, 000h, 018h, 03Ch, 03Ch, 018h, 000h, 000h
DB 0FFh, 0FFh, 0E7h, 0C3h, 0C3h, 0E7h, 0FFh, 0FFh, 000h, 03Ch, 066h, 042h, 042h, 066h, 03Ch, 000h
DB 0FFh, 0C3h, 099h, 0BDh, 0BDh, 099h, 0C3h, 0FFh, 00Fh, 007h, 00Fh, 07Dh, 0CCh, 0CCh, 0CCh, 078h
DB 03Ch, 066h, 066h, 066h, 03Ch, 018h, 07Eh, 018h, 03Fh, 033h, 03Fh, 030h, 030h, 070h, 0F0h, 0E0h
DB 07Fh, 063h, 07Fh, 063h, 063h, 067h, 0E6h, 0C0h, 099h, 05Ah, 03Ch, 0E7h, 0E7h, 03Ch, 05Ah, 099h
DB 080h, 0E0h, 0F8h, 0FEh, 0F8h, 0E0h, 080h, 000h, 002h, 00Eh, 03Eh, 0FEh, 03Eh, 00Eh, 002h, 000h
DB 018h, 03Ch, 07Eh, 018h, 018h, 07Eh, 03Ch, 018h, 066h, 066h, 066h, 066h, 066h, 000h, 066h, 000h
DB 07Fh, 0DBh, 0DBh, 07Bh, 01Bh, 01Bh, 01Bh, 000h, 03Eh, 063h, 038h, 06Ch, 06Ch, 038h, 0CCh, 078h
DB 000h, 000h, 000h, 000h, 07Eh, 07Eh, 07Eh, 000h, 018h, 03Ch, 07Eh, 018h, 07Eh, 03Ch, 018h, 0FFh
DB 018h, 03Ch, 07Eh, 018h, 018h, 018h, 018h, 000h, 018h, 018h, 018h, 018h, 07Eh, 03Ch, 018h, 000h
DB 000h, 018h, 00Ch, 0FEh, 00Ch, 018h, 000h, 000h, 000h, 030h, 060h, 0FEh, 060h, 030h, 000h, 000h
DB 000h, 000h, 0C0h, 0C0h, 0C0h, 0FEh, 000h, 000h, 000h, 024h, 066h, 0FFh, 066h, 024h, 000h, 000h
DB 000h, 018h, 03Ch, 07Eh, 0FFh, 0FFh, 000h, 000h, 000h, 0FFh, 0FFh, 07Eh, 03Ch, 018h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 040h, 040h, 040h, 040h, 040h, 000h, 040h, 000h
DB 090h, 090h, 000h, 000h, 000h, 000h, 000h, 000h, 050h, 050h, 0F8h, 050h, 0F8h, 050h, 050h, 000h
DB 020h, 078h, 0A0h, 070h, 028h, 0F0h, 020h, 000h, 0C8h, 0C8h, 010h, 020h, 040h, 098h, 098h, 000h
DB 070h, 088h, 050h, 020h, 054h, 088h, 074h, 000h, 060h, 020h, 040h, 000h, 000h, 000h, 000h, 000h
DB 020h, 040h, 080h, 080h, 080h, 040h, 020h, 000h, 020h, 010h, 008h, 008h, 008h, 010h, 020h, 000h
DB 000h, 020h, 0A8h, 070h, 070h, 0A8h, 020h, 000h, 000h, 000h, 020h, 020h, 0F8h, 020h, 020h, 000h
DB 000h, 000h, 000h, 000h, 000h, 060h, 020h, 040h, 000h, 000h, 000h, 000h, 0F8h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 000h, 060h, 060h, 000h, 002h, 004h, 008h, 010h, 020h, 040h, 080h, 000h
DB 070h, 088h, 098h, 0A8h, 0C8h, 088h, 070h, 000h, 040h, 0C0h, 040h, 040h, 040h, 040h, 0E0h, 000h
DB 070h, 088h, 008h, 010h, 020h, 040h, 0F8h, 000h, 070h, 088h, 008h, 010h, 008h, 088h, 070h, 000h
DB 008h, 018h, 028h, 048h, 0FCh, 008h, 008h, 000h, 0F8h, 080h, 080h, 0F0h, 008h, 088h, 070h, 000h
DB 020h, 040h, 080h, 0F0h, 088h, 088h, 070h, 000h, 0F8h, 008h, 010h, 020h, 040h, 040h, 040h, 000h
DB 070h, 088h, 088h, 070h, 088h, 088h, 070h, 000h, 070h, 088h, 088h, 078h, 008h, 008h, 070h, 000h
DB 000h, 000h, 060h, 060h, 000h, 060h, 060h, 000h, 000h, 000h, 060h, 060h, 000h, 060h, 060h, 020h
DB 010h, 020h, 040h, 080h, 040h, 020h, 010h, 000h, 000h, 000h, 0F8h, 000h, 0F8h, 000h, 000h, 000h
DB 080h, 040h, 020h, 010h, 020h, 040h, 080h, 000h, 078h, 084h, 004h, 008h, 010h, 000h, 010h, 000h
DB 070h, 088h, 088h, 0A8h, 0B8h, 080h, 078h, 000h, 020h, 050h, 088h, 088h, 0F8h, 088h, 088h, 000h
DB 0F0h, 088h, 088h, 0F0h, 088h, 088h, 0F0h, 000h, 070h, 088h, 080h, 080h, 080h, 088h, 070h, 000h
DB 0F0h, 088h, 088h, 088h, 088h, 088h, 0F0h, 000h, 0F8h, 080h, 080h, 0E0h, 080h, 080h, 0F8h, 000h
DB 0F8h, 080h, 080h, 0E0h, 080h, 080h, 080h, 000h, 070h, 088h, 080h, 080h, 098h, 088h, 078h, 000h
DB 088h, 088h, 088h, 0F8h, 088h, 088h, 088h, 000h, 0E0h, 040h, 040h, 040h, 040h, 040h, 0E0h, 000h
DB 038h, 010h, 010h, 010h, 010h, 090h, 060h, 000h, 088h, 090h, 0A0h, 0C0h, 0A0h, 090h, 088h, 000h
DB 080h, 080h, 080h, 080h, 080h, 080h, 0F8h, 000h, 082h, 0C6h, 0AAh, 092h, 082h, 082h, 082h, 000h
DB 084h, 0C4h, 0A4h, 094h, 08Ch, 084h, 084h, 000h, 070h, 088h, 088h, 088h, 088h, 088h, 070h, 000h
DB 0F0h, 088h, 088h, 0F0h, 080h, 080h, 080h, 000h, 070h, 088h, 088h, 088h, 0A8h, 090h, 068h, 000h
DB 0F0h, 088h, 088h, 0F0h, 0A0h, 090h, 088h, 000h, 070h, 088h, 080h, 070h, 008h, 088h, 070h, 000h
DB 0F8h, 020h, 020h, 020h, 020h, 020h, 020h, 000h, 088h, 088h, 088h, 088h, 088h, 088h, 070h, 000h
DB 088h, 088h, 088h, 050h, 050h, 020h, 020h, 000h, 082h, 082h, 082h, 082h, 092h, 092h, 06Ch, 000h
DB 088h, 088h, 050h, 020h, 050h, 088h, 088h, 000h, 088h, 088h, 088h, 050h, 020h, 020h, 020h, 000h
DB 0F8h, 008h, 010h, 020h, 040h, 080h, 0F8h, 000h, 0E0h, 080h, 080h, 080h, 080h, 080h, 0E0h, 000h
DB 080h, 040h, 020h, 010h, 008h, 004h, 002h, 000h, 0E0h, 020h, 020h, 020h, 020h, 020h, 0E0h, 000h
DB 020h, 050h, 088h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0F8h, 000h
DB 040h, 020h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 070h, 008h, 078h, 088h, 074h, 000h
DB 080h, 080h, 0B0h, 0C8h, 088h, 0C8h, 0B0h, 000h, 000h, 000h, 070h, 088h, 080h, 088h, 070h, 000h
DB 008h, 008h, 068h, 098h, 088h, 098h, 068h, 000h, 000h, 000h, 070h, 088h, 0F8h, 080h, 070h, 000h
DB 030h, 048h, 040h, 0E0h, 040h, 040h, 040h, 000h, 000h, 000h, 034h, 048h, 048h, 038h, 008h, 030h
DB 080h, 080h, 0B0h, 0C8h, 088h, 088h, 088h, 000h, 020h, 000h, 060h, 020h, 020h, 020h, 070h, 000h
DB 010h, 000h, 030h, 010h, 010h, 010h, 090h, 060h, 080h, 080h, 088h, 090h, 0A0h, 0D0h, 088h, 000h
DB 0C0h, 040h, 040h, 040h, 040h, 040h, 0E0h, 000h, 000h, 000h, 0ECh, 092h, 092h, 092h, 092h, 000h
DB 000h, 000h, 0B0h, 0C8h, 088h, 088h, 088h, 000h, 000h, 000h, 070h, 088h, 088h, 088h, 070h, 000h
DB 000h, 000h, 0B0h, 0C8h, 0C8h, 0B0h, 080h, 080h, 000h, 000h, 068h, 098h, 098h, 068h, 008h, 008h
DB 000h, 000h, 0B0h, 0C8h, 080h, 080h, 080h, 000h, 000h, 000h, 078h, 080h, 070h, 008h, 0F0h, 000h
DB 040h, 040h, 0E0h, 040h, 040h, 050h, 020h, 000h, 000h, 000h, 088h, 088h, 088h, 098h, 068h, 000h
DB 000h, 000h, 088h, 088h, 088h, 050h, 020h, 000h, 000h, 000h, 082h, 082h, 092h, 092h, 06Ch, 000h
DB 000h, 000h, 088h, 050h, 020h, 050h, 088h, 000h, 000h, 000h, 088h, 088h, 098h, 068h, 008h, 070h
DB 000h, 000h, 0F8h, 010h, 020h, 040h, 0F8h, 000h, 010h, 020h, 020h, 040h, 020h, 020h, 010h, 000h
DB 040h, 040h, 040h, 000h, 040h, 040h, 040h, 000h, 040h, 020h, 020h, 010h, 020h, 020h, 040h, 000h
DB 076h, 0DCh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 010h, 038h, 06Ch, 0C6h, 0C6h, 0FEh, 000h
DB 03Eh, 060h, 0C0h, 060h, 03Eh, 008h, 004h, 018h, 000h, 048h, 000h, 0CCh, 0CCh, 0CCh, 0CCh, 076h
DB 018h, 020h, 000h, 078h, 0CCh, 0FCh, 0C0h, 078h, 010h, 028h, 000h, 078h, 00Ch, 07Ch, 0CCh, 076h
DB 000h, 048h, 000h, 078h, 00Ch, 07Ch, 0CCh, 076h, 030h, 008h, 000h, 078h, 00Ch, 07Ch, 0CCh, 076h
DB 048h, 030h, 000h, 078h, 00Ch, 07Ch, 0CCh, 076h, 078h, 0CCh, 0C0h, 0CCh, 078h, 010h, 008h, 030h
DB 030h, 048h, 084h, 078h, 0CCh, 0FCh, 0C0h, 078h, 000h, 048h, 000h, 078h, 0CCh, 0FCh, 0C0h, 078h
DB 030h, 008h, 000h, 078h, 0CCh, 0FCh, 0C0h, 078h, 000h, 048h, 000h, 030h, 030h, 030h, 030h, 030h
DB 030h, 048h, 000h, 030h, 030h, 030h, 030h, 030h, 060h, 010h, 000h, 030h, 030h, 030h, 030h, 030h
DB 048h, 000h, 030h, 078h, 0CCh, 0CCh, 0FCh, 0CCh, 030h, 048h, 030h, 048h, 084h, 0FCh, 084h, 084h
DB 018h, 020h, 000h, 0F8h, 080h, 0F0h, 080h, 0F8h, 000h, 000h, 000h, 066h, 019h, 077h, 088h, 077h
DB 000h, 000h, 000h, 00Fh, 014h, 03Eh, 044h, 087h, 030h, 048h, 084h, 078h, 0CCh, 0CCh, 0CCh, 078h
DB 000h, 048h, 000h, 078h, 0CCh, 0CCh, 0CCh, 078h, 060h, 010h, 000h, 078h, 0CCh, 0CCh, 0CCh, 078h
DB 030h, 048h, 084h, 000h, 0CCh, 0CCh, 0CCh, 076h, 060h, 010h, 000h, 0CCh, 0CCh, 0CCh, 0CCh, 076h
DB 048h, 000h, 0CCh, 0CCh, 0CCh, 07Ch, 00Ch, 0F8h, 044h, 000h, 038h, 06Ch, 0C6h, 0C6h, 06Ch, 038h
DB 024h, 000h, 066h, 066h, 066h, 066h, 066h, 03Ch, 000h, 008h, 01Ch, 028h, 028h, 01Ch, 008h, 000h
DB 01Ch, 022h, 020h, 070h, 020h, 022h, 05Ch, 000h, 044h, 028h, 010h, 010h, 038h, 010h, 038h, 010h
DB 0F0h, 088h, 08Ah, 0F7h, 082h, 082h, 083h, 000h, 006h, 008h, 008h, 03Ch, 010h, 010h, 060h, 000h
DB 018h, 020h, 000h, 078h, 00Ch, 07Ch, 0CCh, 076h, 018h, 020h, 000h, 030h, 030h, 030h, 030h, 030h
DB 018h, 020h, 000h, 078h, 0CCh, 0CCh, 0CCh, 078h, 018h, 020h, 000h, 0CCh, 0CCh, 0CCh, 0CCh, 076h
DB 080h, 078h, 004h, 0F8h, 0CCh, 0CCh, 0CCh, 0CCh, 080h, 07Eh, 001h, 0C6h, 0E6h, 0D6h, 0CEh, 0C6h
DB 000h, 078h, 00Ch, 07Ch, 0CCh, 076h, 000h, 0FEh, 000h, 078h, 0CCh, 0CCh, 0CCh, 078h, 000h, 0FCh
DB 000h, 000h, 018h, 018h, 030h, 060h, 066h, 03Ch, 0FFh, 080h, 080h, 080h, 000h, 000h, 000h, 000h
DB 0FFh, 001h, 001h, 001h, 000h, 000h, 000h, 000h, 040h, 0C4h, 048h, 050h, 026h, 049h, 082h, 007h
DB 040h, 0C4h, 048h, 050h, 026h, 04Ah, 09Fh, 002h, 000h, 030h, 000h, 030h, 030h, 030h, 030h, 030h
DB 000h, 012h, 024h, 048h, 090h, 048h, 024h, 012h, 000h, 048h, 024h, 012h, 009h, 012h, 024h, 048h
DB 049h, 000h, 092h, 000h, 049h, 000h, 092h, 000h, 06Dh, 000h, 0B6h, 000h, 06Dh, 000h, 0B6h, 000h
DB 0AAh, 055h, 0AAh, 055h, 0AAh, 055h, 0AAh, 055h, 010h, 010h, 010h, 010h, 010h, 010h, 010h, 010h
DB 010h, 010h, 010h, 010h, 0F0h, 010h, 010h, 010h, 010h, 010h, 010h, 0F0h, 010h, 0F0h, 010h, 010h
DB 028h, 028h, 028h, 028h, 0E8h, 028h, 028h, 028h, 000h, 000h, 000h, 000h, 0F8h, 028h, 028h, 028h
DB 000h, 000h, 000h, 0F0h, 010h, 0F0h, 010h, 010h, 028h, 028h, 028h, 0E8h, 008h, 0E8h, 028h, 028h
DB 028h, 028h, 028h, 028h, 028h, 028h, 028h, 028h, 000h, 000h, 000h, 0F8h, 008h, 0E8h, 028h, 028h
DB 028h, 028h, 028h, 0E8h, 008h, 0F8h, 000h, 000h, 028h, 028h, 028h, 028h, 0F8h, 000h, 000h, 000h
DB 010h, 010h, 010h, 0F0h, 010h, 0F0h, 000h, 000h, 000h, 000h, 000h, 000h, 0F0h, 010h, 010h, 010h
DB 010h, 010h, 010h, 010h, 01Fh, 000h, 000h, 000h, 010h, 010h, 010h, 010h, 0FFh, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 0FFh, 010h, 010h, 010h, 010h, 010h, 010h, 010h, 01Fh, 010h, 010h, 010h
DB 000h, 000h, 000h, 000h, 0FFh, 000h, 000h, 000h, 010h, 010h, 010h, 010h, 0FFh, 010h, 010h, 010h
DB 010h, 010h, 010h, 01Fh, 010h, 01Fh, 010h, 010h, 028h, 028h, 028h, 028h, 03Fh, 028h, 028h, 028h
DB 028h, 028h, 028h, 02Fh, 020h, 03Fh, 000h, 000h, 000h, 000h, 000h, 03Fh, 020h, 02Fh, 028h, 028h
DB 028h, 028h, 028h, 0EFh, 000h, 0FFh, 000h, 000h, 000h, 000h, 000h, 0FFh, 000h, 0EFh, 028h, 028h
DB 028h, 028h, 028h, 02Fh, 020h, 02Fh, 028h, 028h, 000h, 000h, 000h, 0FFh, 000h, 0FFh, 000h, 000h
DB 028h, 028h, 028h, 0EFh, 000h, 0EFh, 028h, 028h, 010h, 010h, 010h, 0FFh, 000h, 0FFh, 000h, 000h
DB 028h, 028h, 028h, 028h, 0FFh, 000h, 000h, 000h, 000h, 000h, 000h, 0FFh, 000h, 0FFh, 010h, 010h
DB 000h, 000h, 000h, 000h, 0FFh, 028h, 028h, 028h, 028h, 028h, 028h, 028h, 03Fh, 000h, 000h, 000h
DB 010h, 010h, 010h, 01Fh, 010h, 01Fh, 000h, 000h, 000h, 000h, 000h, 01Fh, 010h, 01Fh, 010h, 010h
DB 000h, 000h, 000h, 000h, 03Fh, 028h, 028h, 028h, 028h, 028h, 028h, 028h, 0FFh, 028h, 028h, 028h
DB 010h, 010h, 010h, 0FFh, 010h, 0FFh, 010h, 010h, 010h, 010h, 010h, 010h, 0F0h, 000h, 000h, 000h
DB 000h, 000h, 000h, 000h, 01Fh, 010h, 010h, 010h, 0FFh, 0FFh, 0FFh, 0FFh, 0FFh, 0FFh, 0FFh, 0FFh
DB 000h, 000h, 000h, 000h, 0FFh, 0FFh, 0FFh, 000h, 0E0h, 0E0h, 0E0h, 0E0h, 0E0h, 0E0h, 0E0h, 0E0h
DB 007h, 007h, 007h, 007h, 007h, 007h, 007h, 007h, 0FFh, 0FFh, 0FFh, 0FFh, 000h, 000h, 000h, 000h
DB 000h, 000h, 000h, 002h, 034h, 04Ch, 04Ch, 032h, 000h, 05Ch, 022h, 022h, 03Ch, 044h, 044h, 078h
DB 07Eh, 042h, 042h, 040h, 040h, 040h, 040h, 040h, 000h, 000h, 002h, 07Ch, 0A8h, 028h, 028h, 044h
DB 000h, 07Eh, 061h, 030h, 018h, 008h, 010h, 020h, 000h, 000h, 008h, 07Fh, 088h, 088h, 088h, 070h
DB 000h, 000h, 000h, 022h, 044h, 044h, 07Ah, 080h, 000h, 000h, 000h, 07Ch, 010h, 010h, 010h, 010h
DB 000h, 01Ch, 008h, 03Eh, 041h, 041h, 041h, 03Eh, 000h, 000h, 038h, 044h, 044h, 07Ch, 044h, 044h
DB 03Ch, 066h, 0C3h, 0C3h, 0C3h, 066h, 024h, 066h, 00Ch, 010h, 008h, 01Ch, 022h, 022h, 022h, 01Ch
DB 000h, 000h, 000h, 000h, 06Ch, 092h, 092h, 06Ch, 000h, 001h, 01Ah, 026h, 02Ah, 032h, 02Ch, 040h
DB 000h, 018h, 020h, 020h, 030h, 020h, 020h, 018h, 000h, 03Ch, 042h, 042h, 042h, 042h, 042h, 042h
DB 000h, 000h, 07Eh, 000h, 07Eh, 000h, 07Eh, 000h, 000h, 008h, 008h, 03Eh, 008h, 008h, 000h, 03Eh
DB 000h, 010h, 008h, 004h, 008h, 010h, 000h, 03Eh, 000h, 004h, 008h, 010h, 008h, 004h, 000h, 03Eh
DB 000h, 006h, 009h, 009h, 008h, 008h, 008h, 000h, 000h, 000h, 008h, 008h, 008h, 048h, 048h, 030h
DB 000h, 000h, 008h, 000h, 03Eh, 000h, 008h, 000h, 000h, 060h, 092h, 00Ch, 060h, 092h, 00Ch, 000h
DB 060h, 090h, 060h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 030h, 078h, 030h, 000h, 000h
DB 000h, 000h, 000h, 000h, 020h, 000h, 000h, 000h, 000h, 003h, 004h, 004h, 0C8h, 028h, 010h, 000h
DB 000h, 000h, 000h, 07Ch, 042h, 042h, 042h, 000h, 018h, 024h, 008h, 010h, 03Ch, 000h, 000h, 000h
DB 000h, 000h, 000h, 03Eh, 03Eh, 03Eh, 03Eh, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h

View File

@ -1,20 +0,0 @@
asm= lzasm /z/t
lnk= elink
all: setup.com
setup.com: setup.obj
$(lnk) setup.obj setup.com /c
setup.obj:
$(asm) setup.asm
clean:
del *.obj
del *.exe
del *.bak
del *.lib
del *.com
del *.bin
del *.sys
del *.err

View File

@ -1,164 +0,0 @@
model tiny,stdcall
p486
locals
jumps
codeseg
option procalign:byte
org 0100h
ent equ 32h
jmp copycos
message db 0Dh,0Ah,'COS 2000 V1.3.1BetaFr programme d''installation',0Dh,0AH,'Inserez une disquette formatee et appuyez sur entre...',0Dh,0AH,'Attention le contenu de celle ci peut etre altere !!!',0Dh,0AH,'$'
message2 db 0Dh,0AH,'Creation du secteur de demarrage...',0Dh,0Ah,'$'
message3 db 0Dh,0AH,'Copie des fichiers systeme...',0Dh,0Ah,'$'
errormsg db 0Dh,0AH,'Erreur d''installation, contactez moi a COS2000@MULTIMANIA.COM !',0Dh,0AH,'$'
ok db 0Dh,0AH,'COS2000 a ete correctement installe, veuillez redemarrer votre PC',0Dh,0AH,'$'
files db '*.*',0
boot db 'boot.bin',0
dat db 'data',0
retu db 0Dh,0AH,'$'
dta db 43 dup (0)
copycos:
mov ah,9
mov dx,offset message
int 21h
xor ax,ax
int 16h
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 dx,offset dat
int 21h
jc error
mov ah,1Ah
mov dx,offset dta
int 21h
jc error
mov ah,4eh
xor cx,cx
mov dx,offset files
int 21h
jc error
mov ah,09
mov dx,offset message3
int 21h
allfile:
mov [byte ptr offset dta+43],'$'
mov ah,9
mov dx,offset dta+30
int 21h
push dx
mov ah,09
mov dx,offset retu
int 21h
pop dx
mov ax,3D00h
int 21h
jc error
mov bx,ax
mov ax,4202h
xor cx,cx
xor dx,dx
int 21h
jc error
cmp dx,0
jne error
cmp ax,0
je error
mov bp,ax
mov ax,4200h
xor cx,cx
xor dx,dx
int 21h
jc error
push fs
pop ds
mov ah,3fh
mov cx,0FFFFh
xor dx,dx
int 21h
push cs
pop ds
jc error
mov ah,3eh
int 21h
jc error
mov ah,3ch
push cs
pop es
mov di,offset dta+30-3
mov [word ptr di],":a"
mov [byte ptr di+2],"\"
xor cx,cx
mov dx,di
int 21h
jc error
mov bx,ax
push fs
pop ds
xor dx,dx
mov ah,40h
mov cx,bp
int 21h
push cs
pop ds
jc error
mov ah,3eh
int 21h
jc error
mov ah,4fh
int 21h
jnc allfile
mov ah,09
mov dx,offset message2
int 21h
mov ax,3D00h
mov dx,offset boot
int 21h
jc error
push fs
pop ds
mov ah,3fh
mov cx,0FFFFh
xor dx,dx
int 21h
push cs
pop ds
jc error
mov ah,3eh
int 21h
jc error
push fs
pop es
mov ax,0301h
mov dx,0
mov cx,0001h
xor bx,bx
int 13h
mov ah,09
mov dx,offset ok
int 21h
xor ax,ax
int 16h
ret
error:
mov ah,09
mov dx,offset errormsg
int 21h
xor ax,ax
int 16h
ret

Binary file not shown.

View File

@ -1,121 +0,0 @@
<?xml version='1.0' encoding='utf-8' ?>
<!-- C++Builder XML Project -->
<PROJECT>
<MACROS>
<VERSION value="BCB.06.00"/>
<PROJECT value="setup.exe"/>
<OBJFILES value="setup.obj Unit1.obj"/>
<RESFILES value="setup.res"/>
<IDLFILES value=""/>
<IDLGENFILES value=""/>
<DEFFILE value=""/>
<RESDEPEN value="$(RESFILES) Unit1.dfm"/>
<LIBFILES value=""/>
<LIBRARIES value="rtl.lib vcl.lib"/>
<SPARELIBS value="vcl.lib rtl.lib"/>
<PACKAGES value="vcl.bpi rtl.bpi dbrtl.bpi adortl.bpi vcldb.bpi vclx.bpi bdertl.bpi
vcldbx.bpi ibxpress.bpi dsnap.bpi cds.bpi bdecds.bpi qrpt.bpi teeui.bpi
teedb.bpi tee.bpi dss.bpi teeqr.bpi visualclx.bpi visualdbclx.bpi
dsnapcrba.bpi dsnapcon.bpi bcbsmp.bpi vclie.bpi xmlrtl.bpi inet.bpi
inetdbbde.bpi inetdbxpress.bpi inetdb.bpi nmfast.bpi webdsnap.bpi
bcbie.bpi websnap.bpi soaprtl.bpi dclocx.bpi dbexpress.bpi dbxcds.bpi
indy.bpi bcb2kaxserver.bpi pop.bpi IcsBcb50.bpi bcbshlctrls.bpi"/>
<PATHCPP value=".;"/>
<PATHPAS value=".;"/>
<PATHRC value=".;"/>
<PATHASM value=".;"/>
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
<RELEASELIBPATH value="$(BCB)\lib\release"/>
<LINKER value="ilink32"/>
<USERDEFINES value=""/>
<SYSDEFINES value="_RTLDLL;NO_STRICT"/>
<MAINSOURCE value="setup.cpp"/>
<INCLUDEPATH value="E:\CBuilder6\Projects;&quot;C:\Documents and Settings\niko\Bureau\Nouveau dossier&quot;;$(BCB)\include;$(BCB)\include\vcl"/>
<LIBPATH value="E:\CBuilder6\Projects;&quot;C:\Documents and Settings\niko\Bureau\Nouveau dossier&quot;;$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib"/>
<WARNINGS value="-w-par"/>
<OTHERFILES value=""/>
</MACROS>
<OPTIONS>
<IDLCFLAGS value="-IE:\CBuilder6\Projects
-I&quot;C:\Documents and Settings\niko\Bureau\Nouveau dossier&quot; -I$(BCB)\include
-I$(BCB)\include\vcl -src_suffix cpp -boa"/>
<CFLAG1 value="-O2 -H=$(BCB)\lib\vcl60.csm -Hc -w- -Vx -Ve -X- -a8 -b- -k- -vi -c -tW -tWM"/>
<PFLAGS value="-$Y- -$L- -$D- -$A8 -v -JPHNE -M"/>
<RFLAGS value=""/>
<AFLAGS value="/mx /w2 /zn"/>
<LFLAGS value="-D&quot;&quot; -aa -Tpe -x -Gn"/>
<OTHERFILES value=""/>
</OPTIONS>
<LINKER>
<ALLOBJ value="c0w32.obj Memmgr.Lib sysinit.obj $(OBJFILES)"/>
<ALLRES value="$(RESFILES)"/>
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib"/>
<OTHERFILES value=""/>
</LINKER>
<FILELIST>
<FILE FILENAME="setup.res" FORMNAME="" UNITNAME="setup.res" CONTAINERID="ResTool" DESIGNCLASS="" LOCALCOMMAND=""/>
<FILE FILENAME="setup.cpp" FORMNAME="" UNITNAME="setup" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
<FILE FILENAME="Unit1.cpp" FORMNAME="Form1" UNITNAME="Unit1" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
</FILELIST>
<BUILDTOOLS>
</BUILDTOOLS>
<IDEOPTIONS>
[Version Info]
IncludeVerInfo=0
AutoIncBuild=0
MajorVer=1
MinorVer=0
Release=0
Build=0
Debug=0
PreRelease=0
Special=0
Private=0
DLL=0
Locale=1036
CodePage=1252
[Version Info Keys]
CompanyName=
FileDescription=
FileVersion=1.0.0.0
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=
ProductVersion=1.0.0.0
Comments=
[Debugging]
DebugSourceDirs=$(BCB)\source\vcl
[Parameters]
RunParams=
Launcher=
UseLauncher=0
DebugCWD=
HostApplication=
RemoteHost=
RemotePath=
RemoteLauncher=
RemoteCWD=
RemoteDebug=0
[Compiler]
ShowInfoMsgs=0
LinkDebugVcl=0
LinkCGLIB=0
[CORBA]
AddServerUnit=1
AddClientUnit=1
PrecompiledHeaders=1
[Language]
ActiveLang=
ProjectLang=
RootDir=
</IDEOPTIONS>
</PROJECT>

View File

@ -1,33 +0,0 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
//---------------------------------------------------------------------------
USEFORM("Unit1.cpp", Form1);
//---------------------------------------------------------------------------
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
try
{
Application->Initialize();
Application->CreateForm(__classid(TForm1), &Form1);
Application->Run();
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
catch (...)
{
try
{
throw Exception("");
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
}
return 0;
}
//---------------------------------------------------------------------------

Binary file not shown.

Binary file not shown.

View File

@ -1,166 +0,0 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#include <winioctl.h>
#include <io.h>
#include <fcntl.h>
#include <dir.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
HANDLE hDrive;
DISK_GEOMETRY dg_flop_geom;
AnsiString lecteur="b:";
AnsiString device="\\\\.\\"+lecteur;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
char * GetLastErrorString(void)
{
LPVOID lpMsgBuf;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR) &lpMsgBuf, 0, NULL);
return (char *)lpMsgBuf;
}
//---------------------------------------------------------------------------
ShowMessages(AnsiString msg)
{
Form1->Memo1->Lines->Add(msg);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormShow(TObject *Sender)
{
DWORD dwNotUsed;
DWORD error=0;
hDrive = CreateFile(device.c_str(), GENERIC_WRITE,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,NULL);
ShowMessages("Ouverture du peripherique "+lecteur);
if (hDrive == INVALID_HANDLE_VALUE) {
ShowMessages("Erreur : "+AnsiString(GetLastErrorString()));
error=1;
}
if(error!=1&&ShowMessages("Determination de la geometrie ")&&DeviceIoControl(hDrive, IOCTL_DISK_GET_DRIVE_GEOMETRY, NULL,0, &dg_flop_geom, sizeof(dg_flop_geom),&dwNotUsed, NULL) == FALSE) {
ShowMessages("Erreur : "+AnsiString(GetLastErrorString()));
error=1;
}
if(error!=1&&(dg_flop_geom.MediaType==FixedMedia||dg_flop_geom.MediaType==RemovableMedia||dg_flop_geom.MediaType==Unknown))
{
ShowMessages("Erreur : Ceci n'est pas une disquette !");
error=1;
}
if (error!=1&&ShowMessages("Positionnement sur le secteur 0")&&SetFilePointer(hDrive, 0, NULL, FILE_BEGIN) == -1) {
ShowMessages("Erreur : "+AnsiString(GetLastErrorString()));
error=1;
}
if (error!=1)
{
drive->Caption=lecteur.UpperCase();
track->Caption=IntToStr(dg_flop_geom.Cylinders.LowPart);
sector->Caption=IntToStr(dg_flop_geom.SectorsPerTrack);
size->Caption=IntToStr(dg_flop_geom.BytesPerSector);
head->Caption=IntToStr(dg_flop_geom.TracksPerCylinder);
allsize->Caption=IntToStr(dg_flop_geom.BytesPerSector*dg_flop_geom.Cylinders.LowPart*dg_flop_geom.SectorsPerTrack*dg_flop_geom.TracksPerCylinder);
allsector->Caption=IntToStr(dg_flop_geom.Cylinders.LowPart*dg_flop_geom.SectorsPerTrack*dg_flop_geom.TracksPerCylinder);
}
else
{
CloseHandle(hDrive);
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
if (hDrive == NULL||dg_flop_geom.TracksPerCylinder>2||dg_flop_geom.TracksPerCylinder==0)
{
ShowMessages("Aucun support valide detecté !");
}
else
{
int fdboot;
DWORD error=0;
DWORD dwBsWritten;
char * buffer;
AnsiString bootfile="data/boot.bin";
ShowMessages("Allocation de mémoire ");
buffer = (char *)malloc(dg_flop_geom.BytesPerSector);
ShowMessages("Ouverture et installation du fichier de boot "+bootfile);
if ((fdboot = _rtl_open(bootfile.c_str(),O_RDONLY | O_BINARY)) == -1 )
{
ShowMessages("Erreur : Fichier de boot introuvable");
error=1;
}
if (error!=1&&_read(fdboot, buffer, dg_flop_geom.BytesPerSector)!= dg_flop_geom.BytesPerSector)
{
ShowMessages("Erreur : Fichier de boot de taille incorrecte !");
error=1;
}
if (error!=1&&WriteFile(hDrive, buffer, dg_flop_geom.BytesPerSector, &dwBsWritten, NULL) == 0)
{
ShowMessages("Ecriture impossible sur le secteur de boot !");
error=1;
}
_rtl_close(fdboot);
if (error!=1)
{
struct ffblk files;
int done;
int number=0;
ShowMessages("Détermination des fichiers a copier");
done = findfirst("data/*.*",&files,0);
while (!done)
{
number++;
done = findnext(&files);
}
install->Max=number;
install->Min=0;
install->Position=0;
ShowMessages("Copie des fichiers de cos2000");
done = findfirst("data/*.*",&files,0);
while (!done)
{
ShowMessages(AnsiString(files.ff_name).LowerCase());
if (!CopyFile((AnsiString("data/")+AnsiString(files.ff_name)).c_str(),(lecteur+"\\"+AnsiString(files.ff_name)).c_str(),false))
{
ShowMessages("Erreur : fichier impossible a copier"+AnsiString(GetLastErrorString()));
error=1;
break;
}
done = findnext(&files);
install->Position++;
}
if (!error)
{
ShowMessages("Installation terminée !");
Button2->Visible=false;
Button1->Visible=false;
Button3->Visible=true;
}
else
ShowMessages("Installation echoué !");
}
free(buffer);
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormClose(TObject *Sender, TCloseAction &Action)
{
CloseHandle(hDrive);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button3Click(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------

Binary file not shown.

View File

@ -1,184 +0,0 @@
object Form1: TForm1
Left = 418
Top = 273
Width = 599
Height = 371
Caption = 'Installation de COS2000'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
OnClose = FormClose
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object Button1: TButton
Left = 288
Top = 304
Width = 75
Height = 25
Caption = 'installer...'
TabOrder = 0
OnClick = Button1Click
end
object install: TProgressBar
Left = 16
Top = 264
Width = 553
Height = 25
Min = 0
Max = 100
TabOrder = 1
end
object Button2: TButton
Left = 208
Top = 304
Width = 75
Height = 25
Caption = 'support'
TabOrder = 2
OnClick = FormShow
end
object Memo1: TMemo
Left = 192
Top = 24
Width = 377
Height = 225
ReadOnly = True
TabOrder = 3
end
object GroupBox1: TGroupBox
Left = 16
Top = 120
Width = 161
Height = 129
Caption = 'G'#233'om'#233'trie'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
TabOrder = 4
object track: TLabel
Left = 96
Top = 60
Width = 31
Height = 13
Caption = 'Aucun'
end
object Label4: TLabel
Left = 24
Top = 60
Width = 34
Height = 13
Caption = 'Pistes :'
end
object Label5: TLabel
Left = 24
Top = 28
Width = 48
Height = 13
Caption = 'Secteurs :'
end
object sector: TLabel
Left = 96
Top = 28
Width = 31
Height = 13
Caption = 'Aucun'
end
object head: TLabel
Left = 96
Top = 44
Width = 31
Height = 13
Caption = 'Aucun'
end
object Label6: TLabel
Left = 24
Top = 44
Width = 33
Height = 13
Caption = 'Tetes :'
end
object Label8: TLabel
Left = 24
Top = 84
Width = 69
Height = 13
Caption = 'Taille secteur :'
end
object size: TLabel
Left = 96
Top = 84
Width = 31
Height = 13
Caption = 'Aucun'
end
end
object GroupBox2: TGroupBox
Left = 16
Top = 16
Width = 161
Height = 97
Caption = 'Support'
TabOrder = 5
object Label1: TLabel
Left = 24
Top = 24
Width = 42
Height = 13
Caption = 'Lecteur :'
end
object drive: TLabel
Left = 88
Top = 24
Width = 31
Height = 13
Caption = 'Aucun'
end
object Label2: TLabel
Left = 24
Top = 40
Width = 31
Height = 13
Caption = 'Taille :'
end
object allsize: TLabel
Left = 88
Top = 40
Width = 31
Height = 13
Caption = 'Aucun'
end
object Label3: TLabel
Left = 24
Top = 56
Width = 58
Height = 13
Caption = 'N'#176'secteurs :'
end
object allsector: TLabel
Left = 88
Top = 56
Width = 31
Height = 13
Caption = 'Aucun'
end
end
object Button3: TButton
Left = 248
Top = 304
Width = 75
Height = 25
Caption = 'Quitter'
TabOrder = 6
Visible = False
OnClick = Button3Click
end
end

View File

@ -1,47 +0,0 @@
//---------------------------------------------------------------------------
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ComCtrls.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published: // IDE-managed Components
TButton *Button1;
TProgressBar *install;
TButton *Button2;
TMemo *Memo1;
TGroupBox *GroupBox1;
TLabel *track;
TLabel *Label4;
TLabel *Label5;
TLabel *sector;
TLabel *head;
TLabel *Label6;
TLabel *Label8;
TLabel *size;
TGroupBox *GroupBox2;
TLabel *Label1;
TLabel *drive;
TLabel *Label2;
TLabel *allsize;
TLabel *Label3;
TLabel *allsector;
TButton *Button3;
void __fastcall FormShow(TObject *Sender);
void __fastcall Button1Click(TObject *Sender);
void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
void __fastcall Button3Click(TObject *Sender);
private: // User declarations
public: // User declarations
__fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif

View File

@ -1,4 +0,0 @@
This file is used by the project manager only and should be treated like the project file
main

View File

@ -1,120 +0,0 @@
<?xml version='1.0' encoding='utf-8' ?>
<!-- C++Builder XML Project -->
<PROJECT>
<MACROS>
<VERSION value="BCB.06.00"/>
<PROJECT value="setup.exe"/>
<OBJFILES value="Unit1.obj"/>
<RESFILES value="Setup.res"/>
<IDLFILES value=""/>
<IDLGENFILES value=""/>
<DEFFILE value=""/>
<RESDEPEN value="$(RESFILES)"/>
<LIBFILES value=""/>
<LIBRARIES value=""/>
<SPARELIBS value=""/>
<PACKAGES value="vcl.bpi rtl.bpi dbrtl.bpi adortl.bpi vcldb.bpi vclx.bpi bdertl.bpi
vcldbx.bpi ibxpress.bpi dsnap.bpi cds.bpi bdecds.bpi qrpt.bpi teeui.bpi
teedb.bpi tee.bpi dss.bpi teeqr.bpi visualclx.bpi visualdbclx.bpi
dsnapcrba.bpi dsnapcon.bpi bcbsmp.bpi vclie.bpi xmlrtl.bpi inet.bpi
inetdbbde.bpi inetdbxpress.bpi inetdb.bpi nmfast.bpi webdsnap.bpi
bcbie.bpi websnap.bpi soaprtl.bpi dclocx.bpi dbexpress.bpi dbxcds.bpi
indy.bpi bcb2kaxserver.bpi pop.bpi IcsBcb50.bpi bcbshlctrls.bpi"/>
<PATHCPP value=".;"/>
<PATHPAS value=".;"/>
<PATHRC value=".;"/>
<PATHASM value=".;"/>
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
<RELEASELIBPATH value="$(BCB)\lib\release"/>
<LINKER value="ilink32"/>
<USERDEFINES value=""/>
<SYSDEFINES value="NO_STRICT;_NO_VCL;_RTLDLL"/>
<MAINSOURCE value="Setup.bpf"/>
<INCLUDEPATH value="&quot;..\Nouveau dossier (2)&quot;;$(BCB)\include;$(BCB)\include\vcl"/>
<LIBPATH value="&quot;..\Nouveau dossier (2)&quot;;$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib"/>
<WARNINGS value="-w-par"/>
<OTHERFILES value=""/>
</MACROS>
<OPTIONS>
<IDLCFLAGS value="-I&quot;..\Nouveau dossier (2)&quot; -I$(BCB)\include -I$(BCB)\include\vcl
-src_suffix cpp -boa"/>
<CFLAG1 value="-O2 -H=$(BCB)\lib\vcl60.csm -Hc -Vx -Ve -X- -a8 -b- -k- -vi -tWC -tWM- -c"/>
<PFLAGS value="-$Y- -$L- -$D- -$A8 -v -JPHNE -M"/>
<RFLAGS value=""/>
<AFLAGS value="/mx /w2 /zn"/>
<LFLAGS value="-D&quot;&quot; -ap -Tpe -x -Gn"/>
<OTHERFILES value=""/>
</OPTIONS>
<LINKER>
<ALLOBJ value="c0x32.obj $(OBJFILES)"/>
<ALLRES value="$(RESFILES)"/>
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cw32i.lib"/>
<OTHERFILES value=""/>
</LINKER>
<FILELIST>
<FILE FILENAME="Setup.res" FORMNAME="" UNITNAME="Setup.res" CONTAINERID="ResTool" DESIGNCLASS="" LOCALCOMMAND=""/>
<FILE FILENAME="Setup.bpf" FORMNAME="" UNITNAME="Setup" CONTAINERID="BPF" DESIGNCLASS="" LOCALCOMMAND=""/>
<FILE FILENAME="Unit1.cpp" FORMNAME="" UNITNAME="Unit1" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
</FILELIST>
<BUILDTOOLS>
</BUILDTOOLS>
<IDEOPTIONS>
[Version Info]
IncludeVerInfo=0
AutoIncBuild=0
MajorVer=1
MinorVer=0
Release=0
Build=0
Debug=0
PreRelease=0
Special=0
Private=0
DLL=0
Locale=1036
CodePage=1252
[Version Info Keys]
CompanyName=
FileDescription=
FileVersion=1.0.0.0
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=
ProductVersion=1.0.0.0
Comments=
[Debugging]
DebugSourceDirs=$(BCB)\source\vcl
[Parameters]
RunParams=
Launcher=
UseLauncher=0
DebugCWD=
HostApplication=
RemoteHost=
RemotePath=
RemoteLauncher=
RemoteCWD=
RemoteDebug=0
[Compiler]
ShowInfoMsgs=0
LinkDebugVcl=0
LinkCGLIB=0
[CORBA]
AddServerUnit=1
AddClientUnit=1
PrecompiledHeaders=1
[Language]
ActiveLang=
ProjectLang=
RootDir=
</IDEOPTIONS>
</PROJECT>

Binary file not shown.

Binary file not shown.

View File

@ -1,135 +0,0 @@
//---------------------------------------------------------------------------
#include <windows.h>
#include <winbase.h>
#include <winioctl.h>
#include <io.h>
#include <stdio.h>
#include <fcntl.h>
#include <dir.h>
#pragma hdrstop
//---------------------------------------------------------------------------
char * GetLastErrorString(void)
{
LPVOID lpMsgBuf;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR) &lpMsgBuf, 0, NULL);
return (char *)lpMsgBuf;
}
#pragma argsused
int main(int argc, char* argv[])
{
DWORD dwNotUsed;
DWORD error=0;
HANDLE hDrive;
DISK_GEOMETRY dg_flop_geom;
char lecteur[4]="a:\0";
char device[7]="\\\\.\\a:\0";
int fdboot;
DWORD dwBsWritten;
char * buffer;
char bootfile[14]="data/boot.bin\0";
struct ffblk files;
int done;
int number=0;
char src[80];
char dest[80];
printf("Installation de COS2000\nInserez une disquette et appuyer sur une touche...\n");
getchar();
hDrive = CreateFile(device, GENERIC_WRITE,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,NULL);
printf("Ouverture du peripherique %s\n",lecteur);
if (hDrive == INVALID_HANDLE_VALUE) {
printf("Erreur : %s\n",GetLastErrorString());
error=1;
}
if(error!=1&&printf("Determination de la geometrie \n")&&DeviceIoControl(hDrive, IOCTL_DISK_GET_DRIVE_GEOMETRY, NULL,0, &dg_flop_geom, sizeof(dg_flop_geom),&dwNotUsed, NULL) == FALSE) {
printf("Erreur : %s\n",GetLastErrorString());
error=1;
}
if(error!=1&&(dg_flop_geom.MediaType==FixedMedia||dg_flop_geom.MediaType==RemovableMedia||dg_flop_geom.MediaType==Unknown))
{
printf("Erreur : Ceci n'est pas une disquette !\n");
error=1;
}
if (error!=1&&printf("Positionnement sur le secteur 0\n")&&SetFilePointer(hDrive, 0, NULL, FILE_BEGIN) == -1) {
printf("Erreur : %s\n",GetLastErrorString());
error=1;
}
if (error!=1)
{
printf("Pistes :%u Secteurs:%u Tetes:%u Taille:%u\n",dg_flop_geom.Cylinders.LowPart,dg_flop_geom.SectorsPerTrack,dg_flop_geom.TracksPerCylinder,dg_flop_geom.BytesPerSector);
}
else
{
CloseHandle(hDrive);
}
if (hDrive == NULL||dg_flop_geom.TracksPerCylinder>2||dg_flop_geom.TracksPerCylinder==0)
{
printf("Aucun support valide detecte !");
error=1;
}
if (error!=1)
{
printf("Allocation de memoire\n");
buffer = (char *)malloc(dg_flop_geom.BytesPerSector);
printf("Ouverture et installation du fichier de boot %s\n",bootfile);
}
if (error!=1&&(fdboot = _rtl_open(bootfile,O_RDONLY | O_BINARY)) == -1 )
{
printf("Erreur : Fichier de boot introuvable\n");
error=1;
}
if (error!=1&&_read(fdboot, buffer, dg_flop_geom.BytesPerSector)!= dg_flop_geom.BytesPerSector)
{
printf("Erreur : Fichier de boot de taille incorrecte !\n");
error=1;
}
if (error!=1&&WriteFile(hDrive, buffer, dg_flop_geom.BytesPerSector, &dwBsWritten, NULL) == 0)
{
printf("Ecriture impossible sur le secteur de boot !\n");
error=1;
}
if (error!=1)
{
_rtl_close(fdboot);
printf("Determination des fichiers a copier\n\n");
done = findfirst("data\\*.*",&files,0);
while (!done)
{
number++;
done = findnext(&files);
}
printf("Copie des fichiers de cos2000\n");
done = findfirst("data\\*.*",&files,0);
while (!done)
{
printf("%s\n",files.ff_name);
sprintf(src, "data\\%s",files.ff_name);
sprintf(dest, "%s\\%s",lecteur,files.ff_name);
if (!CopyFile(src,dest,false))
{
printf("Erreur : fichier impossible a copier %s\n",GetLastErrorString());
error=1;
break;
}
done = findnext(&files);
}
if (!error)
{
printf("Installation terminee !\nVeuillez redemarrer votre PC afin de charger le systeme");
}
else
{
printf("Installation echoué !");
}
free(buffer);
}
getchar();
return 0;
}
//---------------------------------------------------------------------------

View File

@ -1,20 +0,0 @@
asm= lzasm /z/t
lnk= elink
all: detect.lib video.lib str0.lib bmp.lib
.asm.obj:
$(asm) $<
.obj.lib:
$(lnk) $< $*.lib
clean:
del *.obj
del *.ce
del *.bak
del *.lib
del *.com
del *.bin
del *.sys
del *.err

View File

@ -1,105 +0,0 @@
model tiny,stdcall
p586N
locals
jumps
codeseg
option procalign:byte
include "..\include\mem.h"
include "..\include\divers.h"
include "..\include\bmp.h"
org 0h
start:
header exe <"CE",1,0,0,offset exports,offset imports,,>
exporting
declare showbmp
declare loadbmppalet
ende
importing
use VIDEO,showpixel
endi
;==========SHOWBMP=========
;Affiche le BMP pointée par DS:%0 en %1, %2
;<- DS:%0 BMP, %1 coordonnées X, %2 coordonnées Y
;->
;==========================
PROC showbmp FAR
ARG @pointer:word, @x:word, @y:word
USES ax,bx,cx,dx,si,di
mov si,[@pointer]
cmp [word ptr (bmp_file si).bmp_filetype],"MB"
jne @@errorshowing
mov edi,[(bmp_file si).bmp_bitmapoffset]
add di,400h
add di,si
xor ebx,ebx
mov ecx,[(bmp_file si).bmp_height]
mov edx,[(bmp_file si).bmp_width]
;and dx,11111100b
cmp edx,[(bmp_file si).bmp_width]
;jae @@noadjust
;add dx,4
@@noadjust:
sub edx,[(bmp_file si).bmp_width]
@@bouclette:
push bx cx
add bx,[@x]
add cx,[@y]
call [cs:showpixel],bx,cx,[word ptr di]
pop cx bx
inc bx
inc di
cmp ebx,[(bmp_file si).bmp_width]
jb @@bouclette
xor bx,bx
;add di,dx
dec cx
cmp cx,0
jne @@bouclette
clc
ret
@@errorshowing:
stc
ret
ENDP showbmp
;==========LOADBMPPALET=========
;Charge la palette du BMP pointée par DS:%0
;-> DS:%0 BMP
;<-
;===============================
PROC loadbmppalet FAR
ARG @pointer:word
USES ax,bx,cx,dx,si
mov si,[@pointer]
mov bx,0400h+36h-4
mov cx,100h
mov dx, 3c8h
@@paletteload:
mov al, cl
dec al
out dx, al
inc dx
mov al,[bx+si+2]
shr al,2
out dx, al
mov al,[bx+si+1]
shr al,2
out dx, al
mov al,[bx+si]
shr al,2
out dx, al
sub bx,4
dec dx
dec cl
jnz @@paletteload
ret
ENDP loadbmppalet

View File

@ -1,762 +0,0 @@
model tiny,stdcall
p586
locals
jumps
codeseg
option procalign:byte
include "..\include\mem.h"
include "..\include\cpu.h"
include "..\include\pci.h"
org 0h
header exe <"CE",1,0,0,offset exports,,,>
exporting
declare cpuinfo
declare setinfo
declare pciinfo
declare getpciclass
declare getpcisubclass
declare getcardinfo
declare pcireadbyte
declare pcireadword
declare pcireaddword
declare detectvmware
ende
PROC detectvmware FAR
USES eax,ebx,ecx,edx
mov eax,564D5868h
mov ebx,12345h
mov ecx,00Ah
mov edx,5658h
in ax,dx
cmp ebx,564D5868h
ret
endp detectvmware
;renvoie un pointer dx:ax vers la classe %0
PROC getpciclass FAR
ARG @class:word
USES di
mov di,[@class]
and di,0FFh
shl di,1
mov ax,[cs:offset classes+di]
mov dx,cs
ret
endp getpciclass
;renvoie un pointer dx:ax vers la sous-classe de %1 et de classe %0
PROC getpcisubclass FAR
ARG @class:word,@subclass:word
USES di
mov di,[@class]
and di,0FFh
shl di,1
mov di,[cs:offset classesd+di]
mov dx,[@subclass]
and dx,0FFh
cmp dx,80h
jne @@suiteac
mov ax,offset divers
jmp @@found
@@suiteac:
shl dx,1
add di,dx
mov ax,[cs:di]
@@found:
mov dx,cs
ret
endp getpcisubclass
divers db 'divers',0
classes:
dw offset class0
dw offset class1
dw offset class2
dw offset class3
dw offset class4
dw offset class5
dw offset class6
dw offset class7
dw offset class8
dw offset class9
dw offset class10
dw offset class11
dw offset class12
dw offset class13
dw offset class14
dw offset class15
dw offset class16
dw offset class17
class0 db 'ancien',0
class1 db 'stockage',0
class2 db 'reseau',0
class3 db 'affichage',0
class4 db 'multimedia',0
class5 db 'memoire',0
class6 db 'pont',0
class7 db 'communication',0
class8 db 'systeme',0
class9 db 'acquisition',0
class10 db 'dock',0
class11 db 'processeur',0
class12 db 'bus serie',0
class13 db 'sans fil',0
class14 db 'intelligent',0
class15 db 'satellite',0
class16 db 'cryptage',0
class17 db 'traitement signal',0
;Classes et sous classes
classesd:
dw offset class0d
dw offset class1d
dw offset class2d
dw offset class3d
dw offset class4d
dw offset class5d
dw offset class6d
dw offset class7d
dw offset class8d
dw offset class9d
dw offset class10d
dw offset class11d
dw offset class12d
dw offset class13d
dw offset class14d
dw offset class15d
dw offset class16d
dw offset class17d
class0d:
dw offset subclass00
dw offset subclass01
subclass00 db 'divers',0
subclass01 db 'vga',0
class1d:
dw offset subclass10
dw offset subclass11
dw offset subclass12
dw offset subclass13
dw offset subclass14
subclass10 db 'scsi',0
subclass11 db 'ide',0
subclass12 db 'disquette',0
subclass13 db 'ipi',0
subclass14 db 'raid',0
class2d:
dw offset subclass20
dw offset subclass21
dw offset subclass22
dw offset subclass23
dw offset subclass24
subclass20 db 'ethernet',0
subclass21 db 'token ring',0
subclass22 db 'fddi',0
subclass23 db 'atm',0
subclass24 db 'isdn',0
class3d:
dw offset subclass30
dw offset subclass31
dw offset subclass32
subclass30 db 'vga',0
subclass31 db 'xga',0
subclass32 db '3D',0
class4d:
dw offset subclass40
dw offset subclass41
dw offset subclass42
subclass40 db 'video',0
subclass41 db 'audio',0
subclass42 db 'telephonie',0
class5d:
dw offset subclass50
dw offset subclass51
subclass50 db 'ram',0
subclass51 db 'flash',0
class6d:
dw offset subclass60
dw offset subclass61
dw offset subclass62
dw offset subclass63
dw offset subclass64
dw offset subclass65
dw offset subclass66
dw offset subclass67
dw offset subclass68
subclass60 db 'hote',0
subclass61 db 'isa',0
subclass62 db 'eisa',0
subclass63 db 'mca',0
subclass64 db 'pci',0
subclass65 db 'pcmcia',0
subclass66 db 'nubus',0
subclass67 db 'cardbus',0
subclass68 db 'RACEway',0
class7d:
dw offset subclass70
dw offset subclass71
dw offset subclass72
dw offset subclass73
subclass70 db 'serie',0
subclass71 db 'parallele',0
subclass72 db 'serie multiport',0
subclass73 db 'modem',0
class8d:
dw offset subclass80
dw offset subclass81
dw offset subclass82
dw offset subclass83
dw offset subclass84
subclass80 db 'pic',0
subclass81 db 'dma',0
subclass82 db 'timer',0
subclass83 db 'rtc',0
subclass84 db 'hotplug',0
class9d:
dw offset subclass90
dw offset subclass91
dw offset subclass92
dw offset subclass93
dw offset subclass94
subclass90 db 'clavier',0
subclass91 db 'stylo',0
subclass92 db 'souris',0
subclass93 db 'scanner',0
subclass94 db 'joystick',0
class10d:
dw offset subclass100
subclass100 db 'station',0
class11d:
dw offset subclass110
dw offset subclass111
dw offset subclass112
dw offset subclass113
dw offset subclass114
subclass110 db '386',0
subclass111 db '486',0
subclass112 db 'pentium',0
subclass113 db 'alpha',0
subclass114 db 'coprocesseur',0
class12d:
dw offset subclass120
dw offset subclass121
dw offset subclass122
dw offset subclass123
dw offset subclass124
dw offset subclass125
subclass120 db 'firewire',0
subclass121 db 'access',0
subclass122 db 'ssa',0
subclass123 db 'usb',0
subclass124 db 'fibre',0
subclass125 db 'smbus',0
class13d:
dw offset subclass130
dw offset subclass131
dw offset subclass132
subclass130 db 'irda',0
subclass131 db 'ir',0
subclass132 db 'rf',0
class14d:
dw offset subclass140
subclass140 db 'IO arch',0
class15d:
dw offset subclass150
dw offset subclass151
dw offset subclass152
dw offset subclass153
subclass150 db 'tv',0
subclass151 db 'audio',0
subclass152 db 'voix',0
subclass153 db 'donnees',0
class16d:
dw offset subclass160
dw offset subclass161
subclass160 db 'reseau',0
subclass161 db 'jeux',0
class17d:
dw offset subclass170
subclass170 db 'dpio',0
;al=bus cl=deviceid ch=func es:di
PROC getcardinfo FAR
ARG @bus:word,@device:word,@function:word,@pointer:word
USES eax,bx,di
mov di,[@pointer]
cmp [@function],0
je @@amultiorfirst
call pcireadbyte,[@bus],[@device],0,offset (pcidata).typed
and al,multifunction
cmp al,0
jne @@amultiorfirst
mov [word ptr di],0000h
jmp @@notexist
@@amultiorfirst:
xor bx,bx
@@goinfos:
call pcireadword,[@bus],[@device],[@function],bx
inc bl
inc bl
cmp bl,2
ja @@notzarb
cmp ax,0FFFFh
je @@notexist
cmp ax,00000h
je @@notexist
@@notzarb:
mov [ds:di],ax
inc di
inc di
cmp bl,40h
jbe @@goinfos
clc
ret
@@notexist:
stc
ret
endp getcardinfo
;lit un octet du bus %0 device %1 function %2 nø %3 et le met en AL
PROC pcireadbyte FAR
ARG @bus:word,@device:word,@function:word,@pointer:word
USES bx,dx
mov al,[byte ptr @bus]
mov ah,80h
shl eax,16
mov ah,[byte ptr @device]
shl ah,3
or ah,[byte ptr @function]
mov bl,[byte ptr @pointer]
mov al,bl
and al,0fch
mov dx,config1addr
out dx,eax
mov dx,config1data
and bl,3
or dl,bl
in al,dx
ret
endp pcireadbyte
;lit 2 octet du bus %0 device %1 function %2 nø %3 et le met en AX
PROC pcireadword FAR
ARG @bus:word,@device:word,@function:word,@pointer:word
USES bx,dx
mov al,[byte ptr @bus]
mov ah,80h
shl eax,16
mov ah,[byte ptr @device]
shl ah,3
or ah,[byte ptr @function]
mov bl,[byte ptr @pointer]
mov al,bl
and al,0fch
mov dx,config1addr
out dx,eax
mov dx,config1data
and bl,3
or dl,bl
in ax,dx
ret
endp pcireadword
;lit 4 octet du bus %0 device %1 function %2 nø %3 et le met en EAX
PROC pcireaddword FAR
ARG @bus:word,@device:word,@function:word,@pointer:word
USES bx,dx
mov al,[byte ptr @bus]
mov ah,80h
shl eax,16
mov ah,[byte ptr @device]
shl ah,3
or ah,[byte ptr @function]
mov bl,[byte ptr @pointer]
mov al,bl
and al,0fch
mov dx,config1addr
out dx,eax
mov dx,config1data
and bl,3
or dl,bl
in eax,dx
ret
endp pcireaddword
;Prob avec str pci
;renvoie en %0 la structure pciinf carry if error
PROC pciinfo FAR
ARG @pointer:word
USES ax,bx,cx,edx,edi
mov ax,0B101h
xor edi,edi
mov edx," PCI"
int 1Ah
jc @@errorpci
cmp dx,04350h
jne @@errorpci
cmp ah,0
jne @@errorpci
mov di,[@pointer]
mov [(pciinf di).version_major],bh
mov [(pciinf di).version_minor],bl
mov [(pciinf di).types],al
mov [(pciinf di).maxbus],cl
clc
ret
@@errorpci:
stc
ret
endp pciinfo
;retourne en DS:%1 les set supporté du processeur par rapport a la struct %0
PROC setinfo FAR
ARG @pointer:word,@set:word
USES bx,si,di
mov di,[@set]
lea si,[ds:cpu.mmx]
add si,[@pointer]
mov bx,offset @@theset
@@set:
cmp [word ptr cs:bx],0FFFFh
je @@endofset
cmp [byte ptr si],1
jne @@nextset
push bx
mov bx,[cs:bx]
@@put:
mov al,[cs:bx]
cmp al,0
je @@enofput
mov [di],al
inc bx
inc di
jmp @@put
@@enofput:
pop bx
@@nextset:
inc bx
inc bx
inc si
jmp @@set
@@endofset:
mov [byte ptr di],0
ret
@@theset dw offset @@mmx
dw offset @@mmx2
dw offset @@sse
dw offset @@sse2
dw offset @@sse3
dw offset @@fpu
dw offset @@now3d
dw offset @@now3d2
dw offset @@htt
dw offset @@apic
dw 0FFFFh
@@mmx db "MMX ",0
@@mmx2 db "MMX2 ",0
@@now3d db "3dNow! ",0
@@now3d2 db "3dNow Extended! ",0
@@htt db "HyperThreading",0
@@sse db "SSE ",0
@@sse2 db "SSE2 ",0
@@sse3 db "SSE3 ",0
@@apic db "APIC ",0
@@fpu db "FPU ",0
endp setinfo
;retourne en DS:%0 les capacités du processeur
PROC cpuinfo FAR
ARG @pointer:word
USES eax,ebx,ecx,edx,si,di,ds,es
push ds
pop es
mov di,[@pointer]
mov al,0
mov cx,size cpu
cld
rep stosb
mov di,[@pointer]
call nocpuid ;Test si cpuid est dispo
je @@nocpuidatall
xor eax,eax
cpuid ;Fonction 0 de CPUID
mov [dword ptr (cpu di).vendor],ebx ;Vendeur sur 13 octets
mov [dword ptr (cpu di+4).vendor],edx
mov [dword ptr (cpu di+8).vendor],ecx
mov [byte ptr (cpu di+12).vendor],0
cmp eax,1
jb @@nofonc1
mov eax,1
cpuid ;Fonction 1 de CPUID
mov ebx,eax ;infos de model
and ebx,1111b
mov [(cpu di).stepping],bl
shr eax,4
mov ebx,eax
and ebx,1111b
mov [(cpu di).models],bl
shr eax,4
mov ebx,eax
and ebx,1111b
mov [(cpu di).family],bl
shr eax,4
mov ebx,eax
and ebx,11b
mov [(cpu di).types],bl
shr eax,2
mov ebx,eax
and ebx,1111b
mov [(cpu di).emodels],bl
shr eax,4
mov [(cpu di).efamily],al
mov ebx,edx
and ebx,1 ;infos de jeu d'instruction
setnz [(cpu di).fpu]
mov ebx,edx
and ebx,100000000000000000000000b
setnz [(cpu di).mmx]
mov ebx,edx
and ebx,10000000000000000000000000b
setnz [(cpu di).sse]
mov ebx,edx
and ebx,100000000000000000000000000b
setnz [(cpu di).sse2]
mov ebx,ecx
and ebx,1b
setnz [(cpu di).sse3]
mov ebx,edx
and ebx,10000000000000000000000000000b
setnz [(cpu di).htt]
@@nofonc1:
mov eax,80000000h ;Fonction 80000000 de CPUID
cpuid
cmp eax,80000001h
jb @@nofonc8
mov eax,80000001h ;Fonction 80000000 de CPUID
cpuid
mov ebx,edx
and ebx,10000000000000000000000b
setnz [(cpu di).mmx2]
mov ebx,edx
and ebx,1000000000000000000000000000000b
setnz [(cpu di).now3d]
mov ebx,edx
and ebx,10000000000000000000000000000000b
setnz [(cpu di).now3d2]
mov ebx,edx
and ebx,1000000000b
setnz [(cpu di).apic]
@@nofonc8:
mov si,offset @@marks
push cs
pop ds
@@search:
mov di,[@pointer]
mov cx,12
cld
rep cmpsb
jne @@notthegood
cmp cx,0
jne @@notthegood
mov cl,[si]
inc si
mov di,[@pointer]
cld
rep movsb
mov al,0
stosb
mov di,[@pointer]
cmp [es:(cpu di).family],15
jne @@notextended
mov al,[es:(cpu di).efamily]
mov ah,[es:(cpu di).emodels]
mov di,[si+2]
jmp @@searchmodel
@@notextended:
mov al,[es:(cpu di).family]
mov ah,[es:(cpu di).models]
mov di,[si]
@@searchmodel:
cmp [di],ax
jne @@notgoodfamily
mov si,di
inc si
inc si
lea di,[es:cpu.names]
add di,[@pointer]
@@copystr:
mov al,[si]
mov [es:di],al
inc si
inc di
cmp al,0
jne @@copystr
jmp @@endofsearch
@@notgoodfamily:
inc di
@@nextelement:
inc di
cmp [byte ptr di-1],0
jne @@nextelement
jmp @@searchmodel
@@notthegood:
inc si
cmp [word ptr si],0FFFFh
jne @@notthegood
inc si
inc si
cmp [word ptr si],0FFFFh
je @@endofsearch
jmp @@search
@@endofsearch:
ret
@@nocpuidatall:
ret
;tableau avec vendeur taille + chainereelle + pointeur famille + pointeur famille etendue
@@marks db "GenuineIntel",5,"Intel"
dw @@intelfamily,@@intelfamilye
dw 0FFFFh
db "AuthenticAMD",3,"Amd"
dw @@amdfamily,@@amdfamilye
dw 0FFFFh
db "CyrixInstead",5,"Cyrix"
dw @@cyrixfamily,@@cyrixfamilye
dw 0FFFFh
dw 0FFFFh
;tableau avec famille modele et chaine 0
@@intelfamily:
db 4,0,"486 DX-25/33",0
db 4,1,"486 DX-50",0
db 4,2,"486 SX",0
db 4,3,"486 DX/2",0
db 4,4,"486 SL",0
db 4,5,"486 SX/2",0
db 4,7,"486 DX/2-WB",0
db 4,8,"486 DX/4",0
db 4,9,"486 DX/4-WB",0
db 5,0,"Pentium 60/66 A-step",0
db 5,1,"Pentium 60/66",0
db 5,2,"Pentium 75 - 200",0
db 5,3,"OverDrive PODP5V83",0
db 5,4,"Pentium MMX",0
db 5,7,"Mobile Pentium 75-200",0
db 5,8,"Mobile Pentium MMX",0
db 6,0,"Pentium Pro A-step",0
db 6,1,"Pentium Pro",0
db 6,3,"Pentium II (Klamath)",0
db 6,5,"Pentium II (Deschutes)",0
db 6,6,"Mobile Pentium II",0
db 6,7,"Pentium III (Katmai)",0
db 6,8,"Pentium III (Coppermine)",0
db 6,9,"Mobile Pentium III",0
db 6,10,"Pentium III (0.18 µm)",0
db 6,11,"Pentium III (0.13 µm)",0
db 7,0,"Itanium (IA-64)",0
db 0FFh,0FFh,"Inconnu",0
@@intelfamilye:
db 0,0,"Pentium IV (0.18 µm)",0
db 0,1,"Pentium IV (0.18 µm)",0
db 0,2,"Pentium IV (0.13 µm)",0
db 0,3,"Pentium IV (0.09 µm)",0
db 1,0,"Itanium 2 (IA-64)",0
db 0FFh,0FFh,"Inconnu",0
@@amdfamily:
db 4,3,"486 DX/2",0
db 4,7,"486 DX/2-WB",0
db 4,8,"486 DX/4",0
db 4,9,"486 DX/4-WB",0
db 4,14,"Am5x86-WT",0
db 4,15,"Am5x86-WB",0
db 5,0,"K5/SSA5",0
db 5,1,"K5 (PR120/133)",0
db 5,2,"K5 (PR166)",0
db 5,3,"K5 (PR200)",0
db 5,6,"K6 (0.30 µm)",0
db 5,7,"K6 (0.25 µm)",0
db 5,8,"K6-2",0
db 5,9,"K6-3",0
db 5,13,"K6-2+/K6-III+ (0.18 µm)",0
db 6,0,"Athlon (25 µm)",0
db 6,1,"Athlon (25 µm)",0
db 6,2,"Athlon (18 µm)",0
db 6,3,"Duron",0
db 6,4,"Athlon (Thunderbird)",0
db 6,6,"Athlon (Palamino)",0
db 6,7,"Duron (Morgan)",0
db 6,8,"Athlon (Thoroughbred)",0
db 6,10,"Athlon (Barton)",0
db 0FFh,0FFh,"Inconnu",0
@@amdfamilye:
db 0,4,"Athlon 64",0
db 0,5,"Athlon 64 FX/Opteron",0
db 0FFh,0FFh,"Inconnu",0
@@cyrixfamily:
db 4,4,"MediaGX",0
db 5,2,"6x86/6x86L",0
db 5,4,"MediaGX MMX Enhanced",0
db 6,0,"MII (6x86MX)",0
db 6,5,"VIA Cyrix M2 core",0
db 6,6,"WinChip C5A",0
db 6,7,"WinChip C5B/WinChip C5C",0
db 6,8,"WinChip C5N",0
db 6,9,"WinChip C5XL/WinChip C5P",0
db 0FFh,0FFh,"Inconnu",0
@@cyrixfamilye:
db 0FFh,0FFh,"Inconnu",0
endp cpuinfo
;Test si CPUID est supporté oui=not Equal
nocpuid:
pushfd
pop eax
xor eax,00200000h
push eax
popfd
pushfd
pop eax
cmp eax,ebx
ret

View File

@ -1,993 +0,0 @@
model tiny,stdcall
p586N
locals
jumps
codeseg
option procalign:byte
include "..\include\mem.h"
include "..\include\divers.h"
org 0h
header exe <"CE",1,0,0,offset exports,,,>
exporting
declare checksyntax
declare cmpitems
declare gettypeditem
declare gettyped
declare whatisitem
declare whatis
declare strtoadress
declare strisadress
declare strisname
declare strisbase
declare strtoint
declare left
declare right
declare middle
declare fill
declare replaceallchar
declare searchchar
declare invert
declare cmpstr
declare evalue
declare insert
declare delete
declare copy
declare concat
declare compressdelimiter
declare setnbitems
declare getitemsize
declare getitem
declare getpointeritem
declare getnbitems
declare getlength
declare setlength
declare uppercase
declare onecase
declare lowercase
declare invertcase
ende
;Librairie qui prend en charge le format de STR ASCIIZ
;# nombre 8
;? str 7
;& nom 6
;High Low
;0 variable 4 hex
;1 byte 3 dec
;2 word 2 oct
;3 3 octets 1 bin
;4 dword 5 adresse
;5 5 octets 6 nom
;6 ... 7 str
; 8 nombre
;Renvoie carry si la syntaxe de ds:si n'est pas respect par rapport a es:di
PROC checksyntax FAR
ARG @src:word,@dest:word,@delim:word
USES ax,bx,cx,dx,si,di,ds,es
LOCAL @@temp:word:256
push ss
pop es
lea si,[@@temp]
mov di,[@dest]
call copy,[@src],si
call xch
call compressdelimiter,si,[@delim]
call getnbitems,si,[@delim]
mov bx,ax
call xch
call getnbitems,di,[@delim]
cmp bx,ax
jne @@notequalatall
xor cx,cx
@@itemer:
call xch
call whatisitem,si,cx,[@delim]
mov dx,ax
call xch
call whatisitem,di,cx,[@delim]
cmp ax,dx
jne @@prob
cmp al,6
jb @@equal
call cmpitems
je @@equal
@@prob:
cmp dl,4
ja @@nonumber
cmp dl,8
je @@equal
;cmp al,4
;jne @@notequalatall
cmp dh,ah
ja @@notequalatall
jmp @@equal
@@nonumber:
cmp al,7
jne @@nostr
cmp ah,0
jne @@notequalatall
jmp @@equal
@@nostr:
cmp al,6
jne @@noname
cmp dl,6
jne @@noname
cmp ah,0
jne @@notequalatall
jmp @@equal
@@noname:
cmp al,8
je @@equal
jmp @@notequalatall
@@equal:
inc cx
cmp cx,bx
jne @@itemer
cld
@@ackno:
ret
@@notequalatall:
stc
jmp @@ackno
endp checksyntax
xch:
push es
push ds
pop es
pop ds
ret
;Compare les lments cx de deux chaine ds:si et es:di
PROC cmpitems FAR
ARG @src:word,@dest:word,@item:word,@delim:word
USES ax,cx,si,di,es
push ds
pop es
call getpointeritem,[@src],[@item],[@delim]
mov si,ax
call getitemsize,[@src],[@item],[@delim]
mov di,[@dest]
mov cx,ax
cld
rep cmpsb
clc
ret
endp cmpitems
;Renvoie l'lment cx de ds:si dans edx si nb et dans es:di si str ou name
PROC gettypeditem FAR
ARG @src:word,@item:word,@delim:word
USES bx,cx,si,di
mov si,[@src]
mov cx,[@item]
call getpointeritem,si,cx,[@delim]
mov di,ax
inc cx
call getpointeritem,si,cx,[@delim]
mov si,ax
dec si
mov cl,0
xchg cl,[ds:si]
call gettyped,di
xchg cl,[ds:si]
clc
ret
endp gettypeditem
;Renvoie eax si nb et dans ds:eax si str ou name
PROC gettyped FAR
ARG @src:word
USES si
mov si,[@src]
xor eax,eax
call whatis,si
cmp al,1
je @@bin
cmp al,2
je @@oct
cmp al,3
je @@dec
cmp al,4
je @@hex
cmp al,5
je @@pointer
mov ax,si
jmp @@endofgettypeditem
@@bin:
call strtoint,si,2
jmp @@endofgettypeditem
@@oct:
call strtoint,si,8
jmp @@endofgettypeditem
@@dec:
call strtoint,si,10
jmp @@endofgettypeditem
@@hex:
call strtoint,si,16
jmp @@endofgettypeditem
@@pointer:
call strtoadress,si
@@endofgettypeditem:
clc
ret
endp gettyped
;Renvoie dans ax le type de la str0 pointe par ds:%0 lment %1 delim %3
PROC whatisitem FAR
ARG @src:word,@item:word,@delim:word
USES bx,cx,si,di
mov si,[@src]
mov cx,[@item]
call getpointeritem,si,cx,[@delim]
mov di,ax
inc cx
call getpointeritem,si,cx,[@delim]
mov si,ax
dec si
mov cl,0
xchg cl,[ds:si]
call whatis,di
xchg cl,[ds:si]
clc
ret
endp whatisitem
;Renvoie dans ax le type de la str0 pointe par ds:%0
;High Low
;0 variable 4 hex
;1 byte 3 dec
;2 word 2 oct
;3 3 octets 1 bin
;4 dword 5 adresse
;5 5 octets 6 name
;6 ... 7 str
PROC whatis FAR
ARG @src:word
USES bx,cx,edx,si
mov si,[@src]
xor cx,cx
mov cl,2
call strisbase,si,cx
jnc @@finbase
mov cl,8
call strisbase,si,cx
jnc @@finbase
mov cl,10
call strisbase,si,cx
jnc @@finbase
mov cl,16
call strisbase,si,cx
jc @@testadress
@@finbase:
mov bx,cx
xor ch,ch
mov al,[cs:bx+offset basenn-2]
push eax
call strtoint,si,cx
mov edx,eax
pop eax
cmp edx,0000FFFFh
ja @@bits32
cmp dx,00FFh
ja @@bits16
mov ah,1
jmp @@endofwhat
@@bits16:
mov ah,2
jmp @@endofwhat
@@bits32:
mov ah,4
jmp @@endofwhat
@@testadress:
call strisadress,si
jc @@testname
mov ax,0005h
jmp @@endofwhat
@@testname:
call strisname
jc @@testnumber
xor ah,ah
cmp [byte ptr si],'&'
je @@okname
call getlength,si
mov ah,al
@@okname:
mov al,06h
jmp @@endofwhat
@@testnumber:
cmp [byte ptr si],'#'
jne @@testvarstr
xor ah,ah
mov al,08h
jmp @@endofwhat
@@testvarstr:
xor ah,ah
cmp [byte ptr si],'?'
je @@okvarstr
call getlength,si
mov ah,al
@@okvarstr:
mov al,07h
@@endofwhat:
clc
ret
endp whatis
;Renvoie non carry si la str ds:si pointe peut ˆtre une adresse
PROC strtoadress FAR
;push
stc
;pop
ret
endp strtoadress
;Renvoie en es:di le pointeur str0 ds:si
PROC strisadress FAR
;push
stc
;pop
ret
endp strisadress
;Renvoie non carry si la str ds:%0 pointe peut ˆtre un nom de fichier
PROC strisname FAR
ARG @src:word
USES ax,si,di
mov si,[@src]
@@isname:
mov al,[si]
inc si
cmp al,0
je @@itsok
mov di,offset non
@@verify:
mov ah,[cs:di]
inc di
cmp ah,0FFh
je @@isname
cmp ah,al
jne @@verify
stc
jmp @@itsdead
@@itsok:
clc
@@itsdead:
ret
endp strisname
non db '/<>|"?*:\',01,0FFh
;Renvoie non carry si le texte point par %0 est de la base %1
PROC strisbase FAR
ARG @src:word,@base:word
USES ax,cx,si,di,es
push cs
pop es
mov si,[@src]
@@isstrbase:
mov al,[si]
cmp al,0
je @@okbase
mov cx,[@base]
xor ch,ch
mov di,cx
cmp al,[es:di-2+offset basen]
je @@verifbase
xor ch,ch
inc cl
mov di,offset base
cld
repne scasb
cmp cx,0
je @@nobase
inc si
jmp @@isstrbase
@@okbase:
clc
@@endbase:
ret
@@verifbase:
cmp [byte ptr si+1],0
je @@okbase
@@nobase:
stc
jmp @@endbase
endp strisbase
base db '0123456789ABCDEF'
basen db 'b o d h'
basenn db 1,0,0,0,0,0,2,0,3,0,0,0,0,0,4
;Converti un str %0 de base %1 en int dans eax
PROC strtoint FAR
ARG @src:word,@base:word
USES ebx,ecx,edx,si,edi,es
push cs
pop es
mov si,[@src]
@@gotos:
cmp [byte ptr si+1], 0
je @@oklo
inc si
jmp @@gotos
@@oklo:
mov edi,1
xor ebx,ebx
@@baseto:
cmp [@src],si
ja @@endbaseto
mov al,[si]
xor ecx,ecx
mov cl,[byte ptr @base]
inc cl
push di
mov di,offset base
cld
repne scasb
pop di
jne @@noop
sub cl,[byte ptr @base]
neg cl
mov eax,edi
mul ecx
add ebx,eax
mov eax,edi
mov cl,[byte ptr @base]
mul ecx
mov edi,eax
@@noop:
dec si
jmp @@baseto
@@endbaseto:
mov eax,ebx
clc
ret
endp strtoint
;Renvoie en ds:%1 la partie de %2 caractŠres a partir de la gauche de ds:%0
PROC left FAR
ARG @src:word,@dest:word,@nb:word
USES ax,cx,si,di,es
push ds
pop es
mov si,[@src]
mov di,[@dest]
mov cx,[@nb]
cld
rep movsb
mov al,0
stosb
clc
ret
endp left
;Renvoie en ds:%1 la partie de %2 caractŠres a partir de la droite de ds:%0
PROC right FAR
ARG @src:word,@dest:word,@nb:word
USES ax,cx,si,di,es
push ds
pop es
mov si,[@src]
mov di,[@dest]
call getlength,si
add si,ax
sub si,[@nb]
mov cx,[@nb]
cld
rep movsb
mov al,0
stosb
clc
ret
endp right
;Renvoie en ds:%1 la partie de %3 caractŠres a partir de la position %2 de ds:%0
PROC middle FAR
ARG @src:word,@dest:word,@item:word,@nb:word
USES ax,cx,si,di,es
push ds
pop es
mov si,[@src]
mov di,[@dest]
mov cx,[@nb]
add si,[@item]
cld
rep movsb
mov al,0
stosb
clc
ret
endp middle
;Rempli de %3 caractŠres %2 a partir de la position %1 de ds:%0
PROC fill FAR
ARG @src:word,@item:word,@char:word,@nb:word
USES ax,cx,si,di,es
push ds
pop es
mov di,[@src]
add di,[@item]
mov ax,[@char]
mov cx,[@nb]
cld
rep stosb
clc
ret
endp fill
;Remplace tout les caractŠres %1 de ds:%0 par des caractŠres %2
PROC replaceallchar FAR
ARG @src:word,@char1:word,@char2:word
USES ax,cx,dx,di,es
mov di,[@src]
call getlength,di
mov cx,ax
mov ax,[@char1]
mov dx,[@char2]
push ds
pop es
@@findandchange:
repne scasb
cmp cx,0
je @@endofchange
mov [es:di-1],dl
jmp @@findandchange
@@endofchange:
clc
ret
endp replaceallchar
;Recherche un caractŠre dl dans la chaŒne ds:%0
PROC searchchar FAR
ARG @src:word,@char:word
USES cx,di,es
mov di,[@src]
call getlength,di
mov cx,ax
push ds
pop es
mov ax,[@char]
repne scasb
mov ax,di
dec ax
clc
ret
endp searchchar
;Inverse la chaine pointe en ds:%0
PROC invert FAR
ARG @src:word
USES ax,cx,si,di
mov si,[@src]
call getlength,si
mov di,si
add di,ax
dec di
@@revert:
mov al,[si]
xchg al,[di]
mov [si],al
inc si
dec di
cmp si,di
ja @@finishinvert
dec di
cmp si,di
ja @@finishinvert
inc di
jmp @@revert
@@finishinvert:
clc
ret
endp invert
;Compares 2 chaines de caractŠres DS:%0 et DS:%1 zerof si non equal
PROC cmpstr FAR
ARG @src:word,@dest:word
USES cx,dx,si,di
push ds
pop es
mov si,[@src]
mov di,[@dest]
call getlength,di
mov cx,ax
call getlength,si
cmp cx,ax
jne @@notequal
repe cmpsb
@@notequal:
ret
endp cmpstr
;Compares 2 chaines de caractŠres DS:%0 et DS:%1 zerof si non equal et renvoie le nb de caractŠre egaux dans ax
PROC evalue FAR
ARG @src:word,@dest:word
USES cx,si,di,es
push ds
pop es
mov si,[@src]
mov di,[@dest]
call getlength ,di
mov cx,ax
repe cmpsb
pushf
jne @@noident
sub ax,cx
popf
clc
ret
@@noident:
sub ax,cx
dec ax
popf
clc
ret
endp evalue
;Insert une chaine ds:%0 en ds:%1 a partir du caractŠre %2
PROC insert FAR
ARG @src:word,@dest:word,@item:word
USES ax,cx,si,di,es
push es
pop ds
mov si,[@dest]
call getlength,si
mov cx,ax
add si,ax
mov di,si
call getlength,[@src]
add di,ax
sub cx,[@item]
inc cx
std
rep movsb
mov si,[@src]
mov di,[@dest]
add di,[@item]
mov cx,ax
cld
rep movsb
clc
ret
endp insert
;Detruit %2 caractŠres a partir du caractŠre %1 de DS:%0
PROC delete FAR
ARG @src:word,@item:word,@size:word
USES ax,cx,dx,si,di,es
push ds
pop es
mov si,[@src]
call getlength,si
mov cx,ax
sub cx,[@size]
sub cx,[@item]
inc cx
add si,[@item]
mov di,si
add si,[@size]
cld
rep movsb
clc
ret
endp delete
;Copie une chaine de ds:si en es:di
PROC copy FAR
ARG @src:word,@dest:word
USES ax,cx,si,di
mov si,[@src]
mov di,[@dest]
call getlength,si
mov cx,ax
cld
rep movsb
mov al,0
stosb
clc
ret
endp copy
;ConcatŠne le chaine ds:si avec ds:di
PROC concat FAR
ARG @src:word,@dest:word
USES ax,cx,si,di,es
push ds
pop es
mov si,[@src]
call getlength,si
mov cx,ax
mov di,[@dest]
call getlength,di
add di,ax
cld
rep movsb
mov al,0
stosb
clc
ret
endp concat
;Dtruit les dlimiteur qui sont conscutifs dans ds:%0 -> renvoie le nb d'item
PROC compressdelimiter FAR
ARG @src:word,@delim:word
USES cx,dx,si,di,es
mov di,[@src]
call getlength,di
mov cx,ax
push ds
pop es
mov ax,[@delim]
xor dx,dx
@@compressitems:
repne scasb
inc dx
@@againcomp:
cmp [di],al
jne @@nosup
call delete,di,0,1
jmp @@againcomp
@@nosup:
cmp cx,0
jne @@compressitems
mov ax,dx
clc
ret
endp compressdelimiter
;Met le nombre d'lments de ds:%0 à %1
PROC setnbitems FAR
ARG @src:word,@size:word,@delim:word
USES ax,cx,di,es
mov di,[@src]
cmp [@size],0
je @@onlyzero
call getnbitems,di,[@delim]
cmp [@size],ax
je @@noadjust
jb @@subsome
push ds
pop es
sub ax,[@size]
neg ax
mov cx,ax
call getlength,di
add di,ax
mov ax,[@delim]
mov ah,'a'
rep stosw
xor al,al
stosb
jmp @@noadjust
@@subsome:
call getpointeritem,[@src],[@size],[@delim]
dec ax
mov di,ax
@@onlyzero:
mov [byte ptr di],0
@@noadjust:
clc
ret
endp setnbitems
;Renvoie la taille ax de l'lment %0
PROC getitemsize FAR
ARG @src:word,@item:word,@delim:word
USES cx,dx
mov cx,[@item]
call getpointeritem,[@src],cx,[@delim]
mov dx,ax
inc cx
call getpointeritem,[@src],cx,[@delim]
sub ax,dx
dec ax
clc
ret
endp getitemsize
;Renvoie en ds:%1 l'lment %2 de ds:%0
PROC getitem FAR
ARG @src:word,@dest:word,@item:word,@delim:word
USES ax,cx,si,di,es
push ds
pop es
call getpointeritem,[@src],[@item],[@delim]
mov si,ax
call getitemsize,[@src],[@item],[@delim]
mov di,[@dest]
mov cx,ax
cld
rep movsb
mov al,0
stosb
clc
ret
endp getitem
;renvoi un pointeur ax sur l'lment %1 de ds:%0
PROC getpointeritem FAR
ARG @src:word,@item:word,@delim:word
USES cx,dx,di,es
mov di,[@src]
cmp [@item],0
je @@finishpointer
push ds
pop es
call getlength,di
mov cx,ax
push ds
pop es
mov ax,[@delim]
xor dx,dx
@@countnbitems:
cmp [@item],dx
je @@finishpointer
cld
repne scasb
inc dx
cmp cx,0
jne @@countnbitems
inc di
@@finishpointer:
mov ax,di
clc
ret
endp getpointeritem
;Renvoie le nombre d'lments ax de ds:%0
PROC getnbitems FAR
ARG @src:word,@delim:word
USES cx,dx,di,es
mov di,[@src]
call getlength,di
mov cx,ax
push ds
pop es
mov ax,[@delim]
xor dx,dx
cld
@@countitems:
repne scasb
inc dx
cmp cx,0
jne @@countitems
mov ax,dx
clc
ret
endp getnbitems
;renvoie la taille en octets AX de la chaine pointe en ds:%0
PROC getlength FAR
ARG @src:word
USES cx,di,es
push ds
pop es
mov di,[@src]
mov al,0
mov cx,0FFFFh
cld
repne scasb
neg cx
dec cx
dec cx
mov ax,cx
clc
ret
endp getlength
;Met la taille en octets de la chaine pointe ds:%0 a %1
PROC setlength FAR
ARG @src:word,@size:word
USES si
mov si,[@src]
add si,[@size]
mov [byte ptr si],0
clc
ret
endp setlength
;met en majuscule la chaine ds:%0
PROC uppercase FAR
ARG @src:word
USES si,ax
mov si,[@src]
@@uppercase:
mov al,[ds:si]
inc si
cmp al,0
je @@enduppercase
cmp al,'a'
jb @@uppercase
cmp al,'z'
ja @@uppercase
sub [byte ptr si-1],'a'-'A'
jmp @@uppercase
@@enduppercase:
clc
ret
endp uppercase
;met en majuscule la premiŠre lettre chaine ds:%0
PROC onecase FAR
ARG @src:word
USES ax
mov si,[@src]
mov al,[ds:si]
cmp al,'a'
jb @@oneenduppercase
cmp al,'z'
ja @@oneenduppercase
sub [byte ptr si],'a'-'A'
@@oneenduppercase:
clc
ret
endp onecase
;met en minuscule la chaine ds:%0
PROC lowercase FAR
ARG @src:word
USES si,ax
mov si,[@src]
@@lowercase:
mov al,[ds:si]
inc si
cmp al,0
je @@endlowercase
cmp al,'A'
jb @@lowercase
cmp al,'Z'
ja @@lowercase
add [byte ptr si-1],'a'-'A'
jmp @@lowercase
@@endlowercase:
clc
ret
endp lowercase
;Inverse la casse la chaine ds:%0
PROC invertcase FAR
ARG @src:word
USES si,ax
mov si,[@src]
@@invertcase:
mov al,[ds:si]
inc si
cmp al,0
je @@endinvertcase
cmp al,'A'
jb @@invertcase
cmp al,'Z'
jbe @@goinvertcase
cmp al,'a'
jb @@invertcase
cmp al,'z'
ja @@invertcase
sub [byte ptr si-1],'a'-'A'
jmp @@invertcase
@@goinvertcase:
add [byte ptr si-1],'a'-'A'
jmp @@invertcase
@@endinvertcase:
clc
ret
endp invertcase

View File

@ -1,891 +0,0 @@
model tiny,stdcall
p486
locals
jumps
codeseg
option procalign:byte
include "..\include\mem.h"
org 0h
header exe <"CE",1,0,0,offset exports,offset imports,,>
exporting
declare print
declare showdate
declare showtime
declare showname
declare showattr
declare showsize
declare showspace
declare showint
declare showsigned
declare showhex
declare showbin
declare showbcd
declare showstring
declare showstring0
declare showintr
declare showintl
declare showchar
ende
importing
use VIDEO,addline
use VIDEO,setcolor
use VIDEO,getxy
use VIDEO,setxy
use VIDEO,setvideomode
use VIDEO,setfont
use VIDEO,clearscreen
use VIDEO,enablescroll
use VIDEO,disablescroll
use VIDEO,showchars
use VIDEO,savestate
use VIDEO,restorestate
endi
;================PRINT==============
;Affiche la chaine %0 en utilisant les parametres de formatage %x....%x
;-> %0 %x
;<-
;===================================
PROC print FAR
ARG @@pointer:word
push ax bx cx si di
xor di,di
mov si,[@@pointer]
@@strinaize0:
mov cl,[si]
cmp cl,0
je @@no0
cmp cl,'%'
je @@special
cmp cl,'\'
je @@special2
@@showit:
xor ch,ch
call [cs:showchars],cx,0FFFFh
inc si
jmp @@strinaize0
@@special:
cmp [byte ptr si+1],'%'
jne @@notshowit
inc si
jmp @@showit
@@notshowit:
mov cl,[byte ptr si+1]
cmp cl,'c'
je @@showchars
cmp cl,'u'
je @@showint
cmp cl,'v'
je @@showfixint
cmp cl,'w'
je @@showintr
cmp cl,'i'
je @@showsigned
cmp cl,'h'
je @@showhex
cmp cl,'b'
je @@showbin
cmp cl,'s'
je @@showstring
cmp cl,'0'
je @@showstring0
cmp cl,'y'
je @@showbcd
cmp cl,'z'
je @@showsize
cmp cl,'a'
je @@showattr
cmp cl,'n'
je @@showname
cmp cl,'t'
je @@showtime
cmp cl,'d'
je @@showdate
clc
jmp @@no0
@@showchars:
cmp [byte ptr si+2],'M'
je @@showmultchar
call [cs:showchars],[word ptr @@pointer+di+2],0FFFFh
add si,2
add di,2
jmp @@strinaize0
@@showmultchar:
mov cx,[offset @@pointer+di+2+2]
cmp cx,0
je @@nextfunc
@@showcharsx:
call [cs:showchars],[word ptr @@pointer+di+2],0FFFFh
dec cx
jnz @@showcharsx
@@nextfunc:
add si,3
add di,4
jmp @@strinaize0
@@showint:
call showint,[dword ptr @@pointer+di+2]
add si,2
add di,4
jmp @@strinaize0
@@showfixint:
call showintl,[word ptr @@pointer+di+6],[dword ptr @@pointer+di+2]
add di,6
add si,2
jmp @@strinaize0
@@showintr:
call showintr,[word ptr @@pointer+di+6],[dword ptr @@pointer+di+2]
add di,6
add si,2
jmp @@strinaize0
@@showsigned:
call @@Chosesize
call showsigned
jmp @@strinaize0
@@showhex:
call @@Chosesize
call showhex
jmp @@strinaize0
@@showbin:
call @@Chosesize
call showbin
jmp @@strinaize0
@@showstring:
cmp [byte ptr si+2],'P'
je @@showstring@@pointer
call showstring,[word ptr @@pointer+di+2]
add si,2
add di,2
jmp @@strinaize0
@@showstring@@pointer:
push ds
mov ds,[offset @@pointer+di+2+2]
call showstring,[word ptr @@pointer+di+2]
add si,3
add di,4
pop ds
jmp @@strinaize0
@@showstring0:
cmp [byte ptr si+2],'P'
je @@showstring0@@pointer
call showstring0,[word ptr offset @@pointer+di+2]
add si,2
add di,2
jmp @@strinaize0
@@showstring0@@pointer:
push ds
mov ds,[offset @@pointer+di+2+2]
call showstring0,[word ptr offset @@pointer+di+2]
add si,3
add di,4
pop ds
jmp @@strinaize0
@@showbcd:
call @@Chosesize
call showbcd
jmp @@strinaize0
@@showsize:
call showsize,[dword ptr offset @@pointer+di+2]
add si,2
add di,4
jmp @@strinaize0
@@showattr:
call showattr,[word ptr offset @@pointer+di+2]
add si,2
add di,2
jmp @@strinaize0
@@showname:
call showname,[word ptr offset @@pointer+di+2]
add si,2
add di,2
jmp @@strinaize0
@@showtime:
call showtime,[word ptr offset @@pointer+di+2]
add si,2
add di,2
jmp @@strinaize0
@@showdate:
call showdate,[word ptr offset @@pointer+di+2]
add si,2
add di,2
jmp @@strinaize0
@@Chosesize:
pop cx
push [dword ptr offset @@pointer+di+2]
add di,4
cmp [byte ptr si+2],'B'
je @@byte
cmp [byte ptr si+2],'W'
je @@word
cmp [byte ptr si+2],'D'
je @@dword
dec si
@@word:
push 16
add si,3
push cx
retn
@@byte:
push 8
add si,3
push cx
retn
@@dword:
push 32
add si,3
push cx
retn
@@special2:
cmp [byte ptr si+1],'\'
jne @@notshowit2
inc si
jmp @@showit
@@notshowit2:
mov cl,[byte ptr si+1]
cmp cl,'l'
je @@showline
cmp cl,'g'
je @@goto
cmp cl,'h'
je @@gotox
cmp cl,'c'
je @@color
cmp cl,'m'
je @@setvideomode
cmp cl,'e'
je @@clearscreen
cmp cl,'s'
je @@savestate
cmp cl,'r'
je @@restorestate
cmp cl,'i'
je @@enablescroll
cmp cl,'j'
je @@disablescroll
cmp cl,'f'
je @@setfont
clc
jmp @@no0
@@color:
mov al,[si+2]
sub al,'0'
shl al,4
add al,[si+3]
sub al,'0'
xor ah,ah
call [cs:setcolor],ax
add si,4
jmp @@strinaize0
@@gotox:
mov bh,[si+2]
sub bh,'0'
mov bl,bh
shl bl,3
add bl,bh
add bl,bh
add bl,[si+3]
sub bl,'0'
xor bh,bh
call [cs:getxy]
xor ah,ah
call [cs:setxy],bx,ax
add si,4
jmp @@strinaize0
@@setvideomode:
mov ah,[si+2]
sub ah,'0'
mov al,ah
shl al,3
add al,ah
add al,ah
add al,[si+3]
sub al,'0'
xor ah,ah
call [cs:setvideomode],ax
add si,4
jmp @@strinaize0
@@setfont:
mov ah,[si+2]
sub ah,'0'
mov al,ah
shl al,3
add al,ah
add al,ah
add al,[si+3]
sub al,'0'
xor ah,ah
call [cs:setfont],ax
add si,4
jmp @@strinaize0
@@showline:
call [cs:addline]
add si,2
jmp @@strinaize0
@@clearscreen:
call [cs:clearscreen]
add si,2
jmp @@strinaize0
@@savestate:
call [cs:savestate]
add si,2
jmp @@strinaize0
@@restorestate:
call [cs:restorestate]
add si,2
jmp @@strinaize0
@@enablescroll:
call [cs:enablescroll]
add si,2
jmp @@strinaize0
@@disablescroll:
call [cs:disablescroll]
add si,2
jmp @@strinaize0
@@goto:
mov ah,[si+2]
sub ah,'0'
mov al,ah
shl al,3
add al,ah
add al,ah
add al,[si+3]
sub al,'0'
xor ah,ah
;
mov bh,[si+5]
sub bh,'0'
mov bl,bh
shl bl,3
add bl,bh
add bl,bh
add bl,[si+6]
sub bl,'0'
xor bh,bh
call [cs:setxy],ax,bx
add si,7
jmp @@strinaize0
@@no0:
add di,bp
mov ax,[ss:bp] ;BP
mov bx,[ss:bp+2] ;IP
mov cx,[ss:bp+4] ;CS
mov [ss:di],ax
mov [ss:di+2],bx
mov [ss:di+4],cx
mov bp,di
pop di si cx bx ax
mov sp,bp
ret
ENDP print
;================SHOWDATE==============
;Affiche la date contenu en %0
;-> %0
;<-
;======================================
PROC showdate FAR
ARG @dates:word
USES edx
xor edx,edx
mov dx,[@dates]
and dx,11111b
call showintl,2,edx
call [cs:showchars],'/',0FFFFh
mov dx,[@dates]
shr dx,5
and dx,111b
call showintl,2,edx
call [cs:showchars],'/',0FFFFh
mov dx,[@dates]
shr dx,8
and dx,11111111b
add dx,1956
call showintl,2,edx
ret
ENDP showdate
;================SHOWTIME==============
;Affiche l'heure contenu en %0
;-> %0
;<-
;======================================
PROC showtime FAR
ARG @times:word
USES edx
xor edx,edx
mov dx,[@times]
shr dx,11
and dx,11111b
call showintl,2,edx
call [cs:showchars],':',0FFFFh
mov dx,[@times]
shr dx,5
and dx,111111b
call showintl,2,edx
call [cs:showchars],':',0FFFFh
mov dx,[@times]
and dx,11111b
shl dx,1
call showintl,2,edx
ret
ENDP showtime
;================SHOWNAME==============
;Affiche le nom pointé par ds:%0
;-> ds:%0
;<-
;======================================
PROC showname FAR
ARG @thename:word
USES cx,si
mov si,[@thename]
xor cx,cx
@@showthename:
call [cs:showchars],[word ptr ds:si],0FFFFh
inc si
inc cx
cmp cx,8
jne @@suiteaname
call [cs:showchars],' ',0FFFFh
@@suiteaname:
cmp cx,8+3
jb @@showthename
ret
ENDP showname
;================SHOWATTR==============
;Affiche les attributs spécifié par %0
;-> %0
;<-
;======================================
PROC showattr FAR
ARG @attr:word
push 0FFFFh
test [@attr],00000001b
je @@noreadonly
push 'L'
jmp @@readonly
@@noreadonly:
push '-'
@@readonly:
call [cs:showchars]
push 0FFFFh
test [@attr],00000010b
je @@nohidden
push 'C'
jmp @@hidden
@@nohidden:
push '-'
@@hidden:
call [cs:showchars]
push 0FFFFh
test [@attr],00000100b
je @@nosystem
push 'S'
jmp @@system
@@nosystem:
push '-'
@@system:
call [cs:showchars]
push 0FFFFh
test [@attr],00100000b
je @@noarchive
push 'A'
jmp @@archive
@@noarchive:
push '-'
@@archive:
call [cs:showchars]
push 0FFFFh
test [@attr],00010000b
je @@nodirectory
push 'R'
jmp @@directory
@@nodirectory:
push '-'
@@directory:
call [cs:showchars]
ret
ENDP showattr
;================SHOWSIZE==============
;Affiche le nom pointé par %0
;-> %0
;<-
;======================================
PROC showsize FAR
ARG @thesize:dword
USES edx,ds
push cs
pop ds
mov edx,[@thesize]
cmp edx,1073741824
ja @@giga
cmp edx,1048576*9
ja @@mega
cmp edx,1024*9
ja @@kilo
call showintr,4,edx
call showstring0,offset unit
jmp @@finsize
@@kilo:
shr edx,10
call showintr,4,edx
call showstring0,offset unitkilo
jmp @@finsize
@@mega:
shr edx,20
call showintr,4,edx
call showstring0,offset unitmega
jmp @@finsize
@@giga:
shr edx,30
call showintr,4,edx
call showstring0,offset unitgiga
@@finsize:
ret
unit db ' o ',0
unitkilo db ' ko',0
unitmega db ' mo',0
unitgiga db ' go',0
ENDP showsize
;==========SHOWSPACE===========
;met un espace aprés le curseur
;->
;<-
;==============================
PROC showspace FAR
call [cs:showchars],' ',0FFFFh
clc
ret
ENDP showspace
;==========SHOWINT===========
;Affiche un entier %0 aprés le curseur
;-> %0
;<-
;============================
PROC showint FAR
ARG @integer:dword
USES eax,bx,cx,edx,esi
xor cx,cx
mov eax,[@integer]
mov esi,10
mov bx,offset showbuffer+27
@@decint:
xor edx,edx
div esi
add dl,'0'
inc cx
mov [cs:bx],dl
dec bx
cmp ax,0
jne @@decint
mov ax,cx
@@showinteger:
inc bx
mov cl,[cs:bx]
call [cs:showchars],cx,0FFFFh
dec ax
jnz @@showinteger
ret
showbuffer db 50 dup (0FFh)
ENDP showint
;==========SHOWINTL===========
;Affiche un entier %0 aprés le curseur de taille %1 caractère centré a gauche
;-> %0 un entier % taille en caractères
;<-
;===============================
PROC showintl FAR
ARG @sizeofint:word,@integer:dword
USES eax,bx,cx,edx,esi,di
mov di,[@sizeofint]
xor cx,cx
mov eax,[@integer]
mov esi,10
mov bx,offset showbuffer+27
@@decint:
xor edx,edx
div esi
add dl,'0'
inc cx
mov [cs:bx],dl
dec bx
cmp cx,di
jae @@nomuch
cmp ax,0
jne @@decint
mov ax,di
xchg cx,di
sub cx,di
@@rego:
mov [byte ptr cs:bx],'0'
dec bx
dec cx
jnz @@rego
jmp @@finishim
@@nomuch:
mov ax,di
@@finishim:
@@showinteger:
inc bx
mov cl,[cs:bx]
call [cs:showchars],cx,0FFFFh
dec ax
jnz @@showinteger
ret
ENDP showintl
;==========SHOWINTR===========
;Affiche un entier %0 aprés le curseur de taille %1 caractère centré a droite
;-> %0 un entier % taille en caractères
;<-
;===============================
PROC showintr FAR
ARG @sizeofint:word,@integer:dword
USES eax,bx,cx,edx,esi,di
mov di,[@sizeofint]
xor cx,cx
mov eax,[@integer]
mov esi,10
mov bx,offset showbuffer+27
@@decint:
xor edx,edx
div esi
add dl,'0'
inc cx
mov [cs:bx],dl
dec bx
cmp cx,di
jae @@nomuch
cmp ax,0
jne @@decint
mov ax,di
xchg cx,di
sub cx,di
@@rego:
mov [byte ptr cs:bx],' '
dec bx
dec cx
jnz @@rego
jmp @@finishim
@@nomuch:
mov ax,di
@@finishim:
@@showinteger:
inc bx
mov cl,[cs:bx]
call [cs:showchars],cx,0FFFFh
dec ax
jnz @@showinteger
ret
ENDP showintr
;==========SHOWSIGNED===========
;Affiche un entier %0 de taille %1 aprés le curseur
;-> %0 un entier, %1 la taille
;<-
;===============================
PROC showsigned FAR
ARG @sizeofint:word,@integer:dword=taille
USES ebx,cx,edx
mov ebx,[@integer]
mov cx,[@sizeofint]
xor edx,edx
cmp cx,1
ja @@signed16
mov dl,bl
cmp dl,7Fh
jbe @@notsigned
neg dl
jmp @@showminus
@@signed16:
cmp cx,2
ja @@signed32
mov dx,bx
cmp dx,7FFFh
jbe @@notsigned
neg dx
jmp @@showminus
@@signed32:
mov edx,ebx
cmp edx,7FFFFFFFh
jbe @@notsigned
neg edx
@@showminus:
call [cs:showchars],'-',0FFFFh
@@notsigned:
call showint,edx
ret
ENDP showsigned
;==========SHOWHEX===========
;Affiche un nombre hexadécimal %0 de taille %1 aprés le curseur
;-> %0 un entier, %1 la taille
;<-
;============================
PROC showhex FAR
ARG @sizeofint:word,@integer:dword=taille
USES ax,bx,cx,edx
mov edx,[@integer]
mov cx,[@sizeofint]
mov ax,cx
shr ax,2
sub cx,32
neg cx
shl edx,cl
@@Hexaize:
rol edx,4
mov bx,dx
and bx,0fh
mov cl,[cs:bx+offset Tab]
call [cs:showchars],cx,0FFFFh
dec al
jnz @@Hexaize
ret
Tab db '0123456789ABCDEF'
ENDP showhex
;==========SHOWBIN===========
;Affiche un nombre binaire %0 de taille %1 aprés le curseur
;-> %0 un entier, %1 la taille
;<-
;============================
PROC showbin FAR
ARG @sizeofint:word,@integer:dword=taille
USES ax,cx,edx
mov edx,[@integer]
mov cx,[@sizeofint]
sub cx,32
neg cx
shl edx,cl
mov ax,[@sizeofint]
@@binaize:
rol edx,1
mov cl,'0'
adc cl,0
call [cs:showchars],cx,0FFFFh
dec al
jnz @@binaize
ret
ENDP showbin
;==========SHOWBCD===========
;Affiche un nombre en BCD %0 de taille %1 aprés le curseur
;-> %0 un entier, %1 la taille
;<-
;============================
PROC showbcd FAR
ARG @sizeofint:word,@integer:dword
USES ax,cx,edx
mov edx,[@integer]
mov ax,[@sizeofint]
mov cx,ax
shr ax,2
sub cx,32
neg cx
shl edx,cl
@@BCDaize:
rol edx,4
mov cl,dl
and cl,0fh
add cl,'0'
call [cs:showchars],cx,0FFFFh
dec al
jnz @@BCDaize
ret
ENDP showbcd
;==========SHOWSTRING===========
;Affiche une chaine de caractère pointée par ds:%1 aprés le curseur
;-> ds:%1 pointeur chaine type pascal
;<-
;===============================
PROC showstring FAR
ARG @pointer:word
USES bx,si
mov si,[@pointer]
mov bl,[si]
@@strinaize:
inc si
call [cs:showchars],[word ptr si],0FFFFh
dec bl
jnz @@strinaize
ret
ENDP showstring
;==========showchars===========
;Affiche un caractère %0 aprés le curseur
;-> %0 caractère
;<-
;===============================
PROC showchar FAR
ARG @pointer:word
call [cs:showchars],[@pointer],0FFFFh
ret
ENDP showchar
;==========SHOWSTRING0===========
;Affiche une chaine de caractère pointée par ds:%1 aprés le curseur
;-> ds:%1 pointeur chaine type zéro terminal
;<-
;================================
PROC showstring0 FAR
ARG @pointer:word
USES cx,si
mov si,[@pointer]
@@strinaize0:
mov cl,[si]
cmp cl,0
je @@no0
call [cs:showchars],cx,0FFFFh
inc si
jmp @@strinaize0
@@no0:
ret
ENDP showstring0

View File

@ -1,266 +0,0 @@
;****************************************************************
; *
; Periphrique : DMA *
; Plages Entres-Sorties : 0000-000F *
; 00C0-00DF *
; 0080-0090 *
; (0094-009F) *
; Plages Mmoires : AUCUNES *
; *
DmaRead equ 044h ;I/O to memory, no autoinit, increment, single mode
DmaWrite equ 048h ;Memory to I/O, no autoinit, increment, single mode
;Lecture des bits du registre d'tat (08, D0 )
STATUS_REQ3 = 80h ;Bit actif: le canal DMA concern
STATUS_REQ2 = 40h ;re‡oit une requˆte DMA
STATUS_REQ1 = 20h ;Request
STATUS_REQ0 = 10h
STATUS_TC3 = 08h ;Bit actif: Un transfert DMA a t
STATUS_TC2 = 04h ;excut depuis la derniŠre lecture
STATUS_TC1 = 02h ;du registre d'tat.
STATUS_TC0 = 01h ;Terminal Count
;Ecriture des bits du registre de commande (08, D0)
COMMAND_DACKLEVEL = 80h ;Bit 7 actif: ligne DMA Acknowledge HIGH active
COMMAND_DREQLEVEL = 40h ;Bit 6 actif: ligne REQ Acknowledge LOW active
COMMAND_EXTWRITE = 20h ;Bit 5 actif: EXTENDED Write,sinon LATE Write
COMMAND_FIXEDPRI = 10h ;Bit 4 actif: priorit constante
COMMAND_COMPRESS = 08h ;Bit 3 actif: compression
COMMAND_INACTIVE = 04h ;Bit 2 actif: contr“leur dsactiv
COMMAND_ADH0 = 02h ;Bit 1 actif: Adress Hold pour canal 0/4 dsactiv
COMMAND_MEM2MEM = 01h ;Bit 0 actif: mmoire/mmoire, sinon mmoire/priphrie
;Ecriture des bits du registre de requˆte ( 09, D2 )
REQUEST_RESERVED = 0F8h ;Rglage des bits rservs =0
REQUEST_SET = 04h ;Dfinir requˆte DMA
REQUEST_CLR = 00h ;Supprimer requˆte DMA
REQUEST_MSK = 03h ;Indiquer le canal dans les deux bits du bas
;Ecriture des bits du registre de masquage de canal ( 0A, D4 )
CHANNEL_RESERVED = 0F8h ;Rglage des bits rservs =0
CHANNEL_SET = 04h ;Masquer/verrouiller canal DMA
CHANNEL_CLR = 00h ;Librer canal DMA
CHANNEL_MSK = 03h ;Indiquer le canal dans les deux bits du bas
;Ecriture des bits du registre de mode (0B,D6)
MODE_DEMAND = 00h ;Transfrer … la demande
MODE_SINGLE = 40h ;Transfrer valeurs uniques
MODE_BLOCK = 80h ;Transfrer en bloc
MODE_CASCADE = 0C0h ;Transfrer en cascade
MODE_DECREMENT = 20h ;Dcrmenter
MODE_AUTOINIT = 10h ;Autoinitialisation vers la fin
MODE_VERIFY = 00h ;Vrifier
MODE_WRITE = 04h ;Ecrire dans la mmoire
MODE_READ = 08h ;Lire depuis la mmoire
MODE_INVALID = 0Ch ;Incorrect
MODE_CHANNELMSK = 03h ;Indiquer le canal dans les deux bits du bas
;Ports du DMA esclave
DmaStatusS dw 08h ;R SLAVE Registre d'tat
DmaCommandS dw 08h ;W SLAVE Registre de commande
DmaRequestS dw 09h ;W SLAVE Excuter requˆte DMA
DmachMaskS dw 0ah ;W SLAVE Masquer canaux
DmaModeS dw 0bh ;W SLAVE Mode de transfert
DmaFlipFlopS dw 0ch ;W SLAVE Flipflop adr/compteur
DmaTempS dw 0dh ;R SLAVE Reset du contr“leur
DmaClearS dw 0dh ;R SLAVE Registre temporaire
DmaMaskClrS dw 0eh ;R SLAVE Librer canaux
DmaMaskS dw 0fh ;R SLAVE Masquer canaux
;Ports du DMA esclave
DmaStatusM dw 0D0h ;R MASTER Registre d'tat
DmaCommandM dw 0D0h ;W MASTER Registre de commande
DmaRequestM dw 0D2h ;W MASTER Excuter requˆte DMA
DmaMaskM dw 0D4h ;W MASTER Masquer canaux
DmaModeM dw 0D6h ;W MASTER Mode de transfert
DmaFlipFlopM dw 0D8h ;W MASTER Flipflop adr/compteur
DmaTempM dw 0DAh ;R MASTER Reset du contr“leur
DmaClearM dw 0DAh ;R MASTER Registre temporaire
DmaMaskClrM dw 0DCh ;R MASTER Librer canaux
DmaMaskM2 dw 0DEh ;R MASTER Masquer canaux
DmaAdress db 00h ;DMA address register 0
db 002h ;DMA address register 1
db 004h ;DMA address register 2
db 006h ;DMA address register 3
db 0c0h ;DMA address register 4
db 0c4h ;DMA address register 5
db 0c8h ;DMA address register 6
db 0cch ;DMA address register 7
DmaCount db 001h ;DMA count registers 0
db 003h ;DMA count registers 1
db 005h ;DMA count registers 2
db 007h ;DMA count registers 3
db 0c2h ;DMA count registers 4
db 0c6h ;DMA count registers 5
db 0cah ;DMA count registers 6
db 0ceh ;DMA count registers 7
DmaPage db 087h ;DMA page registers 0
db 083h ;DMA page registers 1
db 081h ;DMA page registers 2
db 082h ;DMA page registers 3
db 08fh ;DMA page registers 4
db 08bh ;DMA page registers 5
db 089h ;DMA page registers 6
db 08ah ;DMA page registers 7
;verouille le canal AL
DisableDma:
push ax dx
cmp al, 4
jae MasterDisableDma
mov dx, DmaMaskS
or al, 00000100b
out dx, al
jmp EndDisableDma
MasterDisableDma:
mov dx, DmaMaskS
and al, 00000011b
or al, 00000100b
out dx, al
EndDisableDma:
pop dx ax
ret
;déverouille le canal AL
EnableDma:
push ax dx
cmp al, 4
jae MasterDisableDma
mov dx, DmaMaskS
out dx, al
jmp EndEnableDma
MasterEnableDma:
mov dx, DmaMaskS
and al, 00000011b
out dx, al
EndEnableDma:
pop dx ax
ret
;Efface le FlipFlop canal AL
ClrDmaFlipFlop:
push ax dx
cmp al, 4
jae MasterClrFlipFlopDma
mov dx,DmaFlipFlopS
xor ax, ax
out dx, al
jmp EndClrFlipFlopDma
MasterClrFlipFlopDma:
mov dx,DmaFlipFlopM
xor ax, ax
out dx, al
EndClrFlipFlopDma:
pop dx ax
ret
;Met le mode du canal al à ah
SetDmaMode:
push ax dx
cmp al, 4
jae MasterSetDmaMode
mov dx,DmaModeS
or al, ah
out dx, al
jmp EndSetDmaMode
MasterSetDmaMode:
mov dx,DmaModeM
and al, 00000011b
or al, ah
out dx, al
EndSetDmaMode:
pop dx ax
ret
;Met le page du canal al a ah
SetDmaPage:
push ax bx dx si
cmp al, 4
jae MasterSetDmaPage
mov si, offset DmaPage
xor dh, dh
xor bh, bh
mov bl, al
mov dl, cs:[si+bx]
xchg al, ah
out dx, al
jmp EndSetDmaPage
MasterSetDmaPage:
EndSetDmaPage:
pop si dx bx ax
ret
;Met l'adresse du canal al a DS:BX
SetDmaAdress:
push ax bx cx dx si
push ax
mov ax, ds
and ax, 0000111111111111b
shl ax,4
add bx, ax
mov ax, ds
and ax, 1111000000000000b
shr ax, 4
mov cx,ax
pop ax
push ax
add ax,cx
call SetDmaPage
pop ax
call ClrDmaFlipFlop
mov si, offset DmaAdress
xor dh, dh
push bx
xor bh, bh
mov bl, al
mov dl, byte ptr cs:[si+bx]
pop bx
cmp al, 4
jae MasterSetDmaAddress
mov al, bh
out dx, al
mov al, bl
out dx, al
jmp EndSetDmaAddress
MasterSetDmaAddress:
mov al, bh
out dx, al
call ClrDmaFlipFlop
mov al, bl
out dx, al
EndSetDmaAddress:
pop si dx cx bx ax
ret
;Spécifie au controleur DMA le nombre d'octets à transférer dans CX
SetDmaCount:
push ax bx dx si
call ClrDmaFlipFlop
mov si, offset DmaCount
xor dh, dh
xor bh, bh
mov bl, al
mov dl, byte ptr cs:[si+bx]
cmp al, 4
jae MasterSetDmaCount
mov al, ch
out dx, al
mov al, cl
out dx, al
jmp EndSetDmaCount
MasterSetDmaCount:
mov al, ch
out dx, al
call ClrDmaFlipFlop
mov al, cl
out dx, al
EndSetDmaCount:
pop si dx bx ax
ret

View File

@ -1,415 +0,0 @@
;Adresses de port du contr“leur IRQ
MASTERPIC = 020h ;Adresse de base du PIC maŒtre
SLAVEPIC = 0A0h ;Adresse de base du PIC esclave
IRQMASK = 001h ;Offset sur port de masquage
;Commandes IRQ OCW2
DISABLEROTATION = 000h ;Desactiver la rotation de priorités en mode EOI automatique
EOI = 020h ;End of Interrupt non spcifi
COMMANDEOI = 060h ;Commande EOI particulière
ENABLEROTATION = 080h ;Activer la rotation de priorités en mode EOI automatique
ROTATIONNOSPEC = 0A0h ;Rotation des priorités en mode EOI automatique
SETPRIORITY = 0C0h ;Definir la priorité
ROTATIONSPEC = 0E0h ;Rotation des priorités en mode EOI spécifié
;Position des vecteurs d'interruptions
MASTERFIRSTVECTOR = 008h ;Vecteurs logiciels des interruptions
SLAVEFIRSTVECTOR = 070h ;lectroniques
;OCW3 codes registres
IRR = 002h ;Interrupt Request Register
ISR = 003h ;In Service Register
;OCW3 et modes
OCW3 = 008h ;OCW3
POLLING = 004h ;Polling bit
ISR = 0Bh ; Pas d'opration, pas de Poll, lire ISR OCW3
IRR = 0Ah ; Pas d'opration, pas de Poll, lire IRR
;Autorise une interruption lectronique
;Entre : %1 - Numro de l'interruption (0-15) … autoriser 0-7 = MASTERPIC , 8-15 = SLAVEPIC
PROC enableirq FAR
ARG @irq:word
USES ax,cx,dx
mov ax,[@irq]
mov dx,MASTERPIC+IRQMASK
cmp al,7
jbe @@master
mov dx,SLAVEPIC+IRQMASK
@@master:
mov cl,al
and cl,7
mov al,1
shl al,cl
not al
mov ah,al
in al,dx
and al,ah
out dx,al
ret
endp enableirq
;Desactive une interruption lectronique
;Entre : %0 - Numro de l'interruption (0-15) … desactiver 0-7 = MASTERPIC , 8-15 = SLAVEPIC
PROC disableirq FAR
ARG @irq:word
USES ax,cx,dx
mov ax,[@irq]
mov dx,MASTERPIC+IRQMASK
cmp al,7
jbe @@master
mov dx,SLAVEPIC+IRQMASK
@@master:
mov cl,al
and cl,7
mov al,1
shl al,cl
not al
mov ah,al
in al,dx
or al,ah
out dx,al
ret
endp disableirq
;Signale "End Of Interrupt" de l'interruption %0
PROC seteoi FAR
ARG @irq:word
USES ax,dx
mov ax,[@irq]
cmp al,7
jbe @@master
mov al,EOI
out SLAVEPIC,al
@@master:
mov al,EOI
out MASTERPIC,al
ret
endp seteoi
;Lit les masques d'un contr“leur IRQ dans ax, 0 master ou slave 1 ds %1
PROC readimr FAR
ARG @controleur:word
USES bx,dx
mov bx,[@controleur]
mov dx,MASTERPIC+ IRQMASK
cmp bl,0
jne @@master
mov dx,SLAVEPIC+ IRQMASK
@@master:
xor ah,ah
in al,dx
pop dx
ret
endp readimr
;Lit le registre d'tat d'un contr“leur IRQ dans ax, 0 master ou slave 1 ds %1
PROC readisr FAR
ARG @controleur:word
USES bx,dx
mov bx,[@controleur]
mov dx,MASTERPIC
cmp bh,0
jne @@master
mov dx,SLAVEPIC
@@master:
mov al,ISR
out dx,al
xor ah,ah
in al,dx
ret
endp readisr
;Lit le registre d'tat d'un contr“leur IRQ dans al, 0 master ou slave 1 ds bh
PROC readirr FAR
ARG @controleur:word
USES bx,dx
mov bx,[@controleur]
mov dx,MASTERPIC
cmp bh,0
jne @@master
mov dx,SLAVEPIC
@@master:
mov al,IRR
out dx,al
xor ah,ah
in al,dx
ret
endp readirr
;carry si enable et pas carry si pas enable
PROC isenableirq FAR
ARG @irq:word
USES ax,cx,dx
mov ax,[@irq]
mov dx,MASTERPIC+IRQMASK
cmp al,7
jbe @@master
mov dx,SLAVEPIC+IRQMASK
@@master:
mov cl,al
and cx,7
in al,dx
neg al
bt ax,cx
ret
endp isenableirq
;carry si enable et pas carry si pas enable
PROC isinserviceirq FAR
ARG @irq:word
USES ax,cx,dx
mov ax,[@irq]
mov dx,MASTERPIC
cmp al,7
jbe @@master
mov dx,SLAVEPIC
@@master:
mov cl,al
mov al,ISR
out dx,al
and cx,7
in al,dx
neg al
bt ax,cx
ret
endp isinserviceirq
;carry si enable et pas carry si pas enable
PROC isrequestirq FAR
ARG @irq:word
USES ax,cx,dx
mov ax,[@irq]
mov dx,MASTERPIC
cmp al,7
jbe @@master
mov dx,SLAVEPIC
@@master:
mov cl,al
mov al,IRR
out dx,al
and cx,7
in al,dx
neg al
bt ax,cx
ret
endp isrequestirq
PROC installirqhandler FAR
USES eax,bx,cx,edx,si,di,ds,es
push fs
call mbcreate,offset interruptionbloc,256*size ints
mov es,ax
mov ax,0x0000
mov ds,ax
xor si,si
@@searchdummypointer:
mov fs,[(vector si).data.seg]
mov bx,[(vector si).data.off]
cmp [byte ptr fs:bx],0xCF ;iret
je @@founded
add si,size vector
cmp si,256*4
jb @@searchdummypointer
xor edx,edx
jmp @@suite
@@founded:
mov edx,[(vector si).content]
@@suite:
xor cx,cx
xor si,si
xor di,di
cli
@@copy:
mov [es:(ints di).number],cl
mov [es:(ints di).locked],0
mov [es:(ints di).vector1.content],0
mov [es:(ints di).vector3.content],0
mov [es:(ints di).vector4.content],0
mov [es:(ints di).vector5.content],0
mov [es:(ints di).vector6.content],0
mov [es:(ints di).vector7.content],0
mov [es:(ints di).vector8.content],0
mov [es:(ints di).launchedlow],0
mov [es:(ints di).launchedhigh],0
mov [es:(ints di).calledlow],0
mov [es:(ints di).calledhigh],0
mov eax,[(vector si).content]
cmp eax,edx
je @@notarealvector
mov [es:(ints di).vector1.content],eax
mov [es:(ints di).activated],1
jmp @@copynext
@@notarealvector:
mov [es:(ints di).vector1.content],0
mov [es:(ints di).activated],0
@@copynext:
mov bx,cx
shl bx,3
sub bx,cx
add bx,offset coupling
mov [(vector si).data.seg],cs
mov [(vector si).data.off],bx
add si,size vector
add di,size ints
inc cl
cmp cl,0
jne @@copy
@@end:
pop fs
sti
ret
endp installirqhandler
interruptionbloc db '/interrupts',0
PROC savecontext FAR
ARG @pointer:word
USES eax,si,ds
pushfd
push eax
push ebx
push ecx
push edx
push esi
push edi
push ds
push es
push fs
push gs
push ss
mov si,[@pointer]
mov ds,[ss:bp+4]
mov eax,ebp
mov ax,[word ptr ss:bp]
push eax
push [word ptr ss:bp+4]
xor eax,eax
mov ax,[word ptr ss:bp+2]
push eax
mov ax,bp
add ax,4
push eax
pop [(regs si).sesp]
pop [(regs si).seip]
pop [(regs si).scs]
pop [(regs si).sebp]
pop [(regs si).sss]
pop [(regs si).sgs]
pop [(regs si).sfs]
pop [(regs si).ses]
pop [(regs si).sds]
pop [(regs si).sedi]
pop [(regs si).sesi]
pop [(regs si).sedx]
pop [(regs si).secx]
pop [(regs si).sebx]
pop [(regs si).seax]
pop [(regs si).seflags]
ret
endp savecontext
PROC restorecontextg FAR
ARG @pointer:word
mov si,[@pointer]
pushd [cs:(regs si).sesi]
pushd [cs:(regs si).seflags]
mov eax,[cs:(regs si).seax]
mov ebx,[cs:(regs si).sebx]
mov ecx,[cs:(regs si).secx]
mov edx,[cs:(regs si).sedx]
mov edi,[cs:(regs si).sedi]
mov ebp,[cs:(regs si).sebp]
mov es,[cs:(regs si).ses]
mov fs,[cs:(regs si).sfs]
mov gs,[cs:(regs si).sgs]
mov ds,[cs:(regs si).sds]
popfd
pop esi
pop [cs:dummy]
db 0xCA,0x02,0x00 ;retf 2
endp restorecontextg
coupling:
counter = 0
REPEAT 256
push counter+256
push offset irqhandlers
ret
counter = counter + 1
ENDM
interrupt dw 0
dummy dw 0
calling_reg regs <>
function_reg regs <>
irqhandlers:
cli
pop [cs:interrupt]
call savecontext,offset calling_reg
call irqhandler,[cs:interrupt]
call restorecontextg,offset calling_reg
sti
iret
PROC irqhandler NEAR
ARG @int:word
push cs
pop ds
call mbfindsb,offset interruptionbloc,cs
jc @@end
mov es,ax
mov ax,[@int]
sub ax,256
mov cx,size ints
mul cx
mov si,ax
add [es:(ints si).calledlow],1
adc [es:(ints si).calledhigh],0
cmp [es:(ints si).activated],1
jne @@end
add [es:(ints si).launchedlow],1
adc [es:(ints si).launchedhigh],0
lea si,[es:(ints si).vector1]
mov cl,8
@@launchall:
cmp [es:(vector si).content],0
je @@end
push [word ptr cs:calling_reg.seflags]
push cs
push offset @@back
push [es:(vector si).data.seg]
push [es:(vector si).data.off]
call savecontext,offset function_reg
call restorecontextg,offset calling_reg
db 0xCB
@@back:
cli
call savecontext,offset calling_reg
call restorecontextg,offset function_reg
@@next:
add si,size vector
dec cl
jnz @@launchall
@@end:
ret
endp irqhandler

View File

@ -1,38 +0,0 @@
asm= lzasm /z/t
lnk= elink
all: systeme.sys boot.bin
systeme.sys: video.obj disque.obj systeme.obj
$(lnk) systeme.obj systeme.sys
systeme.obj: ..\lib\detect.lib ..\lib\video.lib video.sys disque.sys
$(asm) systeme.asm
disque.sys:
$(lnk) disque.obj disque.sys
video.sys:
$(lnk) video.obj video.sys
boot.bin: boot.obj
$(lnk) boot.obj boot.bin /bs
video.obj:
$(asm) video.asm
disque.obj:
$(asm) disque.asm
boot.obj:
$(asm) boot.asm
clean:
del *.obj
del *.exe
del *.bak
del *.lib
del *.com
del *.bin
del *.sys
del *.err

View File

@ -1,216 +0,0 @@
model tiny,stdcall
p486
locals
jumps
codeseg
option procalign:byte
include "..\include\mem.h"
include "..\include\fat.h"
include "..\include\divers.h"
org 7C00h
jmp boot
bootsec bootinfo <"COS2000A",512,1,1,2,224,2880,0F0h,9,18,2,0,0,0,0,0,29h,01020304h,"COS2000 ","FAT12 ">
errorloading db " [Erreur]",0dh,0ah,0
okloading db "Recherche noyau ",0Dh,0ah," -"
sys db "SYSTEME SYS",0
syst db " [ Ok ]",0dh,0ah,"Chargement ",0
dot db ".",0
errorboot:
mov si,offset errorloading
call showstr
mov ah,0
int 16h
int 19h
boot:
mov [bootsec.bootdrive],dl
cli
mov ax,09000h
mov ss,ax
mov sp,0FFFFh
sti
boot2:
push cs
push cs
pop es
pop ds
xor ax,ax
mov dl,[bootsec.bootdrive]
int 13h
jc errorboot
mov si,offset okloading
call showstr
mov cx,[bootsec.reservedsectors]
add cx,[bootsec.hiddensectorsh]
adc cx,[bootsec.hiddensectorsl]
push cx
mov bx,[bootsec.sectorsperfat]
mov di,offset bufferfat
readfat:
call readsector
jc errorboot
inc cx
add di,[bootsec.sectorsize]
dec bx
jnz readfat
pop cx
xor ax,ax
mov al,[bootsec.fatsperdrive]
mov bx,[bootsec.sectorsperfat]
mul bx
add cx,ax
mov ax,32
mul [bootsec.directorysize]
div [bootsec.sectorsize]
add ax,cx
sub ax,2
mov [word ptr bootsec.reservedfornt],ax
xor dx,dx
checkroot:
mov di,offset buffer
call readsector
jc errorboot
xor bx,bx
findnext:
cmp [byte ptr di],0
je errorboot
cmp [byte ptr di],0E5h
je no
cmp [byte ptr di],041h
je no
mov si,offset dot
call showstr
push di cx
mov si,offset sys
mov cx,11
rep cmpsb
pop cx di
je oksystem
no:
add di,32
add bx,32
inc dx
cmp dx,[bootsec.directorysize]
ja errorboot
cmp bx,[bootsec.sectorsize]
jb findnext
inc cx
jmp checkroot
oksystem:
mov si,offset syst
call showstr
mov cx,[di+26]
mov ax,8000h
mov es,ax
push es
mov di,0000h
push 0010h
mov si,offset dot
xor ax,ax
fatagain:
cmp cx,0FF0h
jae finishload
push cx
add cx,[word ptr bootsec.reservedfornt]
call readsector
pop cx
jc errorboot
inc ax
call showstr
add di,[bootsec.sectorsize]
call getfat
jnc fatagain
finishload:
retf
;=============READSECTOR (Fonction 01H)===============
;Lit le secteur CX et le met en es:di
;-> AH=1
;<- Flag Carry si erreur
;=====================================================
readsector:
push ax bx cx dx si
mov ax,cx
xor dx,dx
div [bootsec.sectorspertrack]
inc dl
mov bl,dl
xor dx,dx
div [bootsec.headsperdrive]
xchg dl,dh
mov cx,ax
xchg cl,ch
shl cl,6
or cl, bl
mov bx,di
mov si, 4
mov al, 1
tryagain:
mov ah, 2
mov dl,[bootsec.bootdrive]
int 13h
jnc done
dec si
jnz tryagain
done:
pop si dx cx bx ax
ret
getfat:
push ax bx dx di
mov di,offset bufferfat
mov ax,cx
mov bx,ax
and bx,0000000000000001b
shr ax,1
mov cx,3
mul cx
add di,ax
cmp bx,0h
jnz evenfat
oddfat:
mov dx,[di]
and dx,0FFFh
mov cx,dx
jmp endfat
evenfat:
mov dx,[di+1]
and dx,0FFF0h
shr dx,4
mov cx,dx
endfat:
pop di dx bx ax
ret
showstr:
push ax bx si
again:
lodsb
or al,al
jz fin
mov ah,0Eh
mov bx,07h
int 10h
jmp again
fin:
pop si bx ax
ret
db 055h,0AAh
endof:
buffer equ offset endof+2048
bufferfat equ offset endof+4096

View File

@ -1,261 +0,0 @@
.model tiny
.486
smart
.code
org 0h
include ..\include\mem.h
start:
jmp tsr
offsets dd 0
db 'KEYBOARD'
tsr:
pushf
db 2eh,0ffh,1eh
dw offsets
cli
cmp cs:isstate,1
je endofforce
mov cs:isstate,1
mov cs:eaxr,eax
in al,60h
cmp al,68
je F10
cmp al,87
je F11
cmp al,88
je F12
endof:
mov cs:isstate,0
mov eax,cs:eaxr
endofforce:
sti
iret
isstate db 0
infos db 40 dup (0)
feax dd 0
F10:
push cs
pop ds
mov si,offset com
mov ah,5
int 49h
pop ax
pop ax
pop ax
push gs
push gs
push gs
pop ds
pop es
pop fs
push gs
push size exe
sti
mov cs:[isstate],0
retf
com db 'COMMANDE.CE',0
F11:
push ax di es
push cs
pop es
mov di,offset infos
mov ah,34
int 47h
mov al,cs:[di+7]
inc al
cmp al,9
jbe notabove
mov al,0
notabove:
mov ah,0
int 47h
pop es di ax
jmp endof
f12:
pushad
pushf
push ds
mov cs:[eaxr],eax
mov cs:[ebxr],ebx
mov cs:[ecxr],ecx
mov cs:[edxr],edx
mov cs:[esir],esi
mov cs:[edir],edi
mov cs:[espr],esp
mov cs:[ebpr],ebp
mov cs:[csr],cs
mov cs:[dsr],ds
mov cs:[esr],es
mov cs:[fsr],fs
mov cs:[gsr],gs
mov cs:[ssr],ss
push cs
pop ds
mov si,offset sep
call Showstr
mov si,offset reg
mov di,offset regdata
mov bx,7
showregs:
cmp byte ptr cs:[si+6],":"
jne endshowregs
call Showstr
cmp byte ptr cs:[si+4]," "
je segsss
mov edx,cs:[di]
mov cx,32
call Showhex
add di,4
jmp showmax
segsss:
mov dx,cs:[di]
mov cx,16
call Showhex
add di,2
showmax:
add si,9
mov bp,dx
push si
mov si,offset beginds
call showstr
mov si,bp
mov cx,8
mov al,0
letshow:
mov dl,ds:[si]
inc si
call showhex
inc al
cmp al,10
jb letshow
mov si,offset ende
call showstr
mov si,offset begines
call showstr
mov si,bp
mov cx,8
mov al,0
letshow2:
mov dl,es:[si]
inc si
call showhex
inc al
cmp al,10
jb letshow2
mov si,offset ende
call showstr
pop si
jmp showregs
endshowregs:
mov si,offset sep
call Showstr
xor ax,ax
int 16h
pop ds
popf
popad
jmp endof
begines db ' es[',0
beginds db ' ds[',0
ende db '] ',0
;==============================Affiche le nombre nb hexa en EDX de taille CX et couleur BL==============
ShowHex:
push ax bx cx edx si di
mov di,cx
sub cx,32
neg cx
shl edx,cl
shr di,2
mov ah,09h
and bx,1111b
Hexaize:
rol edx,4
mov si,dx
and si,1111b
mov al,[si+offset tab]
push cx
mov cx,1
cmp al,32
jb control2
mov ah,09h
int 10h
control2:
mov ah,0Eh
int 10h
pop cx
dec di
jnz Hexaize
pop di si edx cx bx ax
ret
Tab db '0123456789ABCDEF'
;==============================Affiche une chaine DS:SI de couleur BL==============
showstr:
push ax bx cx si
mov cx,1
again:
lodsb
or al,al
jz fin
and bx,0111b
cmp al,32
jb control
mov ah,09h
int 10h
control:
mov ah,0Eh
int 10h
jmp again
fin:
pop si cx bx ax
ret
;================================================
;Routine de débogage
;================================================
regdata:
eaxr dd 0
ebxr dd 0
ecxr dd 0
edxr dd 0
esir dd 0
edir dd 0
espr dd 0
ebpr dd 0
csr dw 0
dsr dw 0
esr dw 0
fsr dw 0
gsr dw 0
ssr dw 0
reg db 0Dh,0Ah,"eax : ",0
db 0Dh,0Ah,"ebx : ",0
db 0Dh,0Ah,"ecx : ",0
db 0Dh,0Ah,"edx : ",0
db 0Dh,0Ah,"esi : ",0
db 0Dh,0Ah,"edi : ",0
db 0Dh,0Ah,"esp : ",0
db 0Dh,0Ah,"ebp : ",0
db 0Dh,0Ah,"cs : ",0
db 0Dh,0Ah,"ds : ",0
db 0Dh,0Ah,"es : ",0
db 0Dh,0Ah,"fs : ",0
db 0Dh,0Ah,"gs : ",0
db 0Dh,0Ah,"ss : ",0
sep db 0Ah,0Dh,'********************',0Ah,0Dh,0
end start

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More