From d23d5db024c9655dd5081df090890a8eca4c0c0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Fri, 19 Nov 2004 17:12:30 +0000 Subject: [PATCH 01/53] feat: passage au format CE, offset a 0 Modification du format executable par defaut BREAKING CHANGE: attention modification majeure du code --- commande/commande.asm | 7 +- install/winNT gui/setup.bpr | 121 ++++++++++++++++++++++++ install/winNT gui/setup.cpp | 33 +++++++ install/winNT gui/setup.res | Bin 0 -> 876 bytes install/winNT gui/setup.tds | Bin 0 -> 524288 bytes install/winNT gui/unit1.cpp | 166 ++++++++++++++++++++++++++++++++ install/winNT gui/unit1.ddp | Bin 0 -> 51 bytes install/winNT gui/unit1.dfm | 184 ++++++++++++++++++++++++++++++++++++ install/winNT gui/unit1.h | 47 +++++++++ 9 files changed, 554 insertions(+), 4 deletions(-) create mode 100644 install/winNT gui/setup.bpr create mode 100644 install/winNT gui/setup.cpp create mode 100644 install/winNT gui/setup.res create mode 100644 install/winNT gui/setup.tds create mode 100644 install/winNT gui/unit1.cpp create mode 100644 install/winNT gui/unit1.ddp create mode 100644 install/winNT gui/unit1.dfm create mode 100644 install/winNT gui/unit1.h diff --git a/commande/commande.asm b/commande/commande.asm index f0dfdc3..1383691 100644 --- a/commande/commande.asm +++ b/commande/commande.asm @@ -3,7 +3,7 @@ smart .code -org 0100h +org 0h include ..\include\fat.h include ..\include\mem.h @@ -21,7 +21,6 @@ start: mov ah,21 mov cl,7 int 47h - mov ah,3 int 48h mov ax,0002 @@ -397,7 +396,7 @@ int 47h ret errorrefreshing db 'Impossible de lire le support',0 -extcom db '.COM',0 +extcom db '.CE ',0 Code_Mem: mov si,offset msgs @@ -622,7 +621,7 @@ Help_Mem db 0 derror db 'Erreur de Syntaxe !',0 Error_Syntax db 'La commande ou l''executable n''existe pas ! F1 pour ',0 prompt db '>',0 -msg db 'Interpreteur de commande COS V1.8',0 +msg db 'Interpreteur de commande COS V1.9',0 include str0.asm diff --git a/install/winNT gui/setup.bpr b/install/winNT gui/setup.bpr new file mode 100644 index 0000000..035bc7b --- /dev/null +++ b/install/winNT gui/setup.bpr @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[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= + + \ No newline at end of file diff --git a/install/winNT gui/setup.cpp b/install/winNT gui/setup.cpp new file mode 100644 index 0000000..dec5b3e --- /dev/null +++ b/install/winNT gui/setup.cpp @@ -0,0 +1,33 @@ +//--------------------------------------------------------------------------- + +#include +#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; +} +//--------------------------------------------------------------------------- diff --git a/install/winNT gui/setup.res b/install/winNT gui/setup.res new file mode 100644 index 0000000000000000000000000000000000000000..53d1accc46d0945afe50cda57289ae401923c1fa GIT binary patch literal 876 zcmb_bu}Z{15S{3iB3E2*N=xBd!N>)Ih58qMf?H&Zl!3edxgt%9gEaFQ78Z-Yu)epO zy^BT=!AIWCyq$ToA!J2Fa?txoq+jrUmg?u|$wFZmnzf z51ktJx=uSS%K~fEMvay)h1R3yAZqNR*91Rx^m4D$%|7Za>hxEy(N7N>lb;@*pZwHQ zKXt3ER`%QZdOZJwc!Opy&O3;dL$wcI0J?@&GnlB`P-kn@NLUAY0bJBf1H$Yieu;ht zxx&A3q96w`CXqkuA9$O2neqlRRI9TftkD F$tNfOCK><$ literal 0 HcmV?d00001 diff --git a/install/winNT gui/setup.tds b/install/winNT gui/setup.tds new file mode 100644 index 0000000000000000000000000000000000000000..d4db614569ffd85c940a3cd773088a4f26805707 GIT binary patch literal 524288 zcmeFaeRo^UaVLn~b9QIu>|~tSvE#fuj$|hj$0k4mAd^fCzCNNOinIt>ws&WBAn=m9 zk3d{JcoXG4`)T(B>{r-dRlikN_q_lWpZ#MF?ZhH(S5;S6S9e!eS681M?HvBc*3*BU zB=97GCkZ@B;7I~c5_poplLVe5@FamJ2|P*QNdiw2c#^=A1fC@DB!T~tCGbD}kKDMY zwmnJUNdiw2c#^=A1fC@DB!MRhJW1e50#6cnlE9M$o+QxvpIiSgOW{9_cc#lvKOHUZ zTi+U7e_otV%jMu*ySKaF(;xQrhXeKDU`Kyw>kpmQcd3?=Y8iZ0EQgcDvv0ncuQgm( zf9SQo=MjH3o)DYQzNxCRYJEq3KYgI@>(-z8j{^d|`gn(G7G*hGxAsEO)oA>2bXUBr zMmNO8?4h#@=9b0%z?Pg(Z>!B(q0x){wrDk1Lo)rW(<)*pMMi|S@IDb5#Q zvGx7rs})EF{&+TPg{sk^=hK_wq4kHJ1U|hSEtais`!6rfr;FuiIxYm%$z*ahug0za z@V1;@jLIpx@Y%!iS$iKnvRamt#o+W|T+B!qtu|3o9|zCgkC*dj-^?GfD1XM(=Gn6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oL*`6ahs*5l{pa0YyL&Py`eKML-cy1QY>9KoL*`6ahs*5l{pa0YyL&Py`eKML-cy z1QY>9KoL*`6ahs*5l{pa0YyL&Py`eKML-cy1QY>9KoL*`6ahs*5l{pa0YyL&Py`eK zML-cy1QY>9KoL*`6ahs*5l{pa0YyL&Py`eKML-cy1QY>9KoL*`6ahs*5l{pa0YyL& zPy`eKML-cy1QY>9KoL*`6ahs*5l{pa0YyL&Py`eKML-cy1QY>9KoL*`6ahs*5l{pa z0YyL&Py`eKML-cy1QY>9KoL*`6ahs*5l{pa0YyL&Py`eKML-cy1QY>9KoL*`6ahs* z5l{pa0YyL&Py`eKML-cy1QY>9KoL*`6ahs*5l{pa0YyL&Py`eKML-cy1QY>9KoL*` z6ahs*5l{pa0YyL&Py`eKML-cy1QY>9KoL*`6ahs*5l{paf&W(stZuEW{N2j`0c8|f AD*ylh literal 0 HcmV?d00001 diff --git a/install/winNT gui/unit1.cpp b/install/winNT gui/unit1.cpp new file mode 100644 index 0000000..2b3fc55 --- /dev/null +++ b/install/winNT gui/unit1.cpp @@ -0,0 +1,166 @@ +//--------------------------------------------------------------------------- + +#include +#include +#include +#include +#include +#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(); +} +//--------------------------------------------------------------------------- diff --git a/install/winNT gui/unit1.ddp b/install/winNT gui/unit1.ddp new file mode 100644 index 0000000000000000000000000000000000000000..cdc0ee8c2b54a98895d906932c4351134611c8d5 GIT binary patch literal 51 zcmZRVaB=ks@bJ`g@pN<#a`e>;@DB=c^Y`)e=VxFz;K0Pl$;KI)SCUzhlbT}4#=r!G E07AM8lK=n! literal 0 HcmV?d00001 diff --git a/install/winNT gui/unit1.dfm b/install/winNT gui/unit1.dfm new file mode 100644 index 0000000..b0445c3 --- /dev/null +++ b/install/winNT gui/unit1.dfm @@ -0,0 +1,184 @@ +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 diff --git a/install/winNT gui/unit1.h b/install/winNT gui/unit1.h new file mode 100644 index 0000000..6d0d3a7 --- /dev/null +++ b/install/winNT gui/unit1.h @@ -0,0 +1,47 @@ +//--------------------------------------------------------------------------- + +#ifndef Unit1H +#define Unit1H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +//--------------------------------------------------------------------------- +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 From df0e3a00149e1d4c758d7036ed14df85a54cb3fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Fri, 19 Nov 2004 17:14:08 +0000 Subject: [PATCH 02/53] feat: passage au format CE, chargement en offset 0 du systeme.sys --- noyau/boot.asm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/noyau/boot.asm b/noyau/boot.asm index 750e592..42655b9 100644 --- a/noyau/boot.asm +++ b/noyau/boot.asm @@ -1,7 +1,6 @@ boots segment .386 org 7C00h -;org 100h assume cs:boots,ds:boots start: @@ -28,9 +27,9 @@ pope db 'COS2000 ' ;nom de volume db 'FAT12 ' ;FAT specialboot: -errorloading db ' Erreur !!',0dh,0ah,0 -okloading db 'Recherche noyau',0Dh,0ah,' - system.sys',0 -syst db ' Ok',0dh,0ah,'Chargement',0 +errorloading db ' [Erreur]',0dh,0ah,0 +okloading db 'Recherche noyau ',0Dh,0ah,' - system.sys',0 +syst db ' [ Ok ]',0dh,0ah,'Chargement',0 dot db '.',0 Sys db 'SYSTEME SYS' @@ -120,7 +119,7 @@ oksystem: mov ax,0900h mov es,ax push es - mov di,100h + mov di,000h push di mov si,offset dot xor ax,ax @@ -212,6 +211,8 @@ again: fin: pop si bx ax ret + +db 055h,0AAh Buffer equ $ BufferFat equ $+2048 From 4da7f7f656e8101dd4e5762515db03a4fcee48c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Fri, 19 Nov 2004 17:14:57 +0000 Subject: [PATCH 03/53] feat: passage au format CE, offset a 0 Chargement, Projection et execution en offset 0 --- noyau/disque.asm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/noyau/disque.asm b/noyau/disque.asm index 9778250..27e8746 100644 --- a/noyau/disque.asm +++ b/noyau/disque.asm @@ -3,7 +3,7 @@ smart .code -org 0100h +org 0h include ..\include\fat.h @@ -187,7 +187,7 @@ execfile: mov ax,offset arrive push ax push es - push 0100h + push 0000h push es push es push es @@ -235,7 +235,6 @@ projfile: jc errorload2 mov eax,cs:tempfit.FileSize mov ecx,eax - add ecx,100h push eax mov ah,2 int 49h @@ -244,7 +243,7 @@ projfile: push gs pop es mov cx,cs:tempfit.FileGroup - mov di,100h + mov di,0h call loadway jc errorload2 clc From 20d5374674d9a2330816103433755b95de54c297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Fri, 19 Nov 2004 17:19:05 +0000 Subject: [PATCH 04/53] =?UTF-8?q?fix:=20passage=20au=20format=20CE,=20offs?= =?UTF-8?q?et=20a=200=20Ajout=20de=20la=20fonction=20MBSearchfunc=20qui=20?= =?UTF-8?q?recherche=20une=20fonction=20dans=20la=20m=C3=A9moire=20et=20MB?= =?UTF-8?q?Loadfuncs=20qui=20permet=20de=20resoudre=20les=20dependance=20d?= =?UTF-8?q?u=20format=20CE=20correction=20d'un=20bogue=20dans=20MBcreate?= =?UTF-8?q?=20lors=20de=20l'utilisation=20d'un=20bloc=20de=20meme=20taille?= =?UTF-8?q?=20que=20le=20libre?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noyau/mcb.asm | 127 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 123 insertions(+), 4 deletions(-) diff --git a/noyau/mcb.asm b/noyau/mcb.asm index aa586e1..8563682 100644 --- a/noyau/mcb.asm +++ b/noyau/mcb.asm @@ -3,13 +3,13 @@ smart .code -org 0100h +org 0h include ..\include\mem.h include ..\include\divers.h start: -maxfunc equ 10 +maxfunc equ 13 jmp tsr ;Saute à la routine résidente nameed db 'MB' ;Nom drivers @@ -64,9 +64,117 @@ tables dw MBinit ;Table qui contient les adresses de toutes les fonctions de VI dw MBAlloc dw MBclean dw MBfindsb + dw MBnonresident + dw MBSearchfunc + dw MBLoadfuncs + ;dw MBdefrag + ;dw MBcopy + ;dw MBchname FirstMB dw 0 +;Resouds les dépendances du bloc de mémoire GS +MBloadfuncs: + push ax bx ecx dx si di ds es gs + push gs + pop ds + cmp word ptr ds:[102h],"EC" + jne notloaded + mov si,ds:[100h+exe.import+2] +loadfuncs: + cmp word ptr [si],0 + je endofloading + call MBSearchfunc + jnc toendoftext + mov bx,si +findend2: + inc bx + cmp byte ptr [bx], ':' + jne findend2 + mov byte ptr [bx],0 + mov ah,17 + int 48h + jc notloaded + mov byte ptr [bx],':' + call MBSearchfunc + jc notloaded +toendoftext: + mov al,[si] + cmp al,0 + je oktonext2 + inc si + jmp toendoftext +oktonext2: + inc si + mov [si],dx + mov [si+2],gs + add si,4 + jmp loadfuncs +endofloading: + clc + pop gs es ds di si dx ecx bx ax + ret +notloaded: + stc + pop gs es ds di si dx ecx bx ax + ret + + + + + +;Recherche une fonction pointé par DS:SI en mémoire et renvoie son adresse en GS:DX +MBSearchfunc: + push bx si di + mov bx,si +findend: + inc bx + cmp byte ptr [bx], ':' + jne findend + mov byte ptr [bx],0 + call MBfind + mov byte ptr [bx],':' + jc notfoundattallthesb + cmp word ptr gs:[102h],"EC" + jne notfoundattallthesb + mov di,gs:[100h+exe.export+2] + inc bx + inc bx +functions: + cmp word ptr gs:[di],0 + je notfoundattallthesb + mov si,bx +cmpnamesfunc: + mov al,gs:[di] + cmp al,ds:[si] + jne notfoundthesb + cmp al,0 + je seemsok + inc si + inc di + jmp cmpnamesfunc +notfoundthesb: + mov al,gs:[di] + cmp al,0 + je oktonext + inc di + jmp notfoundthesb +oktonext: + inc di + inc di + inc di + jmp functions +seemsok: + mov dx,gs:[di+1] + clc + pop di si bx + ret +notfoundattallthesb: + stc + pop di si bx + ret + + ;Mise a nivo de la mémoire (jonction de blocs libre) MBclean: push ax bx dx es gs @@ -400,10 +508,10 @@ endofloops: inc bx inc bx sub ax,cx - dec ax - dec ax cmp ax,0 je nofree + dec ax + dec ax mov es:[MB.Sizes],cx add cx,bx mov es,cx @@ -442,4 +550,15 @@ MBresident: pop es bx ret +;Rend le segment GS résident +MBnonresident: + push bx es + mov bx,gs + dec bx + dec bx + mov es,bx + mov es:[MB.IsResident],False + pop es bx + ret + end start From 3b37ee93a88f000436591f790b3e6684abbdae54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Fri, 19 Nov 2004 17:20:43 +0000 Subject: [PATCH 05/53] feat: passage au format CE, offset a 0 Chargement des pilotes et residents en 0 Chargement de commande.ce plutot que commande.com Ajout de qlq octets pour obtenir 512 octets pile --- noyau/systeme.asm | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/noyau/systeme.asm b/noyau/systeme.asm index 876a786..e166d1a 100644 --- a/noyau/systeme.asm +++ b/noyau/systeme.asm @@ -3,7 +3,7 @@ smart .code -org 0100h +org 0h include ..\include\fat.h include ..\include\mem.h @@ -148,7 +148,7 @@ suites: call projfile jc nopromptload push es - push 0100h + push 0000h push 7202h popf push es @@ -221,7 +221,7 @@ address db ' [',0 addressend db ':0100] ',0 irqs db ' (IRQ ',0 irqsend db ')',0 -prompt db 'commande.exe',0 +prompt db 'commande.ce ',0 conf db 'systeme.ini',0 premice db 0Dh,0Ah,'Chargement du fichier de configuration:',0 debut db 0Dh,0Ah,'Chargement des pilotes systeme:',0 @@ -659,8 +659,8 @@ call projfile jc reph mov bx,ax call getint -mov es:[102h],si -mov es:[104h],ds +mov es:[2h],si +mov es:[4h],ds call setint reph: pop ds di si cx bx ax @@ -684,7 +684,7 @@ cli shl bx,2 xor ax,ax mov ds,ax -mov word ptr ds:[bx],0100h +mov word ptr ds:[bx],0h mov ds:[bx+2],es pop ds bx ax sti @@ -777,13 +777,12 @@ projfile: jc errorload mov eax,cs:tempfit.FileSize mov ecx,eax - add ecx,100h call MBCreate jc errorload push gs pop es mov cx,cs:tempfit.FileGroup - mov di,100h + mov di,0h call loadway jc errorload clc From 876db618e0c02ca369d13a3164127998180dc574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Fri, 19 Nov 2004 17:21:20 +0000 Subject: [PATCH 06/53] =?UTF-8?q?fix:=20passage=20au=20format=20CE,=20offs?= =?UTF-8?q?et=20a=200=20correction=20d'un=20bogue=20utilisation=20de=20la?= =?UTF-8?q?=20constante=20graphics=20plutot=20que=20l'emplacement=20m?= =?UTF-8?q?=C3=A9moire=20graphic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noyau/video.asm | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/noyau/video.asm b/noyau/video.asm index 0c8b133..1d144a1 100644 --- a/noyau/video.asm +++ b/noyau/video.asm @@ -3,7 +3,7 @@ smart .code -org 0100h +org 0h include ..\include\bmp.h @@ -308,6 +308,7 @@ ShowTime: call showfixint pop edx cx ax ret + db 'ICI' ;================SHOWNAME (Fonction 2Eh)============== ;Affiche le nom pointé par SI @@ -522,7 +523,7 @@ initattribs: mul ah shl ax,1 cmp cs:mode,5 - setae cs:graphics + setae cs:graphic jb istext shl ax,3 istext: @@ -534,7 +535,7 @@ istext: mov al,cs:[di-36] xor ah,ah shl ax,2 - mov cl,cs:graphics + mov cl,cs:graphic shr ax,cl mov cs:linesize,ax mov ax,cs:[di-43] @@ -586,7 +587,7 @@ clearscreen: mov cx,cs:pagesize mov di,cs:adress shr cx,2 - cmp byte ptr cs:graphics,1 + cmp byte ptr cs:graphic,1 jne erasetext mov ax,0A000h mov es,ax @@ -791,7 +792,7 @@ showline: jne scro dec bl mov cx,1 - cmp byte ptr cs:graphics,0 + cmp byte ptr cs:graphic,0 je okscro mov cx,8 okscro: @@ -846,7 +847,7 @@ showinteger: pop esi edx cx bx eax ret -showbuffer db 35 dup (0FFh) +showbuffer db 50 dup (0FFh) ;==========SHOWFIXINT (Fonction h)=========== ;Affiche un entier EDX aprés le curseur de taille cx @@ -1222,7 +1223,7 @@ scrolldown: sub cx,si mov di,cs:adress cld - cmp byte ptr cs:graphics,1 + cmp byte ptr cs:graphic,1 jne textp mov ax,0A000h mov es,ax @@ -1300,7 +1301,7 @@ setxy: add di,ax shl di,1 mov cs:xy,di - cmp byte ptr cs:graphics,1 + cmp byte ptr cs:graphic,1 jne oktext mov bl,cs:x mov cl,cs:y @@ -1536,7 +1537,7 @@ getchar: ;Ecrit le caractère ASCII CL attribut CH aprés le curseur, en le mettant à jours charout: push ax bx cx dx di es - cmp byte ptr cs:graphics,1 + cmp byte ptr cs:graphic,1 jne textaccess call emulatechar jmp adjusttext From bd0268505f99e76de708014d85598177a38961fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Fri, 19 Nov 2004 17:22:13 +0000 Subject: [PATCH 07/53] feat: passage au format CE, offset a 0 Changement de la coloration pour les executables --- programs/gestion.asm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/programs/gestion.asm b/programs/gestion.asm index dc79590..e5361a9 100644 --- a/programs/gestion.asm +++ b/programs/gestion.asm @@ -3,7 +3,7 @@ smart .code -org 0100h +org 0h include ..\include\fat.h @@ -47,11 +47,11 @@ mov cl,4 int 47h jmp notall notdirectory: -cmp [si+Entries.FilExt],'E' +cmp [si+Entries.FilExt],'C' jne notexe -cmp [si+Entries.FilExt+1],'X' +cmp [si+Entries.FilExt+1],'E' jne notexe -cmp [si+Entries.FilExt+2],'E' +cmp [si+Entries.FilExt+2],' ' jne notexe mov ah,21 mov cl,5 From 42725ead9a37655559e995bfbc6aeb8bcce90341 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Fri, 19 Nov 2004 17:23:06 +0000 Subject: [PATCH 08/53] feat: passage au format CE, offset a 0 --- noyau/8259a.asm | 2 +- noyau/clavier.asm | 2 +- noyau/format.asm | 2 +- noyau/heure.asm | 2 +- noyau/horloge.asm | 2 +- noyau/manette.asm | 2 +- noyau/port.asm | 2 +- noyau/souris.asm | 2 +- programs/detect.asm | 2 +- programs/editeur.asm | 2 +- programs/logo.asm | 2 +- programs/memoire.asm | 2 +- programs/pmode.asm | 2 +- programs/souris.asm | 2 +- programs/test.asm | 2 +- programs/verifier.asm | 2 +- programs/volume.asm | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/noyau/8259a.asm b/noyau/8259a.asm index 1c05847..592c021 100644 --- a/noyau/8259a.asm +++ b/noyau/8259a.asm @@ -2,7 +2,7 @@ .486 smart .code -org 0100h +org 0h start: jmp tsr db 'PIC8259A' diff --git a/noyau/clavier.asm b/noyau/clavier.asm index 83c32a6..5ce5b63 100644 --- a/noyau/clavier.asm +++ b/noyau/clavier.asm @@ -3,7 +3,7 @@ smart .code -org 0100h +org 0h start: diff --git a/noyau/format.asm b/noyau/format.asm index 62b8d30..0701d2d 100644 --- a/noyau/format.asm +++ b/noyau/format.asm @@ -3,7 +3,7 @@ smart .code -org 0100h +org 0h start: jmp tsr ;Saute à la routine résidente diff --git a/noyau/heure.asm b/noyau/heure.asm index f4c547e..918ab3f 100644 --- a/noyau/heure.asm +++ b/noyau/heure.asm @@ -3,7 +3,7 @@ smart .code -org 0100h +org 0h start: diff --git a/noyau/horloge.asm b/noyau/horloge.asm index 8ff0505..41c7f0d 100644 --- a/noyau/horloge.asm +++ b/noyau/horloge.asm @@ -3,7 +3,7 @@ smart .code -org 0100h +org 0h start: diff --git a/noyau/manette.asm b/noyau/manette.asm index fe5c6ef..d291dc2 100644 --- a/noyau/manette.asm +++ b/noyau/manette.asm @@ -2,7 +2,7 @@ .486 smart .code -org 0100h +org 0h start: jmp tsr drv db 'JOYSTICK',0 diff --git a/noyau/port.asm b/noyau/port.asm index 2e185f7..c4a588d 100644 --- a/noyau/port.asm +++ b/noyau/port.asm @@ -2,7 +2,7 @@ .486 smart .code -org 0100h +org 0h start: jmp tsr drv db 'LPT ',0 diff --git a/noyau/souris.asm b/noyau/souris.asm index c639cfa..ab8b210 100644 --- a/noyau/souris.asm +++ b/noyau/souris.asm @@ -2,7 +2,7 @@ .486 smart .code -org 0100h +org 0h start: jmp tsr drv db 'MOUSE',0 diff --git a/programs/detect.asm b/programs/detect.asm index 9c4ea33..4e4f52d 100644 --- a/programs/detect.asm +++ b/programs/detect.asm @@ -3,7 +3,7 @@ smart .code -org 0100h +org 0h include ..\include\pci.h diff --git a/programs/editeur.asm b/programs/editeur.asm index 23c988c..856f0bf 100644 --- a/programs/editeur.asm +++ b/programs/editeur.asm @@ -1,7 +1,7 @@ .model tiny .386c .code -org 0100h +org 0h start: diff --git a/programs/logo.asm b/programs/logo.asm index d5a3b1a..85411e0 100644 --- a/programs/logo.asm +++ b/programs/logo.asm @@ -1,7 +1,7 @@ .model tiny .386c .code -org 0100h +org 0h start: diff --git a/programs/memoire.asm b/programs/memoire.asm index d3ed25b..b95a9b1 100644 --- a/programs/memoire.asm +++ b/programs/memoire.asm @@ -3,7 +3,7 @@ smart .code -org 0100h +org 0h include ..\include\mem.h include ..\include\divers.h diff --git a/programs/pmode.asm b/programs/pmode.asm index 23b82e4..f78d0a5 100644 --- a/programs/pmode.asm +++ b/programs/pmode.asm @@ -3,7 +3,7 @@ smart .code -org 0100h +org 0h start: mov eax,cr0 diff --git a/programs/souris.asm b/programs/souris.asm index 30c92fc..0550e34 100644 --- a/programs/souris.asm +++ b/programs/souris.asm @@ -3,7 +3,7 @@ smart .code -org 0100h +org 0h start: mov si,offset message diff --git a/programs/test.asm b/programs/test.asm index 0b72193..c1fdcc3 100644 --- a/programs/test.asm +++ b/programs/test.asm @@ -2,7 +2,7 @@ .486 smart .code -org 0100h +org 0h start: diff --git a/programs/verifier.asm b/programs/verifier.asm index 8b9af11..b29aeff 100644 --- a/programs/verifier.asm +++ b/programs/verifier.asm @@ -1,7 +1,7 @@ .model tiny .386c .code -org 0100h +org 0h start: diff --git a/programs/volume.asm b/programs/volume.asm index 49a0947..f300a94 100644 --- a/programs/volume.asm +++ b/programs/volume.asm @@ -1,7 +1,7 @@ .model tiny .386c .code -org 0100h +org 0h start: From cea146350675084a694a9aaa9fe4ac51fc1c5255 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Fri, 19 Nov 2004 18:54:51 +0000 Subject: [PATCH 09/53] feat: ajout des definitions CE (compatible executable) --- include/mem.h | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/include/mem.h b/include/mem.h index 9053805..dc8dc7d 100644 --- a/include/mem.h +++ b/include/mem.h @@ -1,11 +1,23 @@ -MB struc -Check dw 'NH' -IsNotLast db 0 -IsResident db 0 -Reference dw 0 -Sizes dw 0 -Names db 24 dup (0) +MB struc ;Bloc de mémoire +Check dw '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 MB ends -Free equ 0 -memorystart equ 1000h +exe struc ;Executable COS +Checks db "CE" ;signature de l'exe +major db 1 ;N° version majeur +minor db 0 ;N° version mineur +checksum dd 0 ;Checksum de l'exe +compressed db 0 ;a 1 si compressé par RLE +import dw 0 ;importation de fonctions +export dw 0 ;exportation de fonctions +blocs dw 0 ;sections des blocs mémoire +exe ends + + +Free equ 0 ;Reference quand libre +memorystart equ 1000h ;premier bloc de la mémoire From 8da7e5072a20b4aa117986e2fddb9b95ee43bda9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Fri, 19 Nov 2004 18:57:45 +0000 Subject: [PATCH 10/53] =?UTF-8?q?fix:=20correction=20d'un=20bogue=20dans?= =?UTF-8?q?=20cmpnames=20:=20derniere=20caract=C3=A8re=20du=20nom=20ignor?= =?UTF-8?q?=C3=A9=20pendant=20la=20comparaison=20et=20extension=20de=20tai?= =?UTF-8?q?lle=20correctione?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noyau/disque.asm | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/noyau/disque.asm b/noyau/disque.asm index 27e8746..34f449d 100644 --- a/noyau/disque.asm +++ b/noyau/disque.asm @@ -337,29 +337,38 @@ CmpNames: repe cmpsb jne nequal inc si + jmp equal nequal: + cmp byte ptr es:[di-1],' ' + jne notequal +equal: cmp byte ptr [si-1],'.' jne trynoext mov al,' ' rep scasb mov cx,3 rep cmpsb - jne notequal - cmp byte ptr [si],0 - jne notequal - cmp cx,0 - jl notequal + jne nequal2 + inc si + jmp equal2 +nequal2: + cmp byte ptr es:[di-1],' ' + jne notequal +equal2: + cmp byte ptr [si-1],0 + jne notequal itok: + clc pop di si cx ax ret +notequal: + stc + pop di si cx ax + ret trynoext: cmp byte ptr [si-1],0 jne notequal jmp itok -notequal: - stc - pop di si cx ax - ret ;charge le fichier de de groupe CX et de taille eax LoadWay: From cac7a678dd8d3122977897a04eb0f9fbc4668223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Fri, 19 Nov 2004 18:58:30 +0000 Subject: [PATCH 11/53] fix: correction d'un oubli, les structures CE commencent en 0h, changement des fonctions MBsearchfunc et MBloadfuncs --- noyau/mcb.asm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/noyau/mcb.asm b/noyau/mcb.asm index 8563682..0d5931e 100644 --- a/noyau/mcb.asm +++ b/noyau/mcb.asm @@ -78,9 +78,9 @@ MBloadfuncs: push ax bx ecx dx si di ds es gs push gs pop ds - cmp word ptr ds:[102h],"EC" + cmp word ptr ds:[exe.Checks],"EC" jne notloaded - mov si,ds:[100h+exe.import+2] + mov si,ds:[exe.import] loadfuncs: cmp word ptr [si],0 je endofloading @@ -135,9 +135,9 @@ findend: call MBfind mov byte ptr [bx],':' jc notfoundattallthesb - cmp word ptr gs:[102h],"EC" + cmp word ptr gs:[exe.checks],"EC" jne notfoundattallthesb - mov di,gs:[100h+exe.export+2] + mov di,gs:[exe.export] inc bx inc bx functions: From 9c770034e7821d4bc80979d56beca383dd3bba6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Fri, 19 Nov 2004 19:57:06 +0000 Subject: [PATCH 12/53] fix: correction temporaire pour permettre l'execution d'application non CE --- noyau/mcb.asm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/noyau/mcb.asm b/noyau/mcb.asm index 0d5931e..6878f07 100644 --- a/noyau/mcb.asm +++ b/noyau/mcb.asm @@ -78,8 +78,9 @@ MBloadfuncs: push ax bx ecx dx si di ds es gs push gs pop ds - cmp word ptr ds:[exe.Checks],"EC" - jne notloaded + cmp word ptr ds:[0],"EC" + ;jne notloaded + jne endofloading mov si,ds:[exe.import] loadfuncs: cmp word ptr [si],0 @@ -120,9 +121,6 @@ notloaded: ret - - - ;Recherche une fonction pointé par DS:SI en mémoire et renvoie son adresse en GS:DX MBSearchfunc: push bx si di From 0348ef59a4bca8deeb0d3537d288f4565699a7d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Fri, 19 Nov 2004 19:57:43 +0000 Subject: [PATCH 13/53] fix: correction d'un bogue dans la fonction execfile concernant l'execution de fichier CE --- noyau/disque.asm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/noyau/disque.asm b/noyau/disque.asm index 34f449d..145ef2b 100644 --- a/noyau/disque.asm +++ b/noyau/disque.asm @@ -6,10 +6,10 @@ smart org 0h include ..\include\fat.h +include ..\include\mem.h start: jmp tsr ;Saute à la routine résidente -names db 'DRIVE' ;Nom drivers id dw 1234h ;Identifiant drivers Tsr: cli ;Désactive interruptions logiciellement @@ -182,12 +182,21 @@ execfile: pop gs mov ah,6 int 49h + mov ah,12 + int 49h + jc reallyerror push es push cs mov ax,offset arrive push ax push es + cmp word ptr gs:[0h],'EC' + jne noce + push size exe + jmp wasce + noce: push 0000h + wasce: push es push es push es From 08af9a9788746c9fa83fde05d13dc483c6847b11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Fri, 19 Nov 2004 21:56:38 +0000 Subject: [PATCH 14/53] =?UTF-8?q?feat:=20astuce=20pour=20recuperer=20de=20?= =?UTF-8?q?la=20m=C3=A9moire?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noyau/systeme.asm | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/noyau/systeme.asm b/noyau/systeme.asm index e166d1a..ca67b2b 100644 --- a/noyau/systeme.asm +++ b/noyau/systeme.asm @@ -57,6 +57,9 @@ noone: call showstr call MBinit jc nomem1 + mov cx,65453 + mov si,offset sysname + call MBcreate call InitDrive mov si,offset premice mov bl,7 @@ -137,6 +140,12 @@ suites: ;initialisation des MCBs mov ah,0 int 49h + push memorystart + pop gs + mov ah,10 + int 49h + mov ah,1 + int 49h mov si,offset fini mov bl,7 @@ -218,11 +227,12 @@ erroron: db 0CBh address db ' [',0 -addressend db ':0100] ',0 +addressend db '] ',0 irqs db ' (IRQ ',0 irqsend db ')',0 -prompt db 'commande.ce ',0 +prompt db 'commande.ce',0 conf db 'systeme.ini',0 +sysname db 'SYSTEME.SYS',0 premice db 0Dh,0Ah,'Chargement du fichier de configuration:',0 debut db 0Dh,0Ah,'Chargement des pilotes systeme:',0 fini db 0Dh,0Ah,'Chargement de l''interpreteur de commande:',0 @@ -898,36 +908,45 @@ enduppercase: pop ax si ret -;Compare le nom ds:si '.' avec es:di +;Compare le nom ds:si '.' avec es:di CmpNames: push ax cx si di mov cx,8 repe cmpsb jne nequal inc si + jmp equal nequal: + cmp byte ptr es:[di-1],' ' + jne notequal +equal: cmp byte ptr [si-1],'.' jne trynoext mov al,' ' rep scasb mov cx,3 rep cmpsb - jne notequal - cmp byte ptr [si],0 - jne notequal - cmp cx,0 - jl notequal + jne nequal2 + inc si + jmp equal2 +nequal2: + cmp byte ptr es:[di-1],' ' + jne notequal +equal2: + cmp byte ptr [si-1],0 + jne notequal itok: + clc pop di si cx ax ret +notequal: + stc + pop di si cx ax + ret trynoext: cmp byte ptr [si-1],0 jne notequal jmp itok -notequal: - stc - pop di si cx ax - ret ;charge le fichier de de groupe CX et de taille eax LoadWay: From ee67bb4ce2126462205ccd1bedd20489c936a08d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Fri, 19 Nov 2004 21:57:11 +0000 Subject: [PATCH 15/53] =?UTF-8?q?feat:=20changement=20du=20premier=20bloc?= =?UTF-8?q?=20m=C3=A9moire=20pour=20astuce=20du=20systeme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/mem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mem.h b/include/mem.h index dc8dc7d..0c70401 100644 --- a/include/mem.h +++ b/include/mem.h @@ -20,4 +20,4 @@ exe ends Free equ 0 ;Reference quand libre -memorystart equ 1000h ;premier bloc de la mémoire +memorystart equ 0052h ;premier bloc de la mémoire From b3a5f09040adf8c6c615eff43cafe63701906846 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Fri, 19 Nov 2004 22:13:10 +0000 Subject: [PATCH 16/53] feat: exemple de programme au format CE qui exploite une librairie par importation --- programs/exem-ce.asm | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 programs/exem-ce.asm diff --git a/programs/exem-ce.asm b/programs/exem-ce.asm new file mode 100644 index 0000000..b653f8c --- /dev/null +++ b/programs/exem-ce.asm @@ -0,0 +1,29 @@ +.model small +.486 +smart +.code +org 0h + +include ..\include\mem.h + +start: +header exe <,1,0,,,offset imports,offset exports,> + +realstart: +call [affiche] +call [waitkey] +call [bye] +retf + + +imports: + db "EXEM-LIB.LIB::affiche",0 +affiche dd 0 + db "EXEM-LIB.LIB::waitkey",0 +waitkey dd 0 + db "EXEM-LIB.LIB::bye",0 +bye dd 0 + dw 0 +exports: + +end start From 323e995c10bb5975d90a139f13f6a7f944480f2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Fri, 19 Nov 2004 22:13:24 +0000 Subject: [PATCH 17/53] feat: librairie d'exemple --- programs/exem-lib.asm | 49 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 programs/exem-lib.asm diff --git a/programs/exem-lib.asm b/programs/exem-lib.asm new file mode 100644 index 0000000..4c84b49 --- /dev/null +++ b/programs/exem-lib.asm @@ -0,0 +1,49 @@ +.model tiny +.486 +smart +.code +org 0h + +include ..\include\mem.h + +start: +header exe <,1,0,,,offset imports,offset exports,> + +getvar: +push ds +push cs +pop ds +mov si,offset mes +mov ah,13 +int 47h +pop ds +retf +mes db 'c un test qui illustre les appels de fonctions externes !!!',0 + +getvar2: +mov ax,0 +int 16h +retf + +mettar: +push ds +push cs +pop ds +mov si,offset mes2 +mov ah,13 +int 47h +pop ds +retf +mes2 db 'Cela fonctionne.',0 + +imports: + +exports: + db "affiche",0 + dw mettar + db "waitkey",0 + dw getvar2 + db "bye",0 + dw getvar + dw 0 +end start From 309de1fa7bc700ee4f098c0b629633ca9a5302b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Sun, 21 Nov 2004 20:38:49 +0000 Subject: [PATCH 18/53] =?UTF-8?q?feat:=20version=20initiale=20de=20la=20li?= =?UTF-8?q?brairie=20dynamique=20video.lib=20(non=20test=C3=A9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/video.asm | 850 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 850 insertions(+) create mode 100644 lib/video.asm diff --git a/lib/video.asm b/lib/video.asm new file mode 100644 index 0000000..ceed80c --- /dev/null +++ b/lib/video.asm @@ -0,0 +1,850 @@ +.model tiny +.486 +smart +locals +.code +org 0h + +include ..\include\mem.h + +start: +header exe <,1,0,,,,offset exports,> + +exports: + db "print",0 + dw print + db "showdate",0 + dw showdate + db "showtime",0 + dw showtime + db "showname",0 + dw showname + db "showattr",0 + dw showattr + db "showsize",0 + dw showsize + db "showspace",0 + dw showspace + db "showline",0 + dw showline + db "showchar",0 + dw showchar + db "showint",0 + dw ShowInt + db "Showsigned",0 + dw Showsigned + db "showhex",0 + dw ShowHex + db "showbin",0 + dw Showbin + db "showbcd",0 + dw ShowBCD + db "showstring",0 + dw showstring + db "showstring0",0 + dw showstring0 + dw 0 + +;================PRINT============== +;Affiche la chaine %0 en utilisant les parametres de formatage %x....%x +;-> %0 %x +;<- +;=================================== +print PROC FAR + ARG pointer:word=taille + push bp + mov bp,sp + push cx si di + xor di,di + mov si,[pointer] +@@strinaize0: + mov cl,[si] + cmp cl,0 + je @@no0 + cmp cl,'%' + je @@special +@@showit: + call charout + 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 @@showchar + cmp cl,'i' + je @@showint + cmp cl,'j' + je @@showsigned + cmp cl,'h' + je @@showhex + cmp cl,'b' + je @@showbin + cmp cl,'s' + je @@showstring + cmp cl,'0' + je @@showstring0 + cmp cl,'d' + 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 + +@@showchar: + push word ptr [offset pointer+di+2] + call showchar + add si,2 + add di,2 + jmp @@strinaize0 + +@@showint: + push dword ptr [offset pointer+di+2] + call showint + add si,2 + add di,4 + jmp @@strinaize0 + +@@showsigned: + call @@Chosesize + call showsigned + jmp @@strinaize0 + +@@showhex: + call @@Chosesize + call showhex + jmp @@strinaize0 + +@@showbin: + call @@Chosesize + call showbin + jmp @@strinaize0 + +@@showstring: + push word ptr [offset pointer+di+2] + call showstring + add si,2 + add di,2 + jmp @@strinaize0 + +@@showstring0: + push word ptr [offset pointer+di+2] + call showstring0 + add si,2 + add di,2 + jmp @@strinaize0 + +@@showbcd: + call @@Chosesize + call showbcd + jmp @@strinaize0 + +@@showsize: + push dword ptr [offset pointer+di+2] + call showsize + add si,2 + add di,4 + jmp @@strinaize0 + +@@showattr: + push word ptr [offset pointer+di+2] + call showattr + add si,2 + add di,2 + jmp @@strinaize0 + +@@showname: + push word ptr [offset pointer+di+2] + call showname + add si,2 + add di,2 + jmp @@strinaize0 + +@@showtime: + push word ptr [offset pointer+di+2] + call showtime + add si,2 + add di,2 + jmp @@strinaize0 + +@@showdate: + push word ptr [offset pointer+di+2] + call showdate + 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 + + +@@no0: + add di,bp + add di,2 + mov cx,ss:[bp+2] + mov ss:[di+2],cx + mov cx,ss:[bp+4] + mov ss:[di+4],cx + mov cx,ss:[bp] + mov ss:[di],cx + mov bp,di + pop di si cx + mov sp,bp + pop bp + retf + +print ENDP +;================TESTS============== +;met dans DX le contenu de %0 +;-> %0 +;<- +;=================================== +tests PROC FAR + ARG date:word=taille + push bp + mov bp,sp + push ax cx edx + mov dx,[date] + pop edx cx ax + pop bp + retf taille +tests ENDP + +;================SHOWDATE============== +;Affiche la date contenu en %0 +;-> %0 +;<- +;====================================== +ShowDate PROC FAR + ARG date:word=taille + push bp + mov bp,sp + push edx + xor edx,edx + mov dx,[date] + and dx,11111b + push edx + push 2 + call showfixint + push '/' + call showchar + mov dx,[date] + shr dx,5 + and dx,111b + push edx + push 2 + call showfixint + push '/' + call showchar + mov dx,[date] + shr dx,8 + and dx,11111111b + add dx,1956 + push edx + push 4 + call showfixint + pop edx + pop bp + retf taille +ShowDate ENDP + +;================SHOWTIME============== +;Affiche l'heure contenu en %0 +;-> %0 +;<- +;====================================== +ShowTime PROC FAR + ARG time:word=taille + push bp + mov bp,sp + push edx + xor edx,edx + mov dx,[time] + shr dx,11 + and dx,11111b + push edx + push 2 + call showfixint + push ':' + call showchar + mov dx,[time] + shr dx,5 + and dx,111111b + push edx + push 2 + call showfixint + push ':' + call showchar + mov dx,[time] + and dx,11111b + shl dx,1 + push edx + push 2 + call showfixint + pop edx + pop bp + retf taille +ShowTime ENDP + +;================SHOWNAME============== +;Affiche le nom pointé par ds:%0 +;-> ds:%0 +;<- +;====================================== +ShowName PROC FAR + ARG thename:word=taille + push bp + mov bp,sp + push cx si + mov si,[thename] + xor cx,cx +@@showthename: + push word ptr ds:[si] + call showchar + inc si + inc cx + cmp cx,8 + jne @@suiteaname + push ' ' + call showchar +@@suiteaname: + cmp cx,8+3 + jb @@showthename + pop si cx + pop bp + retf taille +ShowName ENDP + +;================SHOWATTR============== +;Affiche les attributs spécifié par %0 +;-> %0 +;<- +;====================================== +ShowAttr PROC FAR + ARG attr:word=taille + push bp + mov bp,sp + test [attr],00000001b + je @@noreadonly + push 'L' + jmp @@readonly +@@noreadonly: + push '-' +@@readonly: + call showchar + test [attr],00000010b + je @@nohidden + push 'C' + jmp @@hidden +@@nohidden: + push '-' +@@hidden: + call showchar + test [attr],00000100b + je @@nosystem + push 'S' + jmp @@system +@@nosystem: + push '-' +@@system: + call showchar + test [attr],00100000b + je @@noarchive + push 'A' + jmp @@archive +@@noarchive: + push '-' +@@archive: + call showchar + test [attr],00010000b + je @@nodirectory + push 'R' + jmp @@directory +@@nodirectory: + push '-' +@@directory: + call showchar + pop bp + retf taille +ShowAttr ENDP + +;================SHOWSIZE============== +;Affiche le nom pointé par %0 +;-> %0 +;<- +;====================================== +ShowSize PROC FAR + ARG thesize:dword=taille + push bp + mov bp,sp + push 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 + push edx + push 4 + call showintR + push offset unit + call showstring0 + jmp @@finsize +@@kilo: + shr edx,10 + push edx + push 4 + call showintR + push offset unitkilo + call showstring0 + jmp @@finsize +@@mega: + shr edx,20 + push edx + push 4 + call showintR + push offset unitmega + call showstring0 + jmp @@finsize +@@giga: + shr edx,30 + push edx + push 4 + call showintR + push offset unitgiga + call showstring0 +@@finsize: + pop ds edx + pop bp + retf taille + +unit db ' o ',0 +unitkilo db ' ko',0 +unitmega db ' mo',0 +unitgiga db ' go',0 +ShowSize ENDP + +;==========SHOWSPACE=========== +;met un espace aprés le curseur +;-> +;<- +;============================== +showspace PROC FAR + push bp + mov bp,sp + push cx + mov cl,' ' + call charout + clc + pop cx + pop bp + retf +showspace ENDP + +;==========SHOWLINE=============== +;remet le curseur text a la ligne avec un retfour chariot +;-> +;<- +;================================= +showline PROC FAR + push ax + mov ah,06 + int 47h + pop ax + retf + showline ENDP + +;==========SHOWCHAR=========== +;met un caractère de code ASCII %0 aprés le curseur +;-> %0 +;<- +;============================= +showchar PROC FAR + ARG char:word=taille + push bp + mov bp,sp + push cx + mov cx,[char] + call charout + pop cx + pop bp + retf taille +showchar ENDP + +;==========SHOWINT=========== +;Affiche un entier %0 aprés le curseur +;-> %0 +;<- +;============================ +ShowInt PROC FAR + ARG integer:dword=taille + push bp + mov bp,sp + push 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 charout + dec ax + jnz @@showinteger + pop esi edx cx bx eax + pop bp + retf taille + +showbuffer db 50 dup (0FFh) +ShowInt ENDP + +;==========SHOWFIXINT=========== +;Affiche un entier %0 aprés le curseur de taille %1 +;-> %0 un entier +;<- +;=========================================== +ShowfixInt PROC FAR + ARG sizeofint:word,integer:dword=taille + push bp + mov bp,sp + push 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 charout + dec ax + jnz @@showinteger + pop di esi edx cx bx eax + pop bp + retf taille +ShowfixInt ENDP + +;==========SHOWINTR=========== +;Affiche un entier %0 aprés le curseur de taille %1 +;-> %0 %1 +;<- +;============================= +ShowIntR PROC FAR + ARG sizeofint:word,integer:dword=taille + push bp + mov bp,sp + push 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 charout + dec ax + jnz @@showinteger + pop di esi edx cx bx eax + pop bp + retf taille +ShowIntR ENDP + +;==========SHOWSIGNED=========== +;Affiche un entier %0 de taille %1 aprés le curseur +;-> %0 un entier, %1 la taille +;<- +;============================================== +Showsigned PROC FAR + ARG sizeofint:word,integer:dword=taille + push bp + mov bp,sp + push 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: + push '-' + call showchar +@@notsigned: + push edx + call showint + pop edx cx ebx + pop bp + retf taille +Showsigned ENDP + +;==========SHOWHEX=========== +;Affiche un nombre hexadécimal %0 de taille %1 aprés le curseur +;-> %0 un entier, %1 la taille +;<- +;============================ +ShowHex PROC FAR + ARG sizeofint:word,integer:dword=taille + push bp + mov bp,sp + push ax bx cx edx + mov edx,[integer] + mov cx,[sizeofint] + shr ax,2 + sub cx,32 + neg cx + shl edx,cl + mov ax,[sizeofint] + shr ax,2 +@@Hexaize: + rol edx,4 + mov bx,dx + and bx,0fh + mov cl,cs:[bx+offset Tab] + call charout + dec al + jnz @@Hexaize + pop edx cx bx ax + pop bp + retf taille + +Tab db '0123456789ABCDEF' +ShowHex ENDP + +;==========SHOWBIN=========== +;Affiche un nombre binaire %0 de taille %1 aprés le curseur +;-> %0 un entier, %1 la taille +;<- +;============================ +Showbin PROC FAR + ARG sizeofint:word,integer:dword=taille + push bp + mov bp,sp + push 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 charout + dec al + jnz @@binaize + pop edx cx ax + pop bp + retf taille +Showbin ENDP + +;==========SHOWBCD=========== +;Affiche un nombre en BCD %0 de taille %1 aprés le curseur +;-> %0 un entier, %1 la taille +;<- +;============================ +ShowBCD PROC FAR + ARG sizeofint:word,integer:dword=taille + push bp + mov bp,sp + push ax cx edx + mov edx,[integer] + mov ax,[sizeofint] + 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 charout + dec al + jnz @@BCDaize + pop edx cx ax + pop bp + retf taille +ShowBCD ENDP + +;==========SHOWSTRING=========== +;Affiche une chaine de caractère pointée par ds:%1 aprés le curseur +;-> ds:%1 pointeur chaine type pascal +;<- +;=============================== +showstring PROC FAR + ARG pointer:word=taille + push bp + mov bp,sp + push bx cx si + mov si,[pointer] + mov bl,[si] +@@strinaize: + inc si + mov cl,[si] + call charout + dec bl + jnz @@strinaize + pop si cx bx + pop bp + retf taille +showstring ENDP + +;==========SHOWSTRING0=========== +;Affiche une chaine de caractère pointée par ds:%1 aprés le curseur +;-> ds:%1 pointeur chaine type zéro terminal +;<- +;================================ +showstring0 PROC FAR + ARG pointer:word=taille + push bp + mov bp,sp + push cx si + mov si,[pointer] +@@strinaize0: + mov cl,[si] + cmp cl,0 + je @@no0 + call charout + inc si + jmp @@strinaize0 +@@no0: + pop si cx + pop bp + retf taille +showstring0 ENDP + +;Envoie le caractère CL vers l'ecran +charout PROC NEAR +push ax bx cx + mov ah,0Eh + mov bl,7 + mov al,cl + int 10h +pop cx bx ax +ret + + ;push ax dx + ;mov ah,7 + ;mov dl,cl + ;int 47h + ;pop dx ax + ;ret +charout ENDP + +end start From 5a26295438d1b540ac046fcbafff3888d006b7c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Mon, 22 Nov 2004 20:53:22 +0000 Subject: [PATCH 19/53] fix: rajout du commutateur \ dans la fonction print et correction d'un bogue lors du passage d'un unique parametre a cette fonction --- lib/video.asm | 146 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 125 insertions(+), 21 deletions(-) diff --git a/lib/video.asm b/lib/video.asm index ceed80c..a9bef09 100644 --- a/lib/video.asm +++ b/lib/video.asm @@ -54,7 +54,7 @@ print PROC FAR ARG pointer:word=taille push bp mov bp,sp - push cx si di + push ax bx cx si di xor di,di mov si,[pointer] @@strinaize0: @@ -63,6 +63,8 @@ print PROC FAR je @@no0 cmp cl,'%' je @@special + cmp cl,'\' + je @@special2 @@showit: call charout inc si @@ -215,19 +217,129 @@ print PROC FAR 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,'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 cl,[si+2] + add cl,[si+3] + sub cl,'0' + sub cl,'0' + mov ah,21 + int 47h + add si,4 + jmp @@strinaize0 + +@@setvideomode: + mov al,[si+2] + add al,[si+3] + sub al,'0' + sub al,'0' + mov ah,0 + int 47h + add si,4 + jmp @@strinaize0 + +@@setfont: + mov cl,[si+2] + add cl,[si+3] + sub cl,'0' + sub cl,'0' + mov ah,3 + int 47h + add si,4 + jmp @@strinaize0 + +@@showline: + mov ah,6 + int 47h + add si,2 + jmp @@strinaize0 + +@@clearscreen: + mov ah,2 + int 47h + add si,2 + jmp @@strinaize0 + +@@savestate: + mov ah,40 + int 47h + add si,2 + jmp @@strinaize0 + +@@restorestate: + mov ah,41 + int 47h + add si,2 + jmp @@strinaize0 + +@@enablescroll: + mov ah,42 + int 47h + add si,2 + jmp @@strinaize0 +@@disablescroll: + mov ah,43 + int 47h + add si,2 + jmp @@strinaize0 + +@@goto: + mov bh,[si+2] + add bh,[si+3] + sub bh,'0' + sub bh,'0' + ; + mov bl,[si+5] + add bl,[si+6] + sub bl,'0' + sub bl,'0' + mov ah,25 + int 47h + add si,7 + jmp @@strinaize0 @@no0: add di,bp add di,2 - mov cx,ss:[bp+2] - mov ss:[di+2],cx - mov cx,ss:[bp+4] + 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 cx,ss:[bp] - mov ss:[di],cx mov bp,di - pop di si cx + pop di si cx bx ax mov sp,bp pop bp retf @@ -831,20 +943,12 @@ showstring0 ENDP ;Envoie le caractère CL vers l'ecran charout PROC NEAR -push ax bx cx - mov ah,0Eh - mov bl,7 - mov al,cl - int 10h -pop cx bx ax -ret - - ;push ax dx - ;mov ah,7 - ;mov dl,cl - ;int 47h - ;pop dx ax - ;ret + push ax dx + mov ah,7 + mov dl,cl + int 47h + pop dx ax + ret charout ENDP end start From ccf990b89673dce2698b0e5d609c48ff28d6574b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Tue, 23 Nov 2004 00:38:12 +0000 Subject: [PATCH 20/53] fix: correction d'un bogue dans le passage de parametre avec \ dans print Ajout des fonction d'affichage d'entier dans print Ajout de gestion de pointeur long pour les chaines --- lib/video.asm | 128 +++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 105 insertions(+), 23 deletions(-) diff --git a/lib/video.asm b/lib/video.asm index a9bef09..be12a61 100644 --- a/lib/video.asm +++ b/lib/video.asm @@ -78,9 +78,13 @@ print PROC FAR mov cl,byte ptr [si+1] cmp cl,'c' je @@showchar - cmp cl,'i' + cmp cl,'u' je @@showint - cmp cl,'j' + cmp cl,'v' + je @@showfixint + cmp cl,'w' + je @@showintr + cmp cl,'i' je @@showsigned cmp cl,'h' je @@showhex @@ -119,6 +123,24 @@ print PROC FAR add di,4 jmp @@strinaize0 +@@showfixint: + push dword ptr [offset pointer+di+2] + add di,4 + push word ptr [offset pointer+di+2] + add di,2 + call showfixint + add si,2 + jmp @@strinaize0 + +@@showintr: + push dword ptr [offset pointer+di+2] + add di,4 + push word ptr [offset pointer+di+2] + add di,2 + call showintr + add si,2 + jmp @@strinaize0 + @@showsigned: call @@Chosesize call showsigned @@ -135,18 +157,40 @@ print PROC FAR jmp @@strinaize0 @@showstring: + cmp byte ptr [si+2],'P' + je @@showstringpointer push word ptr [offset pointer+di+2] call showstring add si,2 add di,2 jmp @@strinaize0 +@@showstringpointer: + push ds + mov ds,[offset pointer+di+2+2] + push word ptr [offset pointer+di+2] + call showstring + add si,3 + add di,4 + pop ds + jmp @@strinaize0 @@showstring0: + cmp byte ptr [si+2],'P' + je @@showstring0pointer push word ptr [offset pointer+di+2] call showstring0 add si,2 add di,2 jmp @@strinaize0 +@@showstring0pointer: + push ds + mov ds,[offset pointer+di+2+2] + push word ptr [offset pointer+di+2] + call showstring0 + add si,3 + add di,4 + pop ds + jmp @@strinaize0 @@showbcd: call @@Chosesize @@ -217,7 +261,7 @@ print PROC FAR add si,3 push cx retn - + @@special2: cmp byte ptr [si+1],'\' jne @@notshowit2 @@ -229,6 +273,8 @@ print PROC FAR je @@showline cmp cl,'g' je @@goto + cmp cl,'h' + je @@gotox cmp cl,'c' je @@color cmp cl,'m' @@ -247,61 +293,89 @@ print PROC FAR je @@setfont clc jmp @@no0 - + @@color: - mov cl,[si+2] + mov ah,[si+2] + sub ah,'0' + mov cl,ah + shl cl,3 + add cl,ah + add cl,ah add cl,[si+3] sub cl,'0' - sub cl,'0' mov ah,21 int 47h add si,4 jmp @@strinaize0 - + +@@gotox: + mov ah,24 + int 47h + mov ah,[si+2] + sub ah,'0' + mov bh,ah + shl bh,3 + add bh,ah + add bh,ah + add bh,[si+3] + sub bh,'0' + mov ah,25 + int 47h + add si,4 + jmp @@strinaize0 + @@setvideomode: - mov al,[si+2] + 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' - sub al,'0' mov ah,0 int 47h add si,4 jmp @@strinaize0 - + @@setfont: - mov cl,[si+2] + mov ah,[si+2] + sub ah,'0' + mov cl,ah + shl cl,3 + add cl,ah + add cl,ah add cl,[si+3] sub cl,'0' - sub cl,'0' mov ah,3 int 47h add si,4 jmp @@strinaize0 - + @@showline: mov ah,6 int 47h add si,2 jmp @@strinaize0 - + @@clearscreen: mov ah,2 int 47h add si,2 jmp @@strinaize0 - + @@savestate: mov ah,40 int 47h add si,2 jmp @@strinaize0 - + @@restorestate: mov ah,41 int 47h add si,2 jmp @@strinaize0 - + @@enablescroll: mov ah,42 int 47h @@ -313,16 +387,24 @@ print PROC FAR int 47h add si,2 jmp @@strinaize0 - + @@goto: - mov bh,[si+2] + mov ah,[si+2] + sub ah,'0' + mov bh,ah + shl bh,3 + add bh,ah + add bh,ah add bh,[si+3] - sub bh,'0' sub bh,'0' ; - mov bl,[si+5] - add bl,[si+6] - sub bl,'0' + mov ah,[si+2] + sub ah,'0' + mov bl,ah + shl bl,3 + add bl,ah + add bl,ah + add bl,[si+3] sub bl,'0' mov ah,25 int 47h From 263a874d768ceab19793dfb59387192e95a4f982 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Tue, 23 Nov 2004 00:43:29 +0000 Subject: [PATCH 21/53] feat: reprogrammation en utilisant la librairie video --- programs/detect.asm | 224 +++++++++++++++---------------------------- programs/memoire.asm | 122 +++++++++++------------ programs/souris.asm | 18 +++- 3 files changed, 150 insertions(+), 214 deletions(-) diff --git a/programs/detect.asm b/programs/detect.asm index 4e4f52d..df773de 100644 --- a/programs/detect.asm +++ b/programs/detect.asm @@ -6,54 +6,29 @@ smart org 0h include ..\include\pci.h +include ..\include\mem.h start: +header exe <,1,0,,,offset imports,,> + +realstart: call getpciinfos -mov pciversion,bx -mov nbbus,cl -mov pcitype,al +mov [pciversion],bx +mov [nbbus],cl +mov [pcitype],al -mov si,offset msg -mov ah,13 -int 47h -mov ah,6 -int 47h - -mov si,offset pcivers -mov ah,13 -int 47h xor edx,edx -mov dx,bx -xchg dl,dh -mov cx,8 -mov ah,0Ah -int 47h -mov si,offset poin -mov ah,13 -int 47h -shr dx,8 -mov ah,0Ah -int 47h -mov si,offset pcivers2 -mov ah,13 -int 47h -mov ah,6 -int 47h - -mov si,offset nbbuses -mov ah,13 -int 47h -xor edx,edx -mov dl,nbbus +mov dl,[nbbus] inc dl -mov ah,08 -int 47h -mov ah,06 -int 47h +push edx +mov dx,[pciversion] +push edx +mov dx,[pciversion] +shr dx,8 +push edx +push offset msg +call [print] -mov si,offset typesof -mov ah,13 -int 47h mov di,offset types mov bx,7 mov al,pcitype @@ -61,89 +36,50 @@ vote: bt ax,bx jnc nowas shl bx,1 -mov si,[di+bx] -mov ah,13 -int 47h -mov si,offset spac -mov ah,13 -int 47h +push word ptr [di+bx] +call [print] shr bx,1 nowas: dec bx jns vote -mov ah,6 -int 47h +push offset return +call [print] xor ax,ax xor cx,cx -mov di,offset infos +mov si,offset infos search: +mov di,si call Getallfunctionsinfos jc stopthis - -mov bp,cx -push cx di -mov si,offset msg1 -mov ah,13 -int 47h -mov cx,16 -xor edx,edx -mov dx,[di+pci.device] -mov ah,0Ah -int 47h -mov si,offset msg2 -mov ah,13 -int 47h -mov dx,[di+pci.vendor] -mov ah,0Ah -int 47h -mov si,offset msg4 -mov ah,13 -int 47h -xor dx,dx -mov dl,al -mov cx,8 -mov ah,0Ah -int 47h -mov ah,07 -mov dl,'.' -int 47h -mov dx,bp -xor dh,dh -mov cx,8 -mov ah,0Ah -int 47h -mov ah,07 -mov dl,'.' -int 47h -mov dx,bp -shr dx,8 -mov cx,8 -mov ah,0Ah -int 47h -mov ah,05h -int 47h -mov si,offset msg3 -mov ah,13 -int 47h -mov cl,[di+pci.class] -mov ch,[di+pci.subclass] -mov di,offset temp -call getpciclass -mov si,di -mov ah,13 -int 47h -mov si,offset poin -mov ah,13 -int 47h -mov di,offset temp +mov dh,[si+pci.subclass] +mov dl,[si+pci.class] +;sousclasse +mov di,offset subclasse call getpcisubclass -mov si,di -mov ah,13 -int 47h -mov ah,06 -int 47h -pop di cx +push di +;classe +mov di,offset classe +call getpciclass +push di +;fonction +mov dl,ch +push edx +;device +mov dl,cl +push edx +;bus +mov dl,al +push edx +;device +mov dx,[si+pci.device] +push edx +;vendeur +mov dx,[si+pci.vendor] +push edx + +push offset msg2 +call [print] inc ch cmp ch,7 @@ -157,31 +93,24 @@ xor cl,cl inc al cmp al,16 jbe search -db 0CBh +retf -msg3 db ' Classe :',0 -msg1 db 'Peripherique :',0 -msg2 db ' Constructeur :',0 -msg4 db ' iD :',0 -msg db 'COS2000 hardware detecteur V1.6',0 -pcivers db 'BIOS PCI version ',0 -pcivers2 db ' a ete detecte !',0 -nbbuses db 'Nombre de bus : ',0 -typesof db 'Caracterisques PCI: ',0 -poin db '.',0 -virg db ', ',0 -spac db ' ',0 -temp db 128 dup (0) +msg db "COS2000 hardware detecteur V1.6\lBIOS PCI version %hB.%hB a ete detecte !\lNombre de bus : %u\lCaracterisques PCI: ",0 +msg2 db "Peripherique :%hW Constructeur :%hW Id :%hB.%hB.%hB Classe :%0.%0\l",0 +return db "\l",0 +classe db 128 dup (0) +subclasse db 128 dup (0) types dw config1 dw config2 - dw poin - dw poin + dw null + dw null dw config3 dw config4 - dw poin - dw poin - + dw null + dw null + +null db 'indefini',0 config1 db 'Config Mechanism 1',0 config2 db 'Config Mechanism 2',0 config3 db 'Special Cycle Mechanism 1',0 @@ -194,12 +123,12 @@ infos db 256 dup (0) ;fonction 0-7 bus 0-255 device 0-31 -;renvoie en es:di de classe cl +;renvoie en es:di de classe dl getpciclass: -push ax cx si di ds es +push ax cx dx si di ds es push es push di -mov di,cx +mov di,dx and di,0FFh shl di,1 mov di,[offset classes+di] @@ -217,27 +146,27 @@ pop ds pop di pop es rep movsb -pop es ds di si cx ax +pop es ds di si dx cx ax ret -;renvoie en es:di la sous-classe de ch et de classe cl +;renvoie en es:di la sous-classe de dh et de classe dl getpcisubclass: -push ax cx si di ds es +push ax cx dx si di ds es push es push di -mov di,cx +mov di,dx and di,0FFh shl di,1 mov di,[offset classesd+di] -xchg ch,cl -xor ch,ch -cmp cx,80h +xchg dh,dl +xor dh,dh +cmp dx,80h jne suiteac mov di,offset divers jmp found suiteac: -shl cx,1 -add di,cx +shl dx,1 +add di,dx mov di,[di] found: mov cx,0FFh @@ -254,7 +183,7 @@ pop ds pop di pop es rep movsb -pop es ds di si cx ax +pop es ds di si dx cx ax ret divers db 'divers',0 @@ -538,5 +467,10 @@ pci_type2_detect: jne endofdetectiontype2 endofdetectiontype2: ret + +imports: + db "VIDEO.LIB::print",0 +print dd 0 + dw 0 end start diff --git a/programs/memoire.asm b/programs/memoire.asm index b95a9b1..b9d1890 100644 --- a/programs/memoire.asm +++ b/programs/memoire.asm @@ -9,81 +9,73 @@ include ..\include\mem.h include ..\include\divers.h start: -mov si,offset msg -mov ah,13 -int 47h -mov ah,6 -int 47h -mov si,offset menu -mov ah,13 -int 47h -mov ah,6 -int 47h +header exe <,1,0,,,offset imports,,> + +realstart: +push offset msg +call [print] + xor cx,cx listmcb: mov ah,4 int 49h jc fino inc cx -mov ah,18h -int 47h -push gs -pop ds -mov bh,0 -mov si,MB.Names -mov ah,14h -int 47h -mov bh,15 -xor edx,edx -mov dx,ds:[MB.Sizes] -shl edx,4 -mov ah,0Fh -int 47h -mov bh,24 -cmp ds:[MB.IsResident],true -push cs -pop ds -jne notresident -mov si,offset resident -mov ah,14h -int 47h -jmp suitelistmcb -notresident: -mov si,offset nonresident -mov ah,14h -int 47h -suitelistmcb: -mov bh,30 -cmp gs:[MB.Reference],0 -je next -cmp gs:[MB.Reference],1000h -jb next -mov ax,gs:[MB.Reference] -dec ax -dec ax -mov ds,ax -mov si,MB.Names -mov ah,14h -int 47h -next: -mov bh,46 -xor edx,edx + +;placement mémoire mov dx,gs inc dx inc dx -push cx -mov cx,16 -mov ah,11h -int 47h -pop cx -mov ah,6h -int 47h +push edx + +;parent +cmp gs:[MB.Reference],0 +je next +mov dx,gs:[MB.Reference] +dec dx +dec dx +push dx +push offset MB.Names +jmp suitemn +next: +push cs +push offset none +suitemn: + +;Resident +cmp gs:[MB.IsResident],true +jne notresident +push offset resident +jmp suitelistmcb +notresident: +push offset nonresident +suitelistmcb: + +;taille memoire +xor edx,edx +mov dx,gs:[MB.Sizes] +shl edx,4 +push 6 +push edx + +;nom +push gs +push offset MB.Names + +push offset line +call [print] + jmp listmcb fino: db 0CBh -resident db 'oui',0 -nonresident db 'non',0 -msg db 'Memory manager V1.5',0 -menu db 'Nom | Taille | Res | Parent | Mem',0 - +resident db "oui",0 +nonresident db "non",0 +line db "%0P\h15%w\h24%0\h30%0P\h46%hW\l",0 +msg db "Memory manager V1.5\lNom Taille Res Parent Mem\l",0 +none db ".",0 +imports: + db "VIDEO.LIB::print",0 +print dd 0 + dw 0 + end start diff --git a/programs/souris.asm b/programs/souris.asm index 0550e34..cd02e54 100644 --- a/programs/souris.asm +++ b/programs/souris.asm @@ -5,13 +5,23 @@ smart org 0h +include ..\include\mem.h + start: -mov si,offset message -mov ah,13 -int 47h +header exe <,1,0,,,offset imports,,> + +realstart: mov ah,2 int 74h -db 0CBh +push offset message +call [print] +retf message db 'Activation de la souris',0 + +imports: + db "VIDEO.LIB::print",0 +print dd 0 + dw 0 + end start From 4a8effdfde9e01324795b42cfc2900a9f1c63d40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Tue, 23 Nov 2004 00:52:49 +0000 Subject: [PATCH 22/53] =?UTF-8?q?feat:=20fonction=20showcorrectionedint=20?= =?UTF-8?q?renom=C3=A9=20en=20showintl=20Ajout=20a=20l'export=20des=20fonc?= =?UTF-8?q?tion=20showintl=20et=20showintr?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/video.asm | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/lib/video.asm b/lib/video.asm index be12a61..4872426 100644 --- a/lib/video.asm +++ b/lib/video.asm @@ -43,6 +43,10 @@ exports: dw showstring db "showstring0",0 dw showstring0 + db "showintr",0 + dw showintr + db "showintl",0 + dw showintl dw 0 ;================PRINT============== @@ -128,7 +132,7 @@ print PROC FAR add di,4 push word ptr [offset pointer+di+2] add di,2 - call showfixint + call showintl add si,2 jmp @@strinaize0 @@ -458,7 +462,7 @@ ShowDate PROC FAR and dx,11111b push edx push 2 - call showfixint + call showintl push '/' call showchar mov dx,[date] @@ -466,7 +470,7 @@ ShowDate PROC FAR and dx,111b push edx push 2 - call showfixint + call showintl push '/' call showchar mov dx,[date] @@ -475,7 +479,7 @@ ShowDate PROC FAR add dx,1956 push edx push 4 - call showfixint + call showintl pop edx pop bp retf taille @@ -497,7 +501,7 @@ ShowTime PROC FAR and dx,11111b push edx push 2 - call showfixint + call showintl push ':' call showchar mov dx,[time] @@ -505,7 +509,7 @@ ShowTime PROC FAR and dx,111111b push edx push 2 - call showfixint + call showintl push ':' call showchar mov dx,[time] @@ -513,7 +517,7 @@ ShowTime PROC FAR shl dx,1 push edx push 2 - call showfixint + call showintl pop edx pop bp retf taille @@ -744,12 +748,12 @@ ShowInt PROC FAR showbuffer db 50 dup (0FFh) ShowInt ENDP -;==========SHOWFIXINT=========== -;Affiche un entier %0 aprés le curseur de taille %1 -;-> %0 un entier +;==========SHOWINTL=========== +;Affiche un entier %0 aprés le curseur de taille %1 caractère centré a gauche +;-> %0 un entier % taille en caractères ;<- -;=========================================== -ShowfixInt PROC FAR +;=============================== +ShowIntL PROC FAR ARG sizeofint:word,integer:dword=taille push bp mov bp,sp @@ -791,13 +795,13 @@ ShowfixInt PROC FAR pop di esi edx cx bx eax pop bp retf taille -ShowfixInt ENDP +showintl ENDP ;==========SHOWINTR=========== -;Affiche un entier %0 aprés le curseur de taille %1 -;-> %0 %1 +;Affiche un entier %0 aprés le curseur de taille %1 caractère centré a droite +;-> %0 un entier % taille en caractères ;<- -;============================= +;=============================== ShowIntR PROC FAR ARG sizeofint:word,integer:dword=taille push bp @@ -846,7 +850,7 @@ ShowIntR ENDP ;Affiche un entier %0 de taille %1 aprés le curseur ;-> %0 un entier, %1 la taille ;<- -;============================================== +;=============================== Showsigned PROC FAR ARG sizeofint:word,integer:dword=taille push bp From 2dbdb9c4c8e95b8b95859f9dd436960b1d44d555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Tue, 23 Nov 2004 20:37:41 +0000 Subject: [PATCH 23/53] fix: correction d'un bogue dans la fonction verifysector et prise en compte du flag equal a la sortie du pilote --- noyau/disque.asm | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/noyau/disque.asm b/noyau/disque.asm index 145ef2b..1431647 100644 --- a/noyau/disque.asm +++ b/noyau/disque.asm @@ -36,15 +36,23 @@ noerrorint: itsok: push bp mov bp,sp ;On prend sp dans bp pour adresser la pile - jnc noerror ;La fonction appelée a renvoyer une erreur : Flag CARRY ? + pushf + jnc noerror ;La fonction appelée a renvoyer une erreur : Flag CARRY ? or byte ptr [bp+6],1b;Si oui on le retranscrit sur le registre FLAG qui sera dépilé lors du IRET ;xor eax,eax ;mov ax,cs ;On récupère le segment et l'offset puis en renvoie l'adresse physique ;shl eax,4 ;de l'erreur. ;add ax,cs:current - jmp endofint ;on termine l'int + jmp endofscan ;on termine l'int noerror: and byte ptr [bp+6],0FEh;Si pas d'erreur on efface le Bit CARRY du FLAG qui sera dépilé lors du IRET +endofscan: + popf + jne noequal + or byte ptr [bp+6],1000000b + jmp endofint +noequal: + and byte ptr [bp+6],0BFh endofint: pop bp sti ;On réactive les interruptions logiciellement @@ -53,7 +61,7 @@ endofint: current dw 0 ;Mot temporaire qui contient l'adresse de la fonction appelée tables dw readsector dw writesector - dw verifysector2 + dw verifysector dw initdrive dw loadfile dw compressrle @@ -901,13 +909,6 @@ invert: pop cx si ret -VerifySector2: - call verifysector - jne nook - or byte ptr [bp+6],10b -nook: - ret - ;=============DecompressRle (Fonction 05H)============== ;decompress ds:si en es:di taille bp d‚compress‚ cx compress‚ ;-> AH=5 From c461ede7f1a6357f4fddacd272928b9c19c0154d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Tue, 23 Nov 2004 20:38:58 +0000 Subject: [PATCH 24/53] feat: reprogrammation en utilisant la librairie video --- programs/verifier.asm | 241 +++++++++++++++++------------------------- 1 file changed, 98 insertions(+), 143 deletions(-) diff --git a/programs/verifier.asm b/programs/verifier.asm index b29aeff..a662e4a 100644 --- a/programs/verifier.asm +++ b/programs/verifier.asm @@ -4,155 +4,110 @@ org 0h +include ..\include\mem.h + start: - mov ah,28h - int 47H - mov ax,0002 - int 47H -replay: - mov ah,2 - int 47h -mov ah,21 -mov cl,7 -int 47h - xor di,di - xor cx,cx - mov ah,20 - mov bx,1D00h - mov si,offset Msg - int 47h - mov ah,20 - mov bx,0231h - mov si,offset msgapp - int 47h - mov bp,1000h +header exe <,1,0,,,offset imports,,> + +realstart: + mov ah,28h + int 47h + push offset msg + call [print] + mov bp,1000h + xor di,di + xor cx,cx + xor edx,edx VerifAll: - mov ah,1 - int 16h - jz nokey - cmp al,' ' - je enend + mov ah,1 + int 16h + jz nokey + cmp al,' ' + je enend nokey: - mov ax,cx - inc ax - mov si,100 - mul si - mov si,2880 - div si - xor edx,edx - mov dx,ax - mov ah,15 - mov bx,0A14h - int 47h - mov ah,13 - mov si,offset po - int 47h - mov ah,15 - mov dx,cx - inc dx - mov bx,0A10h - int 47h - mov ah,13 - mov si,offset Msg2 - int 47h - mov ah,8 - mov edx,0 - mov dx,di - int 47h - mov ah,13 - mov si,offset Msg3 - int 47h - call gauge - mov ah,2 - int 48h - jc errors - je noprob - inc di - noprob: - inc cx - cmp cx,2880 - jnz verifall + mov dx,di + push edx + mov dx,cx + inc dx + push edx + mov ax,cx + inc ax + mov si,100 + mul si + mov si,2880 + div si + mov dx,ax + push edx + push offset msg2 + call [print] + call gauge + mov ah,2 + int 48h + jc errors + je noprob + inc di +noprob: + inc cx + cmp cx,2880 + jnz verifall enend: - cmp di,0 - je noatall -mov bx,0E09h -mov ah,20 -mov si,offset error2 -int 47h - jmp someof - noatall: -mov bx,0E09h -mov ah,20 -mov si,offset noerror -int 47h - someof: - mov ah,0 - int 16h - mov ah,29h - int 47H - db 0CBH - errors: -mov ah,21 -mov cl,4 -int 47h -mov bx,0D09h -mov ah,20 -mov si,offset errore -int 47h -mov ah,0 -int 16h - mov ah,29h - int 47H -db 0CBH + cmp di,0 + je noatall + push offset error2 + call [print] + jmp someof +noatall: + push offset noerror + call [print] +someof: + mov ah,0 + int 16h + mov ah,29h + int 47H + retf +errors: + push offset error + call [print] + mov ah,0 + int 16h + mov ah,29h + int 47H + retf -errore db 'Erreur avec le lecteur de disquette !',0 -noerror db 'Pas de secteurs defectueux, appuyez sur une touche pour continuer',0 -error2 db 'Le disque est defectueux, appuyez sur une touche pour quitter',0 -po db ' %',0 -msgapp db '',0 -msg db '- Test de surface du disque -',0 -msg2 db ' cluster testes. ',0 -msg3 db ' cluster defectueux. ',0 -;->Increment CX +error db '\g10,10Erreur avec le lecteur de disquette !',0 +error2 db '\g10,10Le disque est defectueux, appuyez sur une touche pour quitter',0 +noerror db '\g10,10Pas de secteurs defectueux, appuyez sur une touche pour continuer',0 +msg db '\m02\e\c07\g29,00- Test de surface du disque -\g02,49',0 +msg2 db '\g10,20%u %%\g10,16%u cluster testes. \h34%u cluster defectueux. ',0 + gauge: -push ax bx cx dx si ds -push cs -pop ds -mov ax,cx -mul sizes -div max -mov dx,ax -mov bl,oldvalue -xor bh,bh -mov byte ptr [offset gaugetxt+bx],'Û' -cmp bx,0 -jnz nono2 -mov ah,21 -mov cl,8 -int 47h -mov bx,xy -mov ah,20 -mov si,offset gaugetxt -int 47h -mov ah,21 -mov cl,7 -int 47h -nono2: -mov bx,dx -xor bh,bh -mov byte ptr [offset gaugetxt+bx],0 -mov oldvalue,bl -mov bx,xy -mov ah,20 -mov si,offset gaugetxt -int 47h -pop ds si dx cx bx ax -ret -oldvalue db 0 -max dw 2880 -sizes dw 50 -xy dw 0A12h -gaugetxt db 'ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ',0 + push ax dx + mov ax,cx + mul sizeof + div max + xor edx,edx + mov dx,sizeof + sub dx,ax + push dx + push 'Û' + mov dx,ax + push dx + push 'Û' + push offset gauges + call [print] + pop dx ax + retn + +max dw 2879 +sizeof dw 50 + +gauges db '\g10,18\c05%cM\c07%cM',0 + +imports: + db "VIDEO.LIB::print",0 +print dd 0 + dw 0 + End Start From ca530927a78ccadcf953b2244622c8f5fca2da04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Tue, 23 Nov 2004 20:42:54 +0000 Subject: [PATCH 25/53] feat: mise a jour de l'exemple pour delocalisation fonction dans la librairie video.lib --- programs/exem-ce.asm | 12 ++++++------ programs/exem-lib.asm | 24 ------------------------ 2 files changed, 6 insertions(+), 30 deletions(-) diff --git a/programs/exem-ce.asm b/programs/exem-ce.asm index b653f8c..87d3313 100644 --- a/programs/exem-ce.asm +++ b/programs/exem-ce.asm @@ -10,19 +10,19 @@ start: header exe <,1,0,,,offset imports,offset exports,> realstart: +push offset message call [affiche] call [waitkey] -call [bye] retf +message db 'Appel de la librairie video !',0 + imports: - db "EXEM-LIB.LIB::affiche",0 -affiche dd 0 + db "VIDEO.LIB::print",0 +affiche dd 0 db "EXEM-LIB.LIB::waitkey",0 -waitkey dd 0 - db "EXEM-LIB.LIB::bye",0 -bye dd 0 +waitkey dd 0 dw 0 exports: diff --git a/programs/exem-lib.asm b/programs/exem-lib.asm index 4c84b49..7c3d5d9 100644 --- a/programs/exem-lib.asm +++ b/programs/exem-lib.asm @@ -9,41 +9,17 @@ include ..\include\mem.h start: header exe <,1,0,,,offset imports,offset exports,> -getvar: -push ds -push cs -pop ds -mov si,offset mes -mov ah,13 -int 47h -pop ds -retf -mes db 'c un test qui illustre les appels de fonctions externes !!!',0 getvar2: mov ax,0 int 16h retf -mettar: -push ds -push cs -pop ds -mov si,offset mes2 -mov ah,13 -int 47h -pop ds -retf -mes2 db 'Cela fonctionne.',0 imports: exports: - db "affiche",0 - dw mettar db "waitkey",0 dw getvar2 - db "bye",0 - dw getvar dw 0 end start From 85f66f34d510ab19429a7de58fbe540590af09d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Thu, 25 Nov 2004 00:04:02 +0000 Subject: [PATCH 26/53] feat: reprogrammation en utilisant la librairie video --- programs/gestion.asm | 154 ++++++++++--------------------------------- 1 file changed, 33 insertions(+), 121 deletions(-) diff --git a/programs/gestion.asm b/programs/gestion.asm index e5361a9..b949ddb 100644 --- a/programs/gestion.asm +++ b/programs/gestion.asm @@ -5,131 +5,40 @@ smart org 0h +include ..\include\mem.h include ..\include\fat.h start: -mov ah,2 -int 47h -mov ah,25 -mov bx,0 -int 47h -mov ah,21 -mov cl,70h -int 47h -mov ah,13 -mov si,offset msg1 -int 47h -mov ah,21 -mov cl,7 -int 47h -mov ah,13 -mov si,offset prompt -int 47h -mov ah,13 -mov si,offset infos -int 47h -mov ah,13 -mov si,offset prompt -int 47h +header exe <,1,0,,,offset imports,,> + +realstart: +push offset msg1 +call [print] + mov ah,3 int 48h xor bp,bp mov di,offset bufferentry -mov si,di mov ah,7 int 48h jc nofiles go: -test [si+Entries.FileAttr],00010000b -je notdirectory -mov ah,21 -mov cl,4 -int 47h -jmp notall -notdirectory: -cmp [si+Entries.FilExt],'C' -jne notexe -cmp [si+Entries.FilExt+1],'E' -jne notexe -cmp [si+Entries.FilExt+2],' ' -jne notexe -mov ah,21 -mov cl,5 -int 47h -jmp notall -notexe: -cmp [si+Entries.FilExt],'S' -jne notsys -cmp [si+Entries.FilExt+1],'Y' -jne notsys -cmp [si+Entries.FilExt+2],'S' -jne notsys -mov ah,21 -mov cl,0Ah -int 47h -jmp notall -notsys: -mov ah,21 -mov cl,7h -int 47h -notall: -mov ah,46 -int 47h -mov ah,05 -int 47h -int 47h -int 47h -mov ah,44 -mov dx,[si+Entries.FileDateCrea] -int 47h -mov ah,05 -int 47h -int 47h -int 47h -mov ah,45 -mov dx,[si+Entries.FileTimeCrea] -int 47h -mov ah,05 -int 47h -int 47h -int 47h -mov ah,44 -mov dx,[si+Entries.FileDate] -int 47h -mov ah,05 -int 47h -int 47h -int 47h -mov ah,45 -mov dx,[si+Entries.FileTime] -int 47h -mov ah,05 -int 47h -int 47h -int 47h -mov ah,48 -mov edx,[si+Entries.FileSize] -int 47h -mov ah,05 -int 47h -int 47h -int 47h -mov ah,47 -mov dl,[si+Entries.FileAttr] -int 47h -mov ah,6 -int 47h +push word ptr [di+Entries.FileAttr] +push dword ptr [di+Entries.FileSize] +push word ptr [di+Entries.FileTime] +push word ptr [di+Entries.FileDate] +push word ptr [di+Entries.FileTimeCrea] +push word ptr [di+Entries.FileDateCrea] +push di +push offset line +call [print] inc bp mov ah,8 int 48h jnc go nofiles: -mov ah,21 -mov cl,70h -int 47h -mov ah,13 -mov si,offset menu -int 47h +push offset menu +call [print] mov xx,1 mov xxold,2 call Select @@ -139,7 +48,7 @@ int 16h cmp ah,50h jne tre1 cmp xx,bp - je endof + ja endof inc xx call select jmp endof @@ -157,14 +66,11 @@ tre2: tre3: cmp ah,59 jne tre4 - jmp start + jmp realstart tre4: cmp ah,67 jne endof - mov ah,15h - mov cl,7 - int 47h - db 0CBh + retf ;selectionne la ligne xx Select: @@ -186,12 +92,18 @@ ret xx dw 1 xxold dw 0 -menu db '[F1] Lire disque [F9] Quitter ',0 -msg1 db ' Gestionnaire de fichier Version 1.5 ',0 -msg2 db 'Programme en cours de chargement',0 -prompt db '--------------------------------------------------------------------------------',0 -infos db 'Nom Ext. Date creation Date modification Taille Attributs',0 - +menu db '\c70 [F1] Lire disque [F9] Quitter \c07',0 +msg1 db '\e\g00,00\c70 Gestionnaire de fichier Version 1.5 ' + db '\g00,01\c07--------------------------------------------------------------------------------' + db '\g00,02Nom Ext. Date creation Date modification Taille Attributs' + db '\g00,03--------------------------------------------------------------------------------\l',0 +line db '\c07%n %d %t %d %t %z %a\l',0 bufferentry db 512 dup (0) + +imports: + db "VIDEO.LIB::print",0 +print dd 0 + dw 0 + end start From b0835bc5a70dd538c5c17239d83e4afa60206a2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Thu, 25 Nov 2004 00:04:04 +0000 Subject: [PATCH 27/53] fix: modification couleur lors du comptage: erreur dans le codage des couleur qui etait en decimal --- programs/test.asm | 288 +++++++++++----------------------------------- 1 file changed, 64 insertions(+), 224 deletions(-) diff --git a/programs/test.asm b/programs/test.asm index c1fdcc3..5b24e0b 100644 --- a/programs/test.asm +++ b/programs/test.asm @@ -2,195 +2,54 @@ .486 smart .code + org 0h +include ..\include\mem.h start: +header exe <,1,0,,,offset imports,,> + +realstart: mov ah,28h int 47h -mov ax,0001 -int 47h -mov ah,2 -int 47h -mov si,offset text1 ;titre -mov ah,13 -int 47h -mov ah,6 -int 47h -int 47h -mov ah,21 -mov cl,3 -int 47h -mov ah,13 -mov si,offset text2 -int 47h -mov ah,6 -int 47h -mov edx,2612182686 -mov ah,8 -int 47h -mov ah,6 -int 47h -mov edx,7576534 -mov ah,8 -int 47h -mov ah,6 -int 47h -mov ah,21 -mov cl,4 -int 47h -mov si,offset text3 -mov ah,13 -int 47h -mov ah,6 -int 47h -mov edx,-6876253 -mov cx,32 -mov ah,9 -int 47h -mov ah,6 -int 47h -mov edx,-311212323 -mov cx,32 -mov ah,9 -int 47h -mov ah,6 -int 47h -mov ah,21 -mov cl,5 -int 47h -mov ah,13 -mov si,offset text4 -int 47h -mov ah,6 -int 47h -mov edx,0892325457 -mov cx,16 -mov ah,10 -int 47h -mov ah,6 -int 47h -mov edx,0236514 -mov ah,10 -mov cx,32 -int 47h -mov ah,6 -int 47h -mov ah,21 -mov cl,6 -int 47h -mov ah,13 -mov si,offset text5 -int 47h -mov ah,6 -int 47h -mov edx,3762182686 -mov ah,11 -mov cx,32 -int 47h -mov ah,6 -int 47h -mov edx,2182686 -mov ah,11 -mov cx,16 -int 47h -mov ah,6 -int 47h -mov ah,21 -mov cl,7 -int 47h -mov ah,13 -mov si,offset text6 -int 47h -mov ah,6 -int 47h -mov dl,'h' -mov ah,7 -int 47h -mov ah,6 -int 47h -mov dl,'@' -mov ah,7 -int 47h -mov ah,6 -int 47h -mov ah,21 -mov cl,8 -int 47h -mov ah,13 -mov si,offset text7 -int 47h -mov ah,6 -int 47h -mov si,offset textt -mov ah,13 -int 47h -mov ah,6 -int 47h -mov si,offset texttt -mov ah,13 -int 47h -mov ah,6 -int 47h -mov ah,21 -mov cl,9 -int 47h -mov ah,13 -mov si,offset text71 -int 47h -mov ah,6 -int 47h -mov dx,0BF30h -mov ah,44 -int 47h -mov ah,6 -int 47h -mov dx,0B0B6h -mov ah,44 -int 47h -mov ah,6 -int 47h -mov ah,13 -mov si,offset text72 -int 47h -mov ah,6 -int 47h -mov edx,8601h -mov ah,45 -int 47h -mov ah,6 -int 47h -mov dx,0B0B6h -mov ah,45 -int 47h -mov ah,6 -int 47h +push word ptr 0FFFFh +push dword ptr 652201 +push dword ptr 1545454545 +push word ptr 1523 +push word ptr 2041 +push offset zero +push offset fixe +push word ptr 5 +push word ptr 'i' +push word ptr 'a' +push dword ptr 5041 +push dword ptr 125645 +push dword ptr 5041 +push dword ptr 125645 +push dword ptr 5041 +push dword ptr 125645 +push offset message +call [print] mov ax,0 int 16h - - mov ah,2 int 47h mov ah,30 int 47h mov ah,2 int 47h -mov ah,21 -mov cl,5 -int 47h + mov cx,200 go1: mov ah,30 int 47h mov ah,33 int 47 -mov ah,20 -xor bh,bh -inc bl -mov si,offset text8 -int 47h +push offset textdemo1 +call [print] call put mov ah,30 int 47h @@ -199,20 +58,14 @@ int 47h dec cx jnz go1 -mov ah,21 -mov cl,7 -int 47h mov cx,200 go2: -mov si,offset text9 mov ah,30 int 47h mov ah,33 int 47h -mov ah,6 -int 47h -mov ah,13 -int 47h +push offset textdemo2 +call [print] call put mov ah,30 int 47h @@ -221,20 +74,14 @@ int 47h dec cx jnz go2 -mov ah,21 -mov cl,9 -int 47h mov cx,200 go3: -mov si,offset text10 mov ah,30 int 47h mov ah,33 int 47h -xor bh,bh -inc bl -mov ah,20 -int 47h +push offset textdemo3 +call [print] call put mov ah,30 int 47h @@ -247,14 +94,8 @@ mov ah,30 int 47h mov ah,2 int 47h -mov bx,040Dh -mov si,offset texte1 -mov ah,20 -int 47h -mov si,offset texte2 -inc bl -mov ah,20 -int 47h +push offset texte2 +call [print] mov ah,30 int 47h mov ah,2 @@ -262,9 +103,6 @@ int 47h mov ah,30 int 47h -mov cl,12 -mov ah,21 -int 47h mov bp,255 xor edx,edx go4: @@ -273,32 +111,28 @@ int 47h mov ah,33 int 47h inc edx -mov ah,11 -mov cx,16 -int 47h -mov ah,6 -int 47h +push edx +push offset texte3 +call [print] mov ah,30 int 47h mov ah,33 int 47h dec bp jnz go4 -mov ah,14h -xor bx,bx -mov si,offset texte3 -int 47h +push offset texte4 +call [print] mov ax,0 int 16h mov ah,29h int 47h -db 0CBh +retf put: call random mov di,dx and di,4096-2 -mov si,offset text11 +mov si,offset fond call showstring2 ret @@ -322,24 +156,27 @@ mov cs:randseed,dx pop dx cx ax ret -texttt db 'Texte',0 -textt db 'Divers',0 -text1 db ' D‚monstration de l''utilisation de la bibliothŠque VIDEO',0 -text2 db 'Nombre entier :',0 -text3 db 'Nombre sign‚ :',0 -text4 db 'Nombre h‚xad‚cimal :',0 -text5 db 'Nombre binaire :',0 -text6 db 'CaractŠres :',0 -text7 db 'Texte :',0 -text71 db 'Date :',0 -text72 db 'Heure :',0 -text8 db 'Scrolling Scrolling Scrolling Scrolling Scrolling Scrolling Scrolling Scrolling',0 -text9 db 'Vertical Vertical Vertical Vertical Vertical Vertical Vertical Vertical',0 -text10 db 'Rapide Rapide Rapide Rapide Rapide Rapide Rapide Rapide',0 -text11 db 'Echange rapide de pages Vid‚o',0 -texte1 db 'Routine d''affichage Ultra Rapide Agissant sur le Mat‚riel',0 -texte2 db 'Possibilit‚ de r‚aliser des effets de superposition',0 -texte3 db 'Sauvegarde et restauration de l''ecran',0 +zero db 'Chaine a z‚ro terminal',0 +fixe db 20,'Chaine a taille fixe' +message db "\m01\e\c07\h01D‚monstration de la librairie VIDEO.LIB\l\l" + db "\c01Nombres entiers ou sign‚s (%%u/%%i):\l%u\l%iD\l" + db "\c02Nombre hexad‚cimaux (%%h):\l%hD\l%hW\l" + db "\c03Nombres Binaires (%%b):\l%bD\l%bB\l" + db "\c04Caracteres simples ou multiples (%%c/%%cM):\l%c\l%cM\l" + db "\c05Chaines a z‚ro terminal ou fixes (%%0/%%s):\l%s\l%0\l" + db "\c06Dates et heures (%%t/%%d):\l%t\l%d\l" + db "\c07Nombre a echelle automatique (%%z):\l%z\l%z\l" + db "\c08Attributs de fichiers (%%a):\l%a",0 + +fond db 16,'Ceci est un fond' +textdemo1 db '\c05Scrolling Scrolling Scrolling Scrolling Scrolling Scrolling Scrolling Scrolling\l',0 +textdemo2 db '\c07Vertical Vertical Vertical Vertical Vertical Vertical Vertical Vertical\l',0 +textdemo3 db '\c09Rapide Rapide Rapide Rapide Rapide Rapide Rapide Rapide\l',0 +texte1 db 'Echange rapide de pages Vid‚o',0 +texte2 db '\g04,13Routine d''affichage Ultra Rapide Agissant sur le Mat‚riel' + db '\g04,14Possibilit‚ de r‚aliser des effets de superposition',0 +texte3 db '\c04%bD\l',0 +texte4 db '\g01,00Sauvegarde et restauration de l''ecran (%%s/%%r)',0 showstring2: push es bx cx si di @@ -358,6 +195,9 @@ strinaize4: pop di si cx bx es ret - +imports: + db "VIDEO.LIB::print",0 +print dd 0 + dw 0 end start From 708590c85e91b1afd61f2d560c6152a2ac4fb4ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Thu, 25 Nov 2004 00:04:50 +0000 Subject: [PATCH 28/53] fix: correction de divers bogue dans la fonction print --- lib/video.asm | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/lib/video.asm b/lib/video.asm index 4872426..2af1806 100644 --- a/lib/video.asm +++ b/lib/video.asm @@ -98,7 +98,7 @@ print PROC FAR je @@showstring cmp cl,'0' je @@showstring0 - cmp cl,'d' + cmp cl,'y' je @@showbcd cmp cl,'z' je @@showsize @@ -114,11 +114,26 @@ print PROC FAR jmp @@no0 @@showchar: + cmp byte ptr [si+2],'M' + je @@showmultchar push word ptr [offset pointer+di+2] call showchar add si,2 add di,2 jmp @@strinaize0 +@@showmultchar: + mov cx,[offset pointer+di+2+2] + cmp cx,0 + je @@nextfunc +@@showcharx: + push word ptr [offset pointer+di+2] + call showchar + dec cx + jnz @@showcharx +@@nextfunc: + add si,3 + add di,4 + jmp @@strinaize0 @@showint: push dword ptr [offset pointer+di+2] @@ -299,12 +314,9 @@ print PROC FAR jmp @@no0 @@color: - mov ah,[si+2] - sub ah,'0' - mov cl,ah - shl cl,3 - add cl,ah - add cl,ah + mov cl,[si+2] + sub cl,'0' + shl cl,4 add cl,[si+3] sub cl,'0' mov ah,21 @@ -402,13 +414,13 @@ print PROC FAR add bh,[si+3] sub bh,'0' ; - mov ah,[si+2] + mov ah,[si+5] sub ah,'0' mov bl,ah shl bl,3 add bl,ah add bl,ah - add bl,[si+3] + add bl,[si+6] sub bl,'0' mov ah,25 int 47h From 0070bf3d5dd19fa2fa4d66d7522a68d7cd115fd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Sun, 28 Nov 2004 22:55:03 +0000 Subject: [PATCH 29/53] feat: reprogrammation en utilisant la librairie video --- programs/editeur.asm | 124 ++++++++++++++++++------------------------- programs/volume.asm | 114 +++++++++++++++++---------------------- 2 files changed, 102 insertions(+), 136 deletions(-) diff --git a/programs/editeur.asm b/programs/editeur.asm index 856f0bf..df5cd7f 100644 --- a/programs/editeur.asm +++ b/programs/editeur.asm @@ -1,10 +1,16 @@ .model tiny -.386c +.486 +smart .code + org 0h - - + +include ..\include\mem.h + start: +header exe <,1,0,,,offset imports,,> + +realstart: mov ax,0305h mov bx,0008h int 16h @@ -43,62 +49,43 @@ Adres: int 47h mov bh,infos mov edi,ebp - mov ah,21 - mov cl,7 - int 47h lines: + xor edx,edx + mov dx,di + push edx mov edx,edi shr edx,4*4 shl edx,4*3 - mov cx,16 - mov ah,10 - int 47h - mov si,offset dep - mov ah,13 - int 47h + push edx + push offset spaces + call [print] mov dx,di - mov ah,10 - int 47h - mov ah,13 - mov si,offset spaces - int 47h - mov ah,5 - int 47h mov al,infos+1 - mov cl,7 - mov ah,21 - int 47h mov esi,edi doaline: mov edx,edi shr edx,4*4 shl edx,4*3 mov fs,dx - mov dl,fs:[di] - mov ah,10 - mov cl,8 - int 47h - mov ah,5 - int 47h + push dword ptr fs:[di] + push 8 + call [showhex] + push ' ' + call [showchar] inc edi dec al jnz doaline mov edi,esi - mov si,offset spaces - mov ah,13 - int 47h + push offset spaces2 + call [print] mov al,infos+1 - mov ah,21 - mov cl,7 - int 47h doaline2: mov edx,edi shr edx,4*4 shl edx,4*3 mov fs,dx - mov dl,fs:[di] - mov ah,7 - int 47h + push word ptr fs:[di] + call [showchar] inc edi dec al jnz doaline2 @@ -110,14 +97,12 @@ doaline2: int 47h jmp lines outes: - mov ah,21 - mov cl,112 - int 47h mov bh,0 mov bl,infos - mov si,offset menu - mov ah,14h + mov ah,25 int 47h + push offset menu + call [print] waitkey: mov ax,0 int 16h @@ -153,18 +138,13 @@ outes: suit6: cmp ax,4100h jne suit7 - mov ah,21 - mov cl,116 - int 47h mov dword ptr [pope],'TIDE' + mov bh,0 mov bl,infos - xor bh,bh - mov si,offset menu - mov ah,14h - int 47h - mov ah,21 - mov cl,7 + mov ah,25 int 47h + push offset menu + call [print] mov ax,0B800h mov es,ax mov xxyy2,3 @@ -243,28 +223,20 @@ writs: cmp ch,cl je no push si ax - mov ah,25 + mov bh,0 mov bl,infos - xor bh,bh - int 47h - mov ah,21 - mov cl,117 - int 47h - mov si,offset msg - mov ah,13 + mov ah,25 int 47h + push offset msg + call [print] mov ax,0 int 16h + mov bh,0 mov bl,infos - xor bh,bh mov ah,25 int 47h - mov ah,21 - mov cl,116 - int 47h - mov ah,13 - mov si,offset menu - int 47h + push offset menu + call [print] pop bx si mov es:[bx-1],edi mov es:[si-1],dx @@ -289,8 +261,7 @@ cursor: jne adres mov ah,29h int 47h - db 0CBH ; +++++++ - ret + retf calc1: push ax dx si @@ -377,14 +348,25 @@ yy dw 0 xxyy dw 3 xxyy2 dw 3 -msg db 'Erreur : zone non modifiable (ROM) pressez une touche pour continuer ',0 -menu db 'haut/bas [F1/2] Offset [F3/4] Segment [F5/6] Mode F7, Quitter F8 MODE ' +msg db '\c74Erreur : zone non modifiable (ROM) pressez une touche pour continuer ',0 +menu db '\c70haut/bas [F1/2] Offset [F3/4] Segment [F5/6] Mode F7, Quitter F8 MODE ' pope db 'VUE ',0 -spaces db ' ³ ',0 +spaces db '\c02%hW:%hW \c04| \c07',0 +spaces2 db '\c04 | \c07',0 showbuffer db 35 dup (0FFh) oldmode db 0 infos db 40 dup (0) + +imports: + db "VIDEO.LIB::print",0 +print dd 0 + db "VIDEO.LIB::showhex",0 +showhex dd 0 + db "VIDEO.LIB::showchar",0 +showchar dd 0 + dw 0 + end start diff --git a/programs/volume.asm b/programs/volume.asm index f300a94..7faae2c 100644 --- a/programs/volume.asm +++ b/programs/volume.asm @@ -1,10 +1,16 @@ .model tiny -.386c +.486 +smart .code + org 0h - - + +include ..\include\mem.h + start: +header exe <,1,0,,,offset imports,,> + +realstart: mov ax,0305h mov bx,0008h int 16h @@ -38,12 +44,8 @@ Adres: mov bl,infos xor bh,bh int 47h - mov ah,21 - mov cl,116 - int 47h - mov ah,13 - mov si,offset errordisk - int 47h + push offset errordisk + call [print] mov ax,0 int 16h noerror: @@ -71,52 +73,32 @@ Adres: int 47h mov bh,infos mov di,bp - mov ah,21 - mov cl,7 - int 47h lines: - mov dx,sect - mov cx,16 - mov ah,10 - int 47h - mov si,offset dep - mov ah,13 - int 47h + xor edx,edx mov dx,di - mov ah,10 - int 47h - mov ah,13 - mov si,offset spaces - int 47h - mov ah,5 - int 47h + push edx + mov dx,sect + push edx + push offset spaces + call [print] mov al,infos+1 - mov cl,7 - mov ah,21 - int 47h mov si,di doaline: - mov dl,[di+offset buffer] - mov ah,10 - mov cl,8 - int 47h - mov ah,5 - int 47h + push dword ptr [di+offset buffer] + push 8 + call [showhex] + push ' ' + call [showchar] inc di dec al jnz doaline mov di,si - mov si,offset spaces - mov ah,13 - int 47h + push offset spaces2 + call [print] mov al,infos+1 - mov ah,21 - mov cl,7 - int 47h doaline2: - mov dl,[di+offset buffer] - mov ah,7 - int 47h + push word ptr [di+offset buffer] + call [showchar] inc di dec al jnz doaline2 @@ -128,14 +110,12 @@ doaline2: int 47h jmp lines outes: - mov ah,21 - mov cl,112 - int 47h mov bh,0 mov bl,infos - mov si,offset menu - mov ah,14h + mov ah,25 int 47h + push offset menu + call [print] waitkey: mov ax,0 int 16h @@ -183,19 +163,12 @@ outes: cmp ax,4100h jne suit7 mov dword ptr [pope],'TIDE' + mov bh,0 mov bl,infos - xor bh,bh mov ah,25 int 47h - mov ah,21 - mov cl,116 - int 47h - mov si,offset menu - mov ah,13 - int 47h - mov ah,21 - mov cl,7 - int 47h + push offset menu + call [print] mov ax,0B800h mov es,ax mov xxyy2,3 @@ -290,8 +263,7 @@ cursor: jne adres2 mov ah,29h int 47H - db 0CBH - ret + retf calc1: push ax dx si @@ -375,16 +347,28 @@ xx dw 0 yy dw 0 xxyy dw 3 xxyy2 dw 3 -errordisk db 'Une erreur est apparue sur le lecteur, appuyez sur une touche ',0 -menu db 'Haut&Bas [F1/2] Secteur [F3/4] Charger/Sauver [F5/6] Mode [F7] Quit. [F8] ' -pope db 'VIEW',0 -spaces db ' ³ ',0 + +errordisk db '\c74Une erreur est apparue sur le lecteur, appuyez sur une touche ',0 +menu db '\c70Haut&Bas [F1/2] Secteur [F3/4] Charger/Sauver [F5/6] Mode [F7] Quit. [F8] ' +pope db 'VUE ',0 +spaces db '\c02%hW:%hW \c04| \c07',0 +spaces2 db '\c04 | \c07',0 showbuffer db 35 dup (0FFh) oldmode db 0 infos db 40 dup (0) buffer db 2048 dup (0) +imports: + db "VIDEO.LIB::print",0 +print dd 0 + db "VIDEO.LIB::showhex",0 +showhex dd 0 + db "VIDEO.LIB::showchar",0 +showchar dd 0 + dw 0 + + end start From a3008f75fe52a304ef574dfcd6c99254667545aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Mon, 29 Nov 2004 22:40:48 +0000 Subject: [PATCH 30/53] feat: utilisation de la fonction exec pour le chargement de commande.ce Initialisation du pilote disque --- noyau/systeme.asm | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/noyau/systeme.asm b/noyau/systeme.asm index ca67b2b..20919f7 100644 --- a/noyau/systeme.asm +++ b/noyau/systeme.asm @@ -140,6 +140,8 @@ suites: ;initialisation des MCBs mov ah,0 int 49h + mov ah,3 + int 48h push memorystart pop gs mov ah,10 @@ -154,19 +156,9 @@ suites: call showstr mov si,offset prompt call showstr - call projfile + mov ah,18 + int 48h jc nopromptload - push es - push 0000h - push 7202h - popf - push es - push es - push es - pop ds - pop fs - pop gs - db 0CBh nopromptload: mov si,offset prompte From c8330e5e86ea80341c4a486c2107ddbcf7bef77f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Mon, 29 Nov 2004 22:41:00 +0000 Subject: [PATCH 31/53] feat: reprogrammation en utilisant la librairie video --- commande/commande.asm | 361 ++++++++++++++---------------------------- 1 file changed, 120 insertions(+), 241 deletions(-) diff --git a/commande/commande.asm b/commande/commande.asm index 1383691..b228c1f 100644 --- a/commande/commande.asm +++ b/commande/commande.asm @@ -10,32 +10,11 @@ include ..\include\mem.h include ..\include\divers.h start: - push cs - push cs - push cs - push cs - pop ds - pop es - pop fs - pop gs - mov ah,21 - mov cl,7 - int 47h - mov ah,3 - int 48h - mov ax,0002 - int 47h - mov ah,2 - int 47h - mov ah,6 - int 47h - mov ah,6 - int 47h - mov ah,42 - int 47h - mov ah,13 - mov si,offset msg - int 47h +header exe <,1,0,,,offset imports,,> + +realstart: + push offset msginit + call [print] xor bp,bp mov dl,' ' call setdelimiter0 @@ -48,11 +27,8 @@ noret: mov ah,16 mov di,offset dir int 48h - mov si,di - mov ah,13 - int 47h - mov si,offset prompt - int 47h + push offset prompt + call [print] mov di,offset buffer waitchar: mov ax,0 @@ -62,9 +38,8 @@ waitchar: jne norr cmp bp,0 je waitchar - mov ah,13 - mov si,cs:[bp-8] - int 47h + push word ptr cs:[bp-8] + call [print] push cs pop es call copy0 @@ -84,14 +59,13 @@ norr: je waitchar mov [di],al inc di - mov dl,al - mov ah,7 - int 47h + push ax + call [showchar] jmp waitchar escape: cmp di,offset buffer je waitchar - mov ah,18h + mov ah,24 int 47h mov dx,offset buffer mov cx,di @@ -99,20 +73,21 @@ escape: js waitchar je waitchar sub bh,cl - mov ah,19h + mov ah,25 int 47h mov di,offset buffer mov byte ptr [di],0 backspace: cmp di,offset buffer je waitchar - mov ah,18h + mov ah,24 int 47h dec bh - mov dl,' ' - mov ah,0Eh + mov ah,25 int 47h - mov ah,19h + push ' ' + call [showchar] + mov ah,25 int 47h dec di mov byte ptr [di],0 @@ -186,27 +161,23 @@ noaddext: xor bp,bp jmp replay reallyerror: - mov ah,13 - mov si,offset Error_Syntax - int 47h - mov ah,13 - mov si,cs:[bp-8] - int 47h + push offset Error_Syntax + call [print] + push word ptr cs:[bp-8] + call [print] jmp replay errorprec: - mov ah,13 - mov si,offset derror - int 47h + push offset derror + call [print] jmp replay Code_Exit: pop ax - db 0CBh + retf Code_Version: - mov ah,13 - mov si,offset Version_Text - int 47h + push offset Version_Text + call [print] ret Version_Text db 'Cos 2000 version 1.2Fr par Nico',0 @@ -228,8 +199,8 @@ showalls: add bx,8 cmp si,0 je endoff - mov ah,13 - int 47h + push si + call [print] mov ah,6 int 47h jmp showalls @@ -247,238 +218,138 @@ Code_Mode: int 47h ret -present db 'Le volume insere est nomme ',0 -present2 db ', Numero de serie : ',0 +present db 'Le volume insere est nomme %0, Numero de serie : %hD\l\l',0 nomdisque db 13 dup (0) Code_Dir: -mov si,offset present -mov ah,13 -int 47h +mov ah,12 +int 48h +push edx mov ah,11 mov di,offset nomdisque int 48h -mov si,di -mov ah,13 -int 47h -mov si,offset present2 -mov ah,13 -int 47h -mov ah,12 -int 48h -mov ah,10 -mov cx,32 -int 47h -mov ah,6 -int 47h -mov ah,6 -int 47h -xor ebp,ebp +push di +push offset present +call [print] +xor bp,bp mov di,offset bufferentry -mov si,di mov ah,7 int 48h jc nofiles go: -mov ah,46 -int 47h -mov ah,05 -int 47h -int 47h -int 47h -mov ah,44 -mov dx,[si+Entries.FileDateCrea] -int 47h -mov ah,05 -int 47h -int 47h -int 47h -mov ah,45 -mov dx,[si+Entries.FileTimeCrea] -int 47h -mov ah,05 -int 47h -int 47h -int 47h -mov ah,44 -mov dx,[si+Entries.FileDate] -int 47h -mov ah,05 -int 47h -int 47h -int 47h -mov ah,45 -mov dx,[si+Entries.FileTime] -int 47h -mov ah,05 -int 47h -int 47h -int 47h -mov ah,48 -mov edx,[si+Entries.FileSize] -int 47h -mov ah,05 -int 47h -int 47h -int 47h -mov ah,47 -mov dl,[si+Entries.FileAttr] -int 47h -mov ah,6 -int 47h +push word ptr [di+Entries.FileAttr] +push dword ptr [di+Entries.FileSize] +push word ptr [di+Entries.FileTime] +push word ptr [di+Entries.FileDate] +push word ptr [di+Entries.FileTimeCrea] +push word ptr [di+Entries.FileDateCrea] +push di +push offset line +call [print] inc bp mov ah,8 int 48h jnc go nofiles: -mov edx,ebp -mov ah,6 -int 47h -mov ah,8 -int 47h -mov si,offset filess -mov ah,13 -int 47h +push ebp +push offset filess +call [print] ret bufferentry db 32 dup (0) -filess db ' Fichier(s) au total',0 +line db '\c07%n %d %t %d %t %z %a\l',0 +filess db '\l\l%u Fichier(s) au total\l',0 changing db 'Changement de repertoire vers ',0 code_cd: mov cx,0 call gettypeditem0 - push si - mov si,offset changing - mov ah,13 - int 47h - pop si - int 47h - mov ah,6 - int 47h + push offset changing + call [print] mov si,di mov ah,13 int 48h jnc okchange - mov si,offset errorchanging - mov ah,13 - int 47h + push offset errorchanging + call [print] okchange: ret -errorchanging db 'Impossible d''atteindre ce dossier',0 +errorchanging db '\c04Impossible d''atteindre ce dossier',0 code_refresh: mov ah,3 int 48h jnc okrefresh - mov si,offset errorrefreshing - mov ah,13 - int 47h + push offset errorrefreshing + call [print] ret okrefresh: -mov si,offset present -mov ah,13 -int 47h +mov ah,12 +int 48h +push edx mov ah,11 mov di,offset nomdisque int 48h -mov si,di -mov ah,13 -int 47h -mov si,offset present2 -mov ah,13 -int 47h -mov ah,12 -int 48h -mov ah,10 -mov cx,32 -int 47h -mov ah,6 -int 47h - ret -errorrefreshing db 'Impossible de lire le support',0 +push di +push offset present +call [print] +ret +errorrefreshing db '\c04Impossible de lire le support',0 -extcom db '.CE ',0 +extcom db '.CE',0 Code_Mem: -mov si,offset msgs -mov ah,13 -int 47h -mov ah,6 -int 47h -mov ah,6 -int 47h -mov si,offset menu -mov ah,13 -int 47h -mov ah,6 -int 47h -mov ah,18h -int 47h +push offset msg +call [print] xor cx,cx listmcb: mov ah,4 int 49h jc fino inc cx -mov ah,18h -int 47h -push gs -pop ds -mov bh,0 -mov si,MB.Names -mov ah,14h -int 47h -mov bh,15 -xor edx,edx -mov dx,ds:[MB.Sizes] -shl edx,4 -mov ah,0Fh -int 47h -mov bh,24 -cmp ds:[MB.IsResident],true -push cs -pop ds -jne notresident -mov si,offset resident -mov ah,14h -int 47h -jmp suitelistmcb -notresident: -mov si,offset nonresident -mov ah,14h -int 47h -suitelistmcb: -mov bh,30 -cmp gs:[MB.Reference],0 -je next -cmp gs:[MB.Reference],1000h -jb next -mov ax,gs:[MB.Reference] -dec ax -dec ax -mov ds,ax -mov si,MB.Names -mov ah,14h -int 47h -next: -mov bh,46 -xor edx,edx +;placement mémoire mov dx,gs inc dx inc dx -push cx -mov cx,16 -mov ah,11h -int 47h -mov ah,6h -int 47h -pop cx +push edx +;parent +cmp gs:[MB.Reference],0 +je next +mov dx,gs:[MB.Reference] +dec dx +dec dx +push dx +push offset MB.Names +jmp suitemn +next: +push cs +push offset none +suitemn: +;Resident +cmp gs:[MB.IsResident],true +jne notresident +push offset resident +jmp suitelistmcb +notresident: +push offset nonresident +suitelistmcb: +;taille memoire +xor edx,edx +mov dx,gs:[MB.Sizes] +shl edx,4 +push 6 +push edx +;nom +push gs +push offset MB.Names +push offset line2 +call [print] jmp listmcb fino: ret -resident db 'oui',0 -nonresident db 'non',0 -msgs db 'Plan de la memoire',0 -menu db 'Nom Taille Res Parent Mem',0 +resident db "oui",0 +nonresident db "non",0 +line2 db "%0P\h15%w\h24%0\h30%0P\h46%hW\l",0 +msg db "Plan de la memoire\l\lNom Taille Res Parent Mem\l",0 +none db ".",0 ;converti le jeux scancode/ascii en fr ax->ax @@ -618,10 +489,10 @@ Help_Dir db 0 Help_refresh db 0 Help_cd db 0 Help_Mem db 0 -derror db 'Erreur de Syntaxe !',0 -Error_Syntax db 'La commande ou l''executable n''existe pas ! F1 pour ',0 -prompt db '>',0 -msg db 'Interpreteur de commande COS V1.9',0 +derror db '\c04Erreur de Syntaxe !',0 +Error_Syntax db '\c04La commande ou l''executable n''existe pas ! F1 pour ',0 +prompt db '\c07>',0 +msginit db '\m02\e\c07\l\lInterpreteur de commande COS V1.9',0 include str0.asm @@ -629,5 +500,13 @@ dir db 32 dup (0) buffer db 256 dup (0) buffer2 db 256 dup (0) +imports: + db "VIDEO.LIB::print",0 +print dd 0 + db "VIDEO.LIB::showhex",0 +showhex dd 0 + db "VIDEO.LIB::showchar",0 +showchar dd 0 + dw 0 end start From ad3b0fe9e4b2a34a77dee01bf1e39359feaeb626 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Tue, 30 Nov 2004 19:26:47 +0000 Subject: [PATCH 32/53] feat: prise en charge du format CE pour F10 (reprise commande) Changement du fonctionnement de F12 en utilisant pas la librairie video ni le pilote video --- noyau/clavier.asm | 276 ++++++++++++++++++++-------------------------- 1 file changed, 119 insertions(+), 157 deletions(-) diff --git a/noyau/clavier.asm b/noyau/clavier.asm index 5ce5b63..9fd3cdd 100644 --- a/noyau/clavier.asm +++ b/noyau/clavier.asm @@ -5,6 +5,8 @@ smart org 0h +include ..\include\mem.h + start: jmp tsr @@ -15,7 +17,6 @@ tsr: db 2eh,0ffh,1eh dw offsets cli - add dword ptr cs:popes,1 cmp cs:isstate,1 je endofforce mov cs:isstate,1 @@ -43,12 +44,22 @@ F10: mov si,offset com mov ah,5 int 49h - mov cs:isstate,0 + pop ax + pop ax + pop ax push gs - push 0100h - db 0CBh + push gs + push gs + pop ds + pop es + pop fs + push gs + push size exe + sti + mov cs:[isstate],0 + retf -com db 'COMMANDE.EXE',0 +com db 'COMMANDE.CE',0 F11: push ax di es @@ -70,17 +81,10 @@ notabove: f12: - -showreg: -pushf pushad -mov bp,sp -mov ax,ss:[bp+28h] -mov cs:[csr],ax -mov ax,ss:[bp+26h] -mov cs:[ipr],ax -mov ax,ss:[bp+2Ah] -mov cs:[flr],ax +pushf +push ds +mov cs:[eaxr],eax mov cs:[ebxr],ebx mov cs:[ecxr],ecx mov cs:[edxr],edx @@ -88,169 +92,139 @@ 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 ds -pop fs push cs pop ds -mov ah,28h -int 47h -mov ax,0002 -int 47H -mov ah,2 -int 47h -mov si,offset etat -mov ah,13 -int 47h -mov ah,6 -int 47h -mov ah,6 -int 47h +mov si,offset sep +call Showstr mov si,offset reg mov di,offset regdata mov bx,7 showregs: -cmp byte ptr cs:[si+4],":" +cmp byte ptr cs:[si+6],":" jne endshowregs -mov ah,13 -int 47h -cmp byte ptr cs:[si+3],"g" -je segsss -cmp byte ptr cs:[si+2]," " +call Showstr +cmp byte ptr cs:[si+4]," " je segsss mov edx,cs:[di] mov cx,32 -mov ah,0Ah -int 47h +call Showhex add di,4 jmp showmax segsss: -xor edx,edx mov dx,cs:[di] mov cx,16 -mov ah,0Ah -int 47h -push si -mov ah,13 -mov si,offset blank -int 47h -pop si +call Showhex add di,2 showmax: -add si,7 -mov ebp,edx +add si,9 +mov bp,dx push si mov si,offset beginds -mov ah,13 -int 47h -pop si +call showstr +mov si,bp mov cx,8 mov al,0 -mov bx,bp letshow: -mov dl,fs:[bx] -inc bx -mov ah,0Ah -int 47h +mov dl,ds:[si] +inc si +call showhex inc al cmp al,10 jb letshow -push si mov si,offset ende -mov ah,13 -int 47h +call showstr mov si,offset begines -mov ah,13 -int 47h -pop si -mov bx,bp +call showstr +mov si,bp mov cx,8 mov al,0 letshow2: -mov dl,es:[bx] -inc bx -mov ah,0Ah -int 47h +mov dl,es:[si] +inc si +call showhex inc al cmp al,10 jb letshow2 -push si mov si,offset ende -mov ah,13 -int 47h -mov si,offset beginint -mov ah,13 -int 47h +call showstr pop si -mov edx,ebp -mov ah,8 -int 47h -push si -mov si,offset endint -mov ah,13 -int 47h -pop si -mov ah,6 -int 47h jmp showregs endshowregs: -mov ah,6 -int 47h -mov si,offset pile -mov ah,13 -int 47h -mov ah,6 -int 47h -mov bp,sp -mov di,0ffffh -sub di,bp -xor si,si -showstack: -mov dl,'+' -mov ah,07h -int 47h -mov ah,0Ah -mov cx,8 -mov dx,si -int 47h -mov dl,':' -mov ah,07h -int 47h -mov dx,ss:[bp+si] -mov ah,0Ah -mov cx,16 -int 47h -mov ah,06 -int 47h -inc si -inc si -cmp si,di -jb showstack - -mov ah,0ah -mov edx,cs:popes -mov cx,32 -int 47h - - - - - - +mov si,offset sep +call Showstr xor ax,ax int 16h -mov ah,29h -int 47h -popad +pop ds popf +popad jmp endof +begines db ' es[',0 +beginds db ' ds[',0 +ende db '] ',0 -popes dd 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 @@ -260,40 +234,28 @@ esir dd 0 edir dd 0 espr dd 0 ebpr dd 0 -ipr dw 0 csr dw 0 dsr dw 0 esr dw 0 fsr dw 0 gsr dw 0 ssr dw 0 -flr dw 0 -etat db ' Etat des registres processeurs',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 -reg db "eax : ",0 - db "ebx : ",0 - db "ecx : ",0 - db "edx : ",0 - db "esi : ",0 - db "edi : ",0 - db "esp : ",0 - db "ebp : ",0 - db "ip : ",0 - db "cs : ",0 - db "ds : ",0 - db "es : ",0 - db "fs : ",0 - db "gs : ",0 - db "ss : ",0 - db "flag: ",0 - -pile db 'Stack :',0 +sep db 0Ah,0Dh,'********************',0Ah,0Dh,0 -blank db ' ',0 -beginint db ' (',0 -endint db ') ',0 -begines db ' es[',0 -beginds db ' ds[',0 -ende db '] ',0 end start From 1b835928d94e9091c29fde4655010100a77432d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Tue, 30 Nov 2004 19:27:29 +0000 Subject: [PATCH 33/53] feat: passage d'un certain nombre de fonctions vers video.lib --- noyau/video.asm | 753 ++++-------------------------------------------- 1 file changed, 56 insertions(+), 697 deletions(-) diff --git a/noyau/video.asm b/noyau/video.asm index 1d144a1..0c1e13e 100644 --- a/noyau/video.asm +++ b/noyau/video.asm @@ -5,7 +5,6 @@ smart org 0h -include ..\include\bmp.h start: jmp tsr ;Saute à la routine résidente @@ -56,22 +55,22 @@ tables dw setvideomode ;Table qui contient les adresses de toutes les fonctions dw clearscreen dw setfont dw loadfont - dw showspace + dw nothings dw showline dw showchar - dw showint - dw showsigned - dw showhex - dw showbin - dw showstring - dw showstring0 - dw showcharat - dw showintat - dw showsignedat - dw showhexat - dw showbinat - dw showstringat - dw showstring0at + dw showpixel + dw getpixel + dw setxyg + dw nothings + dw nothings + dw nothings + dw nothings + dw nothings + dw nothings + dw nothings + dw nothings + dw nothings + dw nothings dw setcolor dw getcolor dw scrolldown @@ -83,23 +82,23 @@ tables dw setvideomode ;Table qui contient les adresses de toutes les fonctions dw page1to2 dw xchgPages dw savepage1 - dw changelineattr + dw nothings dw waitretrace dw getvgainfos - dw loadbmppalet - dw showbmp - dw viewbmp + dw nothings + dw nothings + dw nothings dw savedac dw restoredac dw savestate dw restorestate dw enablescroll dw disablescroll - dw showdate - dw showtime - dw showname - dw showattr - dw showsize + dw nothings + dw nothings + dw nothings + dw nothings + dw nothings dw getchar ;================================Table des modes videos (64 BYTES) ============================================ @@ -232,6 +231,24 @@ maxmode equ 9 planesize equ 64000 ;============================================Fonctions de l'int VIDEO=========================================== +;message d'erreur specifiant que les interruptions n'existent plus +nothings: + push cx si + mov si,offset msg + mov ch,04 +showit: + mov cl,cs:[si] + cmp cl,0 + je endshowit + inc si + call charout + jmp showit +endshowit: + pop si cx + ret + +msg db 'ERREUR: int 47h fonction inexistante !!!',0 + ;=============ENABLESCROLLING (Fonction 02AH)========= ;Autorise le d‚filement ;-> AH=42 @@ -249,193 +266,20 @@ planesize equ 64000 DisableScroll: mov cs:scrolling,0 ret - -;================SHOWDATE (Fonction 2Ch)============== -;Affiche la date contenu en DX -;-> AH=44 -;<- -;===================================================== -ShowDate: - push ax cx edx - mov ax,dx - mov cx,2 - xor edx,edx - mov dx,ax - and dx,11111b - call showfixint - mov dl,'/' - call showchar - mov dx,ax - shr dx,5 - and dx,111b - call showfixint - mov dl,'/' - call showchar - mov dx,ax - shr dx,8 - and dx,11111111b - add dx,1956 - mov cx,4 - call showfixint - pop edx cx ax + +;==========SHOWCHAR (Fonction 07h)=========== +;met un caractère de code ASCII DL aprés le curseur +;-> AH=7, DL code ASCII du caractère +;<- +;============================================ +showchar: + push cx + mov cl,dl + mov ch,cs:colors + call charout + pop cx ret -;================SHOWTIME (Fonction 2Dh)============== -;Affiche l'heure contenu en DX -;-> AH=45 -;<- -;===================================================== -ShowTime: - push ax cx edx - mov ax,dx - mov cx,2 - xor edx,edx - mov dx,ax - shr dx,11 - and dx,11111b - call showfixint - mov dl,':' - call showchar - mov dx,ax - shr dx,5 - and dx,111111b - call showfixint - mov dl,':' - call showchar - mov dx,ax - and dx,11111b - shl dx,1 - call showfixint - pop edx cx ax - ret - db 'ICI' - -;================SHOWNAME (Fonction 2Eh)============== -;Affiche le nom pointé par SI -;-> AH=46 -;<- -;===================================================== -ShowName: - push cx dx si - xor cx,cx -showthename: - mov dl,ds:[si] - call showchar - inc si - inc cx - cmp cx,8 - jne suiteaname - mov dl,' ' - call showchar -suiteaname: - cmp cx,8+3 - jb showthename - pop si dx cx - ret - -;================SHOWATTR (Fonction 2Fh)============== -;Affiche les attributs spécifié par DL -;-> AH=47 -;<- -;===================================================== -ShowAttr: - push dx - mov al,dl - - test al,00000001b - je noreadonly - mov dl,'L' - jmp readonly -noreadonly: - mov dl,'-' -readonly: - call showchar - - test al,00000010b - je nohidden - mov dl,'C' - jmp hidden -nohidden: - mov dl,'-' -hidden: - call showchar - - test al,00000100b - je nosystem - mov dl,'S' - jmp system -nosystem: - mov dl,'-' -system: - call showchar - - test al,00100000b - je noarchive - mov dl,'A' - jmp archive -noarchive: - mov dl,'-' -archive: - call showchar - - test al,00010000b - je nodirectory - mov dl,'R' - jmp directory -nodirectory: - mov dl,'-' -directory: - call showchar - - pop dx - ret - -;================SHOWSIZE (Fonction 30h)============== -;Affiche le nom pointé par DI -;-> AH=48 -;<- -;===================================================== -ShowSize: - push cx edx si ds - push cs - pop ds - mov cx,4 - cmp edx,1073741824 - ja giga - cmp edx,1048576*9 - ja mega - cmp edx,1024*9 - ja kilo - call showintR - mov si,offset unit - call showstring0 - jmp finsize -kilo: - shr edx,10 - call showintR - mov si,offset unitkilo - call showstring0 - jmp finsize -mega: - shr edx,20 - call showintR - mov si,offset unitmega - call showstring0 - jmp finsize -giga: - shr edx,30 - call showintR - mov si,offset unitgiga - call showstring0 -finsize: - pop ds si edx cx - ret - -unit db ' o ',0 -unitkilo db ' ko',0 -unitmega db ' mo',0 -unitgiga db ' go',0 - ;=============SetVideoMode (Fonction 00h)========= ;Fixe le mode vidéo courant a AL ;-> AH=0, AL mode d'écran @@ -763,20 +607,6 @@ reg2 dw 0100h, 0302h, 0304h, 0300h reg1 dw 0100h, 0402h, 0704h, 0300h dw 0204h, 0005h, 0406h -;==========SHOWSPACE (Fonction 05h)=========== -;met un espace aprés le curseur -;-> AH=5 -;<- -;============================================= -showspace: - push cx - mov cl,' ' - mov ch,cs:colors - call charout - clc - pop cx - ret - ;==========SHOWLINE (Fonction 06h)=============== ;remet le curseur text a la ligne avec un retour chariot ;-> AH=6 @@ -803,374 +633,6 @@ scro: pop cx bx ret -;==========SHOWCHAR (Fonction 07h)=========== -;met un caractère de code ASCII DL aprés le curseur -;-> AH=7, DL code ASCII du caractère -;<- -;============================================ -showchar: - push cx - mov cl,dl - mov ch,cs:colors - call charout - pop cx - ret - -;==========SHOWINT (Fonction 08h)=========== -;Affiche un entier EDX aprés le curseur -;-> AH=8, EDX un entier -;<- -;=========================================== -ShowInt: - push eax bx cx edx esi - xor cx,cx - mov eax,edx - 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 - mov ch,cs:colors -showinteger: - inc bx - mov cl,cs:[bx] - call charout - dec ax - jnz showinteger - pop esi edx cx bx eax - ret - -showbuffer db 50 dup (0FFh) - -;==========SHOWFIXINT (Fonction h)=========== -;Affiche un entier EDX aprés le curseur de taille cx -;-> AH=8, EDX un entier et al="cara" -;<- -;=========================================== -ShowfixInt: - push eax bx cx edx esi di - mov di,cx - xor cx,cx - mov eax,edx - mov esi,10 - mov bx,offset showbuffer+27 -decint2: - 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 decint2 - 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: - mov ch,cs:colors -showinteger2: - inc bx - mov cl,cs:[bx] - call charout - dec ax - jnz showinteger2 - pop di esi edx cx bx eax - ret - -;==========SHOWINTR (Fonction h)=========== -;Affiche un entier EDX aprés le curseur de taille cx -;-> AH=8, EDX un entier -;<- -;=========================================== -ShowIntR: - push eax bx cx edx esi di - mov di,cx - xor cx,cx - mov eax,edx - mov esi,10 - mov bx,offset showbuffer+27 -decint3: - 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 decint3 - mov ax,di - xchg cx,di - sub cx,di -rego2: - mov byte ptr cs:[bx],' ' - dec bx - dec cx - jnz rego2 - jmp finishim2 -nomuch2: - mov ax,di -finishim2: - mov ch,cs:colors -showinteger3: - inc bx - mov cl,cs:[bx] - call charout - dec ax - jnz showinteger3 - pop di esi edx cx bx eax - ret - -;==========SHOWSIGNED (Fonction 09h)=========== -;Affiche un entier EDX de taille CX aprés le curseur -;-> AH=9, EDX un entier, CX la taille -;<- -;============================================== -Showsigned: - push ebx edx - mov ebx,edx - xor edx,edx - cmp cx,8 - ja signed16 - mov dl,bl - cmp dl,7Fh - jbe notsigned - neg dl - jmp showminus -signed16: - cmp cx,16 - 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: - push dx - mov dl,'-' - call showchar - pop dx -notsigned: - call showint - pop edx ebx - ret - -;==========SHOWHEX (Fonction 0Ah)=========== -;Affiche un nombre hexadécimal EDX de taille CX aprés le curseur -;-> AH=10, EDX un entier, CX la taille -;<- -;=========================================== -ShowHex: - push ax bx cx edx - mov ax,cx - shr ax,2 - sub cx,32 - neg cx - shl edx,cl - mov ch,cs:colors -Hexaize: - rol edx,4 - mov bx,dx - and bx,0fh - mov cl,cs:[bx+offset Tab] - call charout - dec al - jnz Hexaize - pop edx cx bx ax - ret - -Tab db '0123456789ABCDEF' - -;==========SHOWBIN (Fonction 0Bh)=========== -;Affiche un nombre binaire EDX de taille CX aprés le curseur -;-> AH=11, EDX un entier, CX la taille -;<- -;=========================================== -Showbin: - push ax cx edx - mov ax,cx - sub cx,32 - neg cx - shl edx,cl - mov ch,cs:colors -binaize: - rol edx,1 - mov cl,'0' - adc cl,0 - call charout - dec al - jnz binaize - pop edx cx ax - ret - -;==========SHOWBCD (Fonction 0xh)=========== -;Affiche un nombre en BCD EDX de taille CX aprés le curseur -;-> AH=x, EDX un entier, CX la taille -;<- -;=========================================== -ShowBCD: - push ax cx edx - mov ax,cx - shr ax,2 - sub cx,32 - neg cx - shl edx,cl - mov ch,cs:colors -BCDaize: - rol edx,4 - mov cl,dl - and cl,0fh - add cl,'0' - call charout - dec al - jnz BCDaize - pop edx cx ax - ret - -;==========SHOWSTRING (Fonction 0Ch)=========== -;Affiche une chaine de caractère pointée par DS:SI aprés le curseur -;-> AH=12, DS:SI pointeur chaine type pascal -;<- -;============================================== -showstring: - push bx cx si - mov bl,[si] - mov ch,cs:colors -strinaize: - inc si - mov cl,[si] - call charout - dec bl - jnz strinaize - pop si cx bx - ret - -;==========SHOWSTRING0 (Fonction 0Dh)=========== -;Affiche une chaine de caractère pointée par DS:SI aprés le curseur -;-> AH=13, DS:SI pointeur chaine type zéro terminal -;<- -;=============================================== -showstring0: - push cx si - mov ch,cs:colors -strinaize0: - mov cl,[si] - cmp cl,0 - je no0 - call charout - inc si - jmp strinaize0 -no0: - pop si cx - ret - -;==========SHOWCHARAT (Fonction 0Eh)=========== -;met un caractère de code ASCII DL en (x;y) (BH;BL) -;-> AH=14, DL code ASCII du caractère, BH coordonnées x, BL coordonnées y -;<- -;============================================== -showcharat: - push es di - call setxy - call showchar - pop di es - ret - -;==========SHOWINTAT (Fonction 0Fh)=========== -;Affiche un entier EDX en (x;y) (BH;BL) -;-> AH=15, EDX entier, BH coordonnées x, BL coordonnées y -;<- -;============================================== -showintat: - push es di - call setxy - call showint - pop di es - ret - -;==========SHOWSIGNEDAT (Fonction 10h)=========== -;Affiche un entier EDX de taille CX aprés le curseur en (x;y) (BH;BL) -;-> AH=16, EDX entier, BH coordonnées x, BL coordonnées y -;<- -;============================================== -showsignedat: - push es di - call setxy - call showsigned - pop di es - ret - -;==========SHOWHEXAT (Fonction 11h)=========== -;Affiche un nombre hexadécimal EDX de taille CX en (x;y) (BH;BL) -;-> AH=17, EDX un entier, CX la taille, BH coordonnées x, BL coordonnées y -;<- -;============================================== -showhexat: - push es di - call setxy - call showhex - pop di es - ret - -;==========SHOWBINAT (Fonction 012h)=========== -;Affiche un nombre binaire EDX de taille CX en (x;y) (BH;BL) -;-> AH=18, EDX un entier, CX la taille, BH coordonnées x, BL coordonnées y -;<- -;============================================= -showbinat: - push es di - call setxy - call showbin - pop di es - ret - -;==========SHOWSTRINGAT (Fonction 13h)=========== -;Affiche une chaine de caractère pointée par DS:SI en (x;y) (BH;BL) -;-> AH=19, DS:SI pointeur chaine type pascal, BH coordonnées x, BL coordonnées y -;<- -;================================================ -showstringat: - push es di - call setxy - call showstring - pop di es - ret - -;==========SHOWSTRING0AT (Fonction 14h)=========== -;Affiche une chaine de caractère pointée par DS:SI en (x;y) (BH;BL) -;-> AH=20, DS:SI pointeur chaine type zéro terminal, BH coordonnées x, BL coordonnées y -;<- -;================================================= -showstring0at: - push es di - call setxy - call showstring0 - pop di es - ret - ;==========SETCOLOR (Fonction 15h)========= ;Change les attributs du texte a CL ;-> AH=21 ,CL couleur @@ -1325,7 +787,7 @@ setxy2: pop di es ret -;==========SETXYG (Fonction 0xh)========= +;==========SETXYG (Fonction 0Ah)========= ;Change les coordonnées du curseur graphique a X:BX,Y:CX ;-> AH=x, BX coordonnées x, CX coordonnées y ;<- ES:DI pointeur sur pixel avec plan de bit ajusté @@ -1353,7 +815,7 @@ setxyg: pop dx cx bx ax ret -;==========SHOWPIXEL (Fonction 0xh)========= +;==========SHOWPIXEL (Fonction 08h)========= ;Affiche un pixel de couleur AL en X:BX,Y:CX ;-> AH=x, BX coordonnées x, CX coordonnées y, AL couleur ;<- @@ -1381,7 +843,7 @@ showpixel: pop es bp di dx cx bx ax ret -;==========SHOWPIXEL (Fonction 0xh)========= +;==========SHOWPIXEL (Fonction 09h)========= ;Récupère en al la couleur du pixel de coordonnées X:BX,Y:CX ;-> AH=x, BX coordonnées x, CX coordonnées y, AL couleur ;<- @@ -1409,90 +871,6 @@ getpixel: pop es bp di dx cx bx ax ret -;==========LOADBMPPALET (Fonction 0xh)========= -;Charge la palette du BMP pointée par DS:SI -;-> AH=x, DS:SI BMP -;<- -;============================================= -loadbmppalet: - push ax bx cx dx - 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 - pop dx cx bx ax - ret - -;==========VIEWBMP (Fonction 0xh)========= -;Affiche le BMP pointée par DS:SI en X:BX, Y:CX avec la préparation de la palette -;<- AH=x, DS:SI BMP, BX coordonnées X, CX coordonnées Y -;-> -;========================================= -viewbmp: - call loadbmppalet - call showbmp - ret - -;==========SHOWBMP (Fonction 0xh)========= -;Affiche le BMP pointée par DS:SI en X:BX, Y:CX -;<- AH=x, DS:SI BMP, BX coordonnées X, CX coordonnées Y -;-> -;========================================= -showbmp: - push ax bx cx dx - cmp word ptr ds:[si+BMP_file.BMP_FileType],"MB" - jne errorshowing - mov cs:xc,bx - mov cs:yc,cx - xor cx,cx - xor bx,bx - xor dx,dx -bouclette: - mov al,[si+bx+436h] - push bx cx - sub cx,cs:yc - neg cx - mov bx,dx - add bx,cs:xc - call showpixel - pop cx bx - inc bx - inc dx - cmp dx,[si+offset BMP_File.BMP_width] - jb bouclette - xor dx,dx - inc cx - cmp cx,[si+offset BMP_File.BMP_height] - jb bouclette - clc - pop dx cx bx ax - ret - -errorshowing: - stc - pop dx cx bx ax - ret - -xc dw 0 -yc dw 0 - ;==========GETVGAINFO (Fonction 0xh)========= ;Renvoie un bloc de donnée en ES:DI sur l'état de la carte graphique ;<- AH=x, ES:DI pointeur @@ -1969,25 +1347,6 @@ jne save2 pop si dx cx ax ret -;couleur al pour ligne di A SUPPRIMER -changelineattr: -push ax bx di es -mov bx,ax -mov ax,0B800h -mov es,ax -mov ax,di -mul cs:columns -mov di,ax -shl di,1 -mov al,cs:columns -inc di -popep: -mov es:[di],bl -add di,2 -dec al -jnz popep -pop es di bx ax -ret font8x8: include ..\include\pol8x8.inc From 306c0ed771a484a69efea704834b498cab03d1e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Tue, 30 Nov 2004 19:27:59 +0000 Subject: [PATCH 34/53] feat: utilisation de la librairie bmp.lib plutot que l'int 47h --- programs/logo.asm | 90 +++++++++++++++++++++++++++-------------------- 1 file changed, 52 insertions(+), 38 deletions(-) diff --git a/programs/logo.asm b/programs/logo.asm index 85411e0..cae2394 100644 --- a/programs/logo.asm +++ b/programs/logo.asm @@ -1,10 +1,16 @@ .model tiny -.386c +.486 +smart .code + org 0h - - + +include ..\include\mem.h + start: +header exe <,1,0,,,offset imports,,> + +realstart: mov ah,7 mov cx,65535 int 49h @@ -34,7 +40,6 @@ jc problem2 push es pop ds -xor si,si mov ah,28h int 47h @@ -42,59 +47,68 @@ mov ax,0008h int 47h mov ah,2 int 47h -mov cx,300 -mov bx,30 -mov ah,37 -int 47h -mov ah,15h -mov cl,11 -int 47h +push 0 +call cs:[loadbmppalet] +push 150 +push 20 +push 0 +call cs:[showbmp] +jc problem4 push cs pop ds -mov ah,13 -mov si,offset poper -int 47h -mov ax,0 +push offset poper +call [print] +endofit: +xor ax,ax int 16h mov ah,29h int 47h -db 0CBH +retf problem: push cs pop ds -mov ah,13 -mov si,offset error -int 47h -mov ax,0 -int 16h -db 0CBh +push offset error +call [print] +jmp endofit problem2: push cs pop ds -mov ah,13 -mov si,offset error2 -int 47h -mov ax,0 -int 16h -db 0CBh +push offset error2 +call [print] +jmp endofit problem3: push cs pop ds -mov ah,13 -mov si,offset error3 -int 47h -mov ax,0 -int 16h -db 0CBh +push offset error3 +call [print] +jmp endofit -poper db 'COS2000 en mode graphique',0 +problem4: +push cs +pop ds +push offset error4 +call [print] +jmp endofit + +poper db '\c0BC\c0CO\c0DS\c0E2\c0E0\c0E0\c0F0 en mode graphique',0 logo db 'cos.rip',0 ok1 db 'Chargement de l''image OK',0 ok2 db 'Decompression de l''image OK',0 -error3 db 'Une erreur est apparue lors de l''allocation de mémoire',0 -error db 'Une erreur est apparue lors du chargement de l''image',0 -error2 db 'Une erreur est apparue lors de la decompression de l''image',0 +error3 db '\c04Une erreur est apparue lors de l''allocation de mémoire',0 +error db '\c04Une erreur est apparue lors du chargement de l''image',0 +error2 db '\c04Une erreur est apparue lors de la decompression de l''image',0 +error4 db '\c0FUne erreur est apparue lors de l''affichage de l''image',0 + + +imports: + db "VIDEO.LIB::print",0 +print dd 0 + db "BMP.LIB::showbmp",0 +showbmp dd 0 + db "BMP.LIB::loadbmppalet",0 +loadbmppalet dd 0 + dw 0 end start From 8025aca6888f1738d935ea82e6c71ed462b9273a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Tue, 30 Nov 2004 19:28:32 +0000 Subject: [PATCH 35/53] feat: bibliotheque gerant les fichier BMP --- lib/bmp.asm | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 lib/bmp.asm diff --git a/lib/bmp.asm b/lib/bmp.asm new file mode 100644 index 0000000..f1e9be7 --- /dev/null +++ b/lib/bmp.asm @@ -0,0 +1,108 @@ +.model tiny +.486 +smart +locals +.code +org 0h + +include ..\include\mem.h +include ..\include\bmp.h + +start: +header exe <,1,0,,,,offset exports,> + +exports: + db "showbmp",0 + dw showbmp + db "loadbmppalet",0 + dw loadbmppalet + dw 0 + + +;==========SHOWBMP========= +;Affiche le BMP pointée par DS:%0 en %1, %2 +;<- DS:%0 BMP, %1 coordonnées X, %2 coordonnées Y +;-> +;========================== +showbmp PROC FAR + ARG pointer:word, x:word, y:word=taille + push bp + mov bp,sp + push ax bx cx si di + mov si,[pointer] + cmp word ptr [si+BMP_file.BMP_FileType],"MB" + jne @@errorshowing + mov di,si + add di,436h + mov ah,8 + xor bx,bx + mov cx,[si+offset BMP_File.BMP_height] +@@bouclette: + mov al,[di] + push bx cx + add bx,[x] + add cx,[y] + int 47h + pop cx bx + inc bx + inc di + cmp bx,[si+offset BMP_File.BMP_width] + jb @@bouclette + xor bx,bx + dec cx + cmp cx,0 + jne @@bouclette + clc + pop di si cx bx ax + pop bp + retf taille + +@@errorshowing: + stc + pop di si cx bx ax + pop bp + retf taille + +xc dw 0 +yc dw 0 +showbmp ENDP + + +;==========LOADBMPPALET========= +;Charge la palette du BMP pointée par DS:%0 +;-> DS:%0 BMP +;<- +;=============================== +loadbmppalet PROC FAR + ARG pointer:word=taille + push bp + mov bp,sp + push 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 + pop si dx cx bx ax + pop bp + retf taille +loadbmppalet ENDP + +end start From 1fbe390e3e6e5ebbbbd6be2940a811674dd12359 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Tue, 30 Nov 2004 19:30:30 +0000 Subject: [PATCH 36/53] feat: ajout de la commande kill Utilisation de la bibliotheque video.lib plutot que l'int 47h Ajout de l'aide aux commandes Colorisation des commandes internes --- commande/commande.asm | 608 ++++++++++++++++++++++-------------------- 1 file changed, 319 insertions(+), 289 deletions(-) diff --git a/commande/commande.asm b/commande/commande.asm index b228c1f..f4e4a4d 100644 --- a/commande/commande.asm +++ b/commande/commande.asm @@ -1,16 +1,16 @@ -.model tiny +.model tiny .486 smart .code -org 0h +org 0h include ..\include\fat.h include ..\include\mem.h include ..\include\divers.h start: -header exe <,1,0,,,offset imports,,> +header exe <,1,0,,,offset imports,,> realstart: push offset msginit @@ -24,9 +24,9 @@ replay: noret: mov ah,6 int 47h - mov ah,16 - mov di,offset dir - int 48h + mov ah,16 + mov di,offset dir + int 48h push offset prompt call [print] mov di,offset buffer @@ -38,20 +38,20 @@ waitchar: jne norr cmp bp,0 je waitchar - push word ptr cs:[bp-8] + push word ptr cs: [bp-8] call [print] push cs - pop es + pop es call copy0 call getlength0 add di,cx jmp waitchar norr: - cmp al,0Dh ;entrée + cmp al,0dh ;entrée je entere - cmp al,08h ;backspace + cmp al,08h ;backspace je backspace - cmp al,27 ;echap + cmp al,27 ;echap je escape cmp al,' ' jb waitchar @@ -115,13 +115,13 @@ tre: cmp di,0 je error push cs - pop es + pop es call evalue0 cmp dx,bp jb noadd mov bp,dx mov ax,bx - noadd: +noadd: call cmpstr0 jne tre mov si,offset buffer @@ -146,7 +146,7 @@ nopod: error: mov bp,ax push cs - pop es + pop es mov dl,'.' call searchchar0 je noaddext @@ -161,53 +161,58 @@ noaddext: xor bp,bp jmp replay reallyerror: - push offset Error_Syntax + push offset error_syntax call [print] - push word ptr cs:[bp-8] + push word ptr cs: [bp-8] call [print] jmp replay errorprec: push offset derror call [print] jmp replay - -Code_Exit: + +code_exit: pop ax retf - -Code_Version: - push offset Version_Text + +code_version: + push offset version_text call [print] ret - -Version_Text db 'Cos 2000 version 1.2Fr par Nico',0 - -Code_Cls: + +version_text db 'Cos 2000 version 1.4Fr par \c04MrNop',0 + +code_cls: mov ah,2 int 47h ret - -Code_Reboot: - push 0FFFFh + +code_reboot: + push 0ffffh push 00000h - db 0CBH - -Code_Command: + retf + +code_command: + push offset def + call [print] mov bx,offset commands showalls: - mov si,[bx] add bx,8 - cmp si,0 + cmp word ptr [bx],0 je endoff - push si + push word ptr [bx+4] + push word ptr [bx+6] + push word ptr [bx] + push offset commandes call [print] - mov ah,6 - int 47h jmp showalls endoff: ret -Code_Mode: +def db 'Liste des commandes internes\l\l',0 +commandes db '%0 \h10:\h12%0 \h70%0\l',0 + +code_mode: mov cx,0 call gettypeditem0 mov ah,0 @@ -218,295 +223,320 @@ Code_Mode: int 47h ret -present db 'Le volume insere est nomme %0, Numero de serie : %hD\l\l',0 -nomdisque db 13 dup (0) -Code_Dir: -mov ah,12 -int 48h -push edx -mov ah,11 -mov di,offset nomdisque -int 48h -push di -push offset present -call [print] -xor bp,bp -mov di,offset bufferentry -mov ah,7 -int 48h -jc nofiles +code_dir: + mov ah,12 + int 48h + push edx + mov ah,11 + mov di,offset nomdisque + int 48h + push di + push offset present + call [print] + xor bp,bp + mov di,offset bufferentry + mov ah,7 + int 48h + jc nofiles go: -push word ptr [di+Entries.FileAttr] -push dword ptr [di+Entries.FileSize] -push word ptr [di+Entries.FileTime] -push word ptr [di+Entries.FileDate] -push word ptr [di+Entries.FileTimeCrea] -push word ptr [di+Entries.FileDateCrea] -push di -push offset line -call [print] -inc bp -mov ah,8 -int 48h -jnc go + push word ptr [di+entries.fileattr] + push dword ptr [di+entries.filesize] + push word ptr [di+entries.filetime] + push word ptr [di+entries.filedate] + push word ptr [di+entries.filetimecrea] + push word ptr [di+entries.filedatecrea] + push di + push offset line + call [print] + inc bp + mov ah,8 + int 48h + jnc go nofiles: -push ebp -push offset filess -call [print] -ret -bufferentry db 32 dup (0) -line db '\c07%n %d %t %d %t %z %a\l',0 -filess db '\l\l%u Fichier(s) au total\l',0 + push ebp + push offset filess + call [print] + ret + +nomdisque db 13 dup (0) +bufferentry db 512 dup (0) +present db '\c02Le volume insere est nomme %0, Numero de serie : %hD\l\l',0 + +line db '\c07%n %d %t %d %t %z %a\l',0 +filess db '\l\l\c02%u Fichier(s) au total\l',0 -changing db 'Changement de repertoire vers ',0 code_cd: - mov cx,0 + mov cx,0 call gettypeditem0 - push offset changing - call [print] - mov si,di - mov ah,13 - int 48h - jnc okchange - push offset errorchanging - call [print] + push di + push offset changing + call [print] + mov si,di + mov ah,13 + int 48h + jnc okchange + push offset errorchanging + call [print] okchange: - ret + ret + +changing db 'Changement de repertoire vers %0\l',0 errorchanging db '\c04Impossible d''atteindre ce dossier',0 + +code_kill: + mov cx,0 + call gettypeditem0 + push di + push offset killing + call [print] + mov si,di + mov ah,5 + int 49h + jc nochanged + mov ah,1 + int 49h + jnc okchanged +nochanged: + push offset errorkilling + call [print] +okchanged: + ret + +killing db 'Fermeture du processus %0\l',0 +errorkilling db '\c04Impossible de fermer ce processus',0 code_refresh: - mov ah,3 - int 48h - jnc okrefresh - push offset errorrefreshing - call [print] -ret + mov ah,3 + int 48h + jnc okrefresh + push offset errorrefreshing + call [print] + ret okrefresh: -mov ah,12 -int 48h -push edx -mov ah,11 -mov di,offset nomdisque -int 48h -push di -push offset present -call [print] -ret + mov ah,12 + int 48h + push edx + mov ah,11 + mov di,offset nomdisque + int 48h + push di + push offset present + call [print] + ret + errorrefreshing db '\c04Impossible de lire le support',0 +extcom db '.CE',0 -extcom db '.CE',0 - -Code_Mem: -push offset msg -call [print] -xor cx,cx +code_mem: + push offset msg + call [print] + xor ebx,ebx + xor cx,cx listmcb: -mov ah,4 -int 49h -jc fino -inc cx + mov ah,4 + int 49h + jc fino + inc cx ;placement mémoire -mov dx,gs -inc dx -inc dx -push edx + mov dx,gs + inc dx + inc dx + push edx ;parent -cmp gs:[MB.Reference],0 -je next -mov dx,gs:[MB.Reference] -dec dx -dec dx -push dx -push offset MB.Names -jmp suitemn + cmp gs: [mb.reference],0 + jne next + push cs + push offset none + add bx,gs:[mb.sizes] + jmp suitemn next: -push cs -push offset none + mov dx,gs: [mb.reference] + dec dx + dec dx + push dx + push offset mb.names suitemn: ;Resident -cmp gs:[MB.IsResident],true -jne notresident -push offset resident -jmp suitelistmcb + cmp gs: [mb.isresident],true + jne notresident + push offset resident + jmp suitelistmcb notresident: -push offset nonresident + push offset nonresident suitelistmcb: ;taille memoire -xor edx,edx -mov dx,gs:[MB.Sizes] -shl edx,4 -push 6 -push edx + xor edx,edx + mov dx,gs: [mb.sizes] + shl edx,4 + push 6 + push edx ;nom -push gs -push offset MB.Names -push offset line2 -call [print] -jmp listmcb + push gs + push offset mb.names + push offset line2 + call [print] + jmp listmcb fino: -ret -resident db "oui",0 -nonresident db "non",0 -line2 db "%0P\h15%w\h24%0\h30%0P\h46%hW\l",0 -msg db "Plan de la memoire\l\lNom Taille Res Parent Mem\l",0 -none db ".",0 + shl ebx,4 + push ebx + push offset fin + call [print] + ret +resident db "oui",0 +nonresident db "non",0 +line2 db "%0P\h15%w\h24%0\h30%0P\h46%hW\l",0 +fin db "\l\l\c02%u octets de memoire disponible\l",0 +msg db "Plan de la memoire\l\lNom Taille Res Parent Mem\l",0 +none db ".",0 ;converti le jeux scancode/ascii en fr ax->ax convertfr: - push dx si - mov si,offset fr + push dx si + mov si,offset fr searchtouch: - mov dx,cs:[si] - cmp dx,0 - je endofconv - add si,4 - cmp dx,ax - jne searchtouch - mov ax,cs:[si-2] + mov dx,cs: [si] + cmp dx,0 + je endofconv + add si,4 + cmp dx,ax + jne searchtouch + mov ax,cs: [si-2] endofconv: - pop dx si - ret + pop dx si + ret -fr: db '1', 02, '&', 02 - db '!', 02, '1', 02 - db '2', 03, '‚', 03 - db '@', 03, '2', 03 - db '3', 04, '"', 04 - db '#', 04, '3', 04 - db '4', 05, 39, 05 - db '$', 05, '4', 05 - db '5', 06, '(', 06 - db '%', 06, '5', 06 - db '6', 07, '-', 07 - db '^', 07, '6', 07 - db '7', 08, 'Š', 08 - db '&', 08, '7', 08 - db '8', 09, '_', 09 - db '*', 09, '8', 09 - db '9', 10, '‡', 10 - db '(', 10, '9', 10 - db '0', 11, '…', 11 - db ')', 11, '0', 11 - db '-', 12, ')', 12 - db '_', 12, 'ø', 12 - db 'Q', 16, 'A', 16 - db 'q', 16, 'a', 16 - db 'W', 17, 'Z', 17 - db 'w', 17, 'z', 17 - db '{', 26, '‰', 26 - db '[', 26, 'ˆ', 26 - db ']', 27, '$', 27 - db '}', 27, 'œ', 27 - db 'A', 30, 'Q', 30 - db 'a', 30, 'q', 30 - db ':', 39, 'M', 39 - db ';', 39, 'm', 39 - db 39, 40, '—', 40 - db '"', 40, '%', 40 - db 00, 40, '%', 40 - db '\', 43, '*', 43 - db '|', 43, 'æ', 43 - db 'Z', 44, 'W', 44 - db 'z', 44, 'w', 44 - db 'm', 50, ',', 50 - db 'M', 50, '?', 50 - db ',', 51, ';', 51 - db '<', 51, '.', 51 - db '.', 52, ':', 52 - db '>', 52, '/', 52 - db '?', 53, 'õ', 53 - db '/', 53, '!', 53 - db '\', 86, '<', 86 - db '|', 86, '>', 86 - db 00, 79h, '~', 03 - db 00, 7Ah, '#', 04 - db 00, 7Bh, '{', 05 - db 00, 7Ch, '[', 06 - db 00, 7Dh, '|', 07 - db 00, 7Eh, '`', 08 - db 00, 7Fh, '\', 09 - db 00, 80h, '^', 10 - db 00, 81h, '@', 11 - db 00, 82h, ']', 12 - db 00, 83h, '}', 13 - db 00, 00, 00, 00 +fr: db '1', 02, '&', 02 + db '!', 02, '1', 02 + db '2', 03, '‚', 03 + db '@', 03, '2', 03 + db '3', 04, '"', 04 + db '#', 04, '3', 04 + db '4', 05, 39, 05 + db '$', 05, '4', 05 + db '5', 06, '(', 06 + db '%', 06, '5', 06 + db '6', 07, '-', 07 + db '^', 07, '6', 07 + db '7', 08, 'Š', 08 + db '&', 08, '7', 08 + db '8', 09, '_', 09 + db '*', 09, '8', 09 + db '9', 10, '‡', 10 + db '(', 10, '9', 10 + db '0', 11, '…', 11 + db ')', 11, '0', 11 + db '-', 12, ')', 12 + db '_', 12, 'ø', 12 + db 'Q', 16, 'A', 16 + db 'q', 16, 'a', 16 + db 'W', 17, 'Z', 17 + db 'w', 17, 'z', 17 + db '{', 26, '‰', 26 + db '[', 26, 'ˆ', 26 + db ']', 27, '$', 27 + db '}', 27, 'œ', 27 + db 'A', 30, 'Q', 30 + db 'a', 30, 'q', 30 + db ':', 39, 'M', 39 + db ';', 39, 'm', 39 + db 39, 40, '—', 40 + db '"', 40, '%', 40 + db 00, 40, '%', 40 + db '\', 43, '*', 43 + db '|', 43, 'æ', 43 + db 'Z', 44, 'W', 44 + db 'z', 44, 'w', 44 + db 'm', 50, ',', 50 + db 'M', 50, '?', 50 + db ',', 51, ';', 51 + db '<', 51, '.', 51 + db '.', 52, ':', 52 + db '>', 52, '/', 52 + db '?', 53, 'õ', 53 + db '/', 53, '!', 53 + db '\', 86, '<', 86 + db '|', 86, '>', 86 + db 00, 79h, '~', 03 + db 00, 7ah, '#', 04 + db 00, 7bh, '{', 05 + db 00, 7ch, '[', 06 + db 00, 7dh, '|', 07 + db 00, 7eh, '`', 08 + db 00, 7fh, '\', 09 + db 00, 80h, '^', 10 + db 00, 81h, '@', 11 + db 00, 82h, ']', 12 + db 00, 83h, '}', 13 + db 00, 00, 00, 00 +commands dw str_exit ,code_exit ,syn_exit ,help_exit + dw str_version,code_version,syn_version,help_version + dw str_cls ,code_cls ,syn_cls ,help_cls + dw str_reboot ,code_reboot ,syn_reboot ,help_reboot + dw str_command,code_command,syn_command,help_command + dw str_mode ,code_mode ,syn_mode ,help_mode + dw str_dir ,code_dir ,syn_dir ,help_dir + dw str_refresh ,code_refresh ,syn_refresh ,help_refresh + dw str_cd ,code_cd ,syn_cd ,help_cd + dw str_mem ,code_mem ,syn_mem ,help_mem + dw str_kill ,code_kill ,syn_kill ,help_kill + dw 0 +str_exit db 'QUIT',0 +str_version db 'VERS',0 +str_cls db 'CLEAR',0 +str_reboot db 'REBOOT',0 +str_command db 'CMDS',0 +str_mode db 'MODE',0 +str_dir db 'DIR',0 +str_refresh db 'DISK',0 +str_cd db 'CD',0 +str_mem db 'MEM',0 +str_kill db 'KILL',0 +syn_exit db 0 +syn_version db 0 +syn_cls db 0 +syn_reboot db 0 +syn_command db 0 +syn_mode db 'FFH',0 +syn_dir db 0 +syn_refresh db 0 +syn_cd db '@',0 +syn_mem db 0 +syn_kill db '@',0 +help_exit db 'Permet de quitter l''interpreteur',0 +help_version db 'Affiche la version de COS',0 +help_cls db 'Efface l''ecran',0 +help_reboot db 'Redemarre l''ordinateur',0 +help_command db 'Affiche le detail des commandes',0 +help_mode db 'Modifie le mode video en cours',0 +help_dir db 'Affiche le contenu du repertoire courant',0 +help_refresh db 'Lit le support disquette insere',0 +help_cd db 'Change le repertoire courant',0 +help_mem db 'Affiche le plan de la memoire',0 +help_kill db 'Termine le processus cible',0 +derror db '\c04Erreur de Syntaxe !',0 +error_syntax db '\c04La commande ou l''executable n''existe pas ! F1 pour ',0 +prompt db '\c07>',0 +msginit db '\m02\e\c07\l\lInterpreteur de commande COS V1.9\lSous license \c05GPL\c07 - Ecrit par \c04MrNop\l\c07Utilisez la commande CMDS pour connaitres les commandes disponibles\l',0 +include str0.asm - - - - - - - - - -commands dw Str_Exit ,Code_Exit ,Syn_Exit ,Help_Exit - dw Str_Version,Code_Version,Syn_Version,Help_Version - dw Str_Cls ,Code_Cls ,Syn_Cls ,Help_Cls - dw Str_Reboot ,Code_Reboot ,Syn_Reboot ,Help_Reboot - dw Str_Command,Code_Command,Syn_Command,Help_Command - dw Str_Mode ,Code_Mode ,Syn_Mode ,Help_Mode - dw Str_Dir ,Code_Dir ,Syn_Dir ,Help_Dir - dw Str_refresh ,Code_refresh ,Syn_refresh ,Help_refresh - dw Str_cd ,Code_cd ,Syn_cd ,Help_cd - dw Str_Mem ,Code_Mem ,Syn_Mem ,Help_Mem - dw 0 - -Str_Exit db 'QUIT',0 -Str_Version db 'VERS',0 -Str_Cls db 'CLEAR',0 -Str_Reboot db 'REBOOT',0 -Str_Command db 'CMDS',0 -Str_Mode db 'MODE',0 -Str_Dir db 'DIR',0 -Str_refresh db 'DISK',0 -Str_cd db 'CD',0 -Str_Mem db 'MEM',0 -Syn_Exit db 0 -Syn_Version db 0 -Syn_Cls db 0 -Syn_Reboot db 0 -Syn_Command db 0 -Syn_Mode db 'FFH',0 -Syn_Dir db 0 -Syn_refresh db 0 -Syn_cd db '@',0 -Syn_Mem db 0 -Help_Exit db 0 -Help_Version db 0 -Help_Cls db 0 -Help_Reboot db 0 -Help_Command db 0 -Help_Mode db 0 -Help_Dir db 0 -Help_refresh db 0 -Help_cd db 0 -Help_Mem db 0 -derror db '\c04Erreur de Syntaxe !',0 -Error_Syntax db '\c04La commande ou l''executable n''existe pas ! F1 pour ',0 -prompt db '\c07>',0 -msginit db '\m02\e\c07\l\lInterpreteur de commande COS V1.9',0 - - include str0.asm - -dir db 32 dup (0) -buffer db 256 dup (0) -buffer2 db 256 dup (0) +dir db 32 dup (0) +buffer db 128 dup (0) +buffer2 db 128 dup (0) imports: - db "VIDEO.LIB::print",0 -print dd 0 - db "VIDEO.LIB::showhex",0 -showhex dd 0 - db "VIDEO.LIB::showchar",0 -showchar dd 0 - dw 0 + db "VIDEO.LIB::print",0 +print dd 0 + db "VIDEO.LIB::showhex",0 +showhex dd 0 + db "VIDEO.LIB::showchar",0 +showchar dd 0 + dw 0 -end start +end start From d7c5923ca8729b61ac4295129224dd185a87c1b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Mon, 5 Dec 2005 08:00:07 +0000 Subject: [PATCH 37/53] build: destruction des .bin --- noyau/MAKEFILE | 1 + 1 file changed, 1 insertion(+) diff --git a/noyau/MAKEFILE b/noyau/MAKEFILE index 9cb29a7..dd47167 100644 --- a/noyau/MAKEFILE +++ b/noyau/MAKEFILE @@ -70,3 +70,4 @@ clean: del *.com del *.sys del *.err + del *.bin From b552531179aa2576ae8ce37f3432d12d3789926d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Mon, 5 Dec 2005 08:01:34 +0000 Subject: [PATCH 38/53] =?UTF-8?q?feat:=20suppression=20des=20fonctions=20d?= =?UTF-8?q?e=20haut=20niveau=20et=20des=20fonctions=20obsol=C3=A8tes=20pou?= =?UTF-8?q?r=20usage=20en=20appel=20stdcall?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noyau/video.asm | 614 +++++++++++++++++++++++++----------------------- 1 file changed, 320 insertions(+), 294 deletions(-) diff --git a/noyau/video.asm b/noyau/video.asm index 0c1e13e..c4c6d2b 100644 --- a/noyau/video.asm +++ b/noyau/video.asm @@ -55,16 +55,16 @@ tables dw setvideomode ;Table qui contient les adresses de toutes les fonctions dw clearscreen dw setfont dw loadfont - dw nothings + dw getfont dw showline dw showchar dw showpixel dw getpixel - dw setxyg - dw nothings - dw nothings - dw nothings dw nothings + dw setstyle + dw getstyle + dw enablecursor + dw disablecursor dw nothings dw nothings dw nothings @@ -75,14 +75,14 @@ tables dw setvideomode ;Table qui contient les adresses de toutes les fonctions dw getcolor dw scrolldown dw getxy - dw setxy2 + dw setxy dw savescreen dw restorescreen dw page2to1 dw page1to2 dw xchgPages - dw savepage1 dw nothings + dw waithretrace dw waitretrace dw getvgainfos dw nothings @@ -191,29 +191,48 @@ mode9 DB 0E7H, 00H, 03H,01H,0FH,00H,06H DB 00H,01H,02H,03H,04h,05H,06H,07H,08H,09H,0AH,0BH,0CH,0DH,0EH,0FH DB 41H,00H,0FH,00H,00H DB 50,75 + +;640*480 16 couleurs +mode10 DB 0E3H + DB 00H + DB 03H,01H,0FH,00H,06H + DB 5FH,4FH,50H,82H,53H,9FH,0BH,3EH,00H,40H,00H,00H,00H,00H,00H,00H,0E9H,8BH,0DFH,28H,00H,0E7H,04H,0E3H,0FFH + DB 00H,00H,00H,00H,00H,00H,05H,0FH,0FFH + DB 00H,01H,02H,03H,04H,05H,06H,07H,10H,11H,3AH,3BH,3CH,3DH,3EH,3FH,01H,00H,0FH,00H,00H + DB 80,60 + +;800*600 16 couleurs +mode11 DB 0E7H + DB 00H + DB 03H,01H,0FH,00H,06H + DB 70H,63H,64H,92H,65H,82H,70H,0F0H,00H,60H,00H,00H,00H,00H,00H,00H,5BH,8CH,57H,32H,00H,58H,70H,0E3H,0FFH + DB 00H,00H,00H,00H,00H,00H,05H,0FH,0FFH + DB 00H,01H,02H,03H,04H,05H,06H,07H,10H,11H,3AH,3BH,3CH,3DH,3EH,3FH,01H,00H,0FH,00H,00H + DB 100,75 + DATABLOCKSIZE equ 40 DATABLOCK equ $ ;============================================DATABLOCK========================================================= -lines db 0 +lines db 0 columns db 0 -x db 0 +x db 0 y db 0 xy dw 0 -colors db 7 +colors db 7 mode db 0FFh pagesize dw 0 -pages db 0 +style db 0 font db 0 graphic db 0 -xg dw 0 -yg dw 0 -style dw 0 +reserved1 dw 0 +reserved2 dw 0 +reserved3 dw 0 nbpage db 0 -pagesshowed db 0 -plane db 0 -xyg dw 0 -linesize dw 0 +color db 0 +cursor db 0 +segments dw 0 +linesize dw 0 adress dw 0 base dw 0 scrolling db 1 @@ -227,8 +246,8 @@ graphics equ 03CEh statut equ 03DAh maxfunc equ 39h -maxmode equ 9 -planesize equ 64000 +maxmode equ 11 +planesize equ 65000 ;============================================Fonctions de l'int VIDEO=========================================== ;message d'erreur specifiant que les interruptions n'existent plus @@ -267,6 +286,69 @@ DisableScroll: mov cs:scrolling,0 ret +;=============ENABLECURSOR (Fonction 013)========= +;Autorise le d‚filement +;-> AH=42 +;<- +;===================================================== + EnableCursor: + push ax dx + mov cs:cursor,1 + mov dx,CCRT + mov al,0Ah + out dx,al + inc dx + in al,dx + and al,11011111b + mov ah,al + dec dx + mov al,0Ah + out dx,ax + mov bh,cs:x + mov bl,cs:y + call setxy + pop dx ax + ret + +;=============DISABLECURSOR (Fonction 14)========= +;D‚sactive le d‚filement +;-> AH=43 +;<- +;===================================================== +DisableCursor: + push ax dx + mov cs:cursor,0 + mov dx,CCRT + mov al,0Ah + out dx,al + inc dx + in al,dx + or al,00100000b + mov ah,al + dec dx + mov al,0Ah + out dx,ax + pop dx ax + ret + +;==========SETSTYLE (Fonction 11)========= +;Change le style du texte a CL +;-> AH=x ,CX style +;<- +;========================================= +setstyle: + mov cs:style,cl + ret + +;==========GETSTYLE (Fonction 12)========= +;Récupère le style du texte dans CL +;-> AH=x +;<- CX style +;========================================= +getstyle: + mov cl,cs:style + ret + ;==========SHOWCHAR (Fonction 07h)=========== ;met un caractère de code ASCII DL aprés le curseur ;-> AH=7, DL code ASCII du caractère @@ -287,16 +369,16 @@ showchar: ;================================================= setvideomode: push ax cx dx di - cmp al,maxmode + cmp al,maxmode ja errorsetvideomode - cmp cs:mode,5h + cmp cs:mode,5h jb nographic cmp al,5h jae nographic call initvideo nographic: - cmp cs:mode,0FFh - jne noinit + cmp cs:mode,0FFh + jne noinit call initvideo noinit: mov cs:mode,al @@ -310,7 +392,7 @@ noinit: inc di mov dx,statut mov al,cs:[di] - out dx,al + out dx,al inc di mov dx,sequencer xor ax,ax @@ -323,7 +405,7 @@ initsequencer: jbe initsequencer mov ax,0E11h mov dx,ccrt - out dx,ax + out dx,ax xor ax,ax initcrt: mov ah,cs:[di] @@ -332,7 +414,7 @@ initcrt: inc di cmp al,24 jbe initcrt - mov dx,graphics + mov dx,graphics xor ax,ax initgraphic: mov ah,cs:[di] @@ -342,7 +424,7 @@ initgraphic: cmp al,8 jbe initgraphic mov dx,statut - in al,dx + in al,dx mov dx,attribs xor ax,ax initattribs: @@ -365,27 +447,43 @@ initattribs: mov ah,cs:[di+1] mov cs:lines,ah mul ah - shl ax,1 - cmp cs:mode,5 - setae cs:graphic - jb istext - shl ax,3 + mov cl,cs:[di-5] + and cl,01000000b + cmp cl,0 + je colors16 + mov cs:color,8 + mov cl,4 + jmp colors256 +colors16: + mov cs:color,4 + mov cl,3 +colors256: + cmp cs:mode,5 + setae cs:graphic + jb istext + shl ax,cl + mov cs:segments,0A000h + jmp wasgraph istext: + mov cs:segments,0B800h + shl ax,1 +wasgraph: mov cs:pagesize,ax mov ax,planesize xor dx,dx div cs:pagesize mov cs:nbpage,al - mov al,cs:[di-36] + mov al,cs:[di-36] xor ah,ah - shl ax,2 - mov cl,cs:graphic - shr ax,cl - mov cs:linesize,ax - mov ax,cs:[di-43] - mov cs:adress,ax + shl ax,2 + mov cl,cs:graphic + shr ax,cl + mov cs:linesize,ax + mov ax,cs:[di-43] + mov cs:adress,ax mov cs:base,ax - mov cs:pages,0 + mov cs:cursor,1 + mov cs:style,0 pop di dx cx ax ret errorsetvideomode: @@ -394,9 +492,7 @@ errorsetvideomode: initvideo: push bx cx si ds -;xor bx,bx -;mov ds,bx -;lds si,ds:[43h*4] + call clearscreen push cs pop ds mov si,offset font8x8 @@ -407,8 +503,6 @@ initvideo: mov cl,16 mov bl,0 call loadfont - mov cs:pagesize,64000 - call clearscreen pop ds si cx bx ret @@ -424,52 +518,55 @@ getvideomode: ;=============CLEARSCREEN (Fonction 02h)========= ;Efface l'ecran graphique ou texte ;-> AH=2 -;<- +;<- ;================================================ clearscreen: push eax cx dx di es - mov cx,cs:pagesize + mov cx,planesize mov di,cs:adress shr cx,2 - cmp byte ptr cs:graphic,1 + cmp cs:graphic,1 jne erasetext - mov ax,0A000h - mov es,ax + mov ax,0A000h + mov es,ax erasegraph: - mov ah,0 -gogot: - push ax cx - mov cl,ah - mov ah,1 - shl ah,cl - mov al,2 - mov dx,sequencer - out dx,ax - pop cx ax - push si di cx eax + mov ax,0F02h + mov dx,sequencer + out dx,ax + mov ax,0205h + mov dx,graphics + out dx,ax + mov ax,0003h + out dx,ax + mov ax,0FF08h + out dx,ax mov eax,00000000h + cld rep stosd - pop eax cx di si - inc ah - cmp ah,3 - jbe gogot - jmp enderase + mov ax,0005h + cmp cs:color,4 + je not256 + mov ax,4005h +not256: + mov dx,graphics + out dx,ax + mov ax,0003h + out dx,ax + jmp endoferase + + erasetext: mov ax,0B800h mov es,ax mov eax,07200720h cld rep stosd -enderase: - mov cs:x,0 - mov cs:y,0 - mov cs:xg,0 - mov cs:yg,0 - mov cs:xy,0 - mov cs:xyg,0 - mov cs:plane,0 + +endoferase: + xor bx,bx + call setxy pop es di dx cx eax - ret + ret ;=============SetFont (Fonction 03h)========= @@ -496,7 +593,7 @@ errorsetfont: pop dx cx ax ret -;=============GetFont (Fonction 0xh)========= +;=============GetFont (Fonction 05h)========= ;Récupère le n° de la font active ;-> AH=x ;<- CL n° font, Carry if error @@ -587,7 +684,7 @@ doseqs: inc di cmp di,6 jbe doseqs - mov dx,graphics + mov dx,graphics doseqs2: mov ax,cs:[di+offset reg2] out dx,ax @@ -622,14 +719,14 @@ showline: jne scro dec bl mov cx,1 - cmp byte ptr cs:graphic,0 + cmp cs:graphic,0 je okscro mov cx,8 okscro: call scrolldown scro: inc bl - call setxy2 + call setxy pop cx bx ret @@ -650,30 +747,12 @@ setcolor: getcolor: mov cl,cs:colors ret - -;==========SETSTYLE (Fonction xh)========= -;Change le style du texte a CL -;-> AH=x ,CX style -;<- -;========================================= -setstyle: - mov cs:style,CX - ret - -;==========GETSTYLE (Fonction xh)========= -;Récupère le style du texte dans CL -;-> AH=x -;<- CX style -;========================================= -getstyle: - mov cx,cs:style - ret - + ;==========SCROLLDOWN (Fonction 17h)========= ;defile de cx lines vers le bas ;-> AH=23, CX lines à défiler vers le bas -;<- -;============================= +;<- +;============================= scrolldown: push ax cx dx si di ds es cmp cs:scrolling,0 @@ -685,33 +764,30 @@ scrolldown: sub cx,si mov di,cs:adress cld - cmp byte ptr cs:graphic,1 + cmp byte ptr cs:graphic,1 jne textp - mov ax,0A000h + mov ax,0A000h mov es,ax - mov ds,ax - shr cx,2 -transfert: - mov ah,0 -gogo: - push ax cx - mov cl,ah - mov ah,1 - shl ah,cl - mov al,2 - mov dx,sequencer - out dx,ax - pop cx ax - mov al,4 - mov dx,graphics - out dx,ax - push si di cx - rep movsd - pop cx di si - inc ah - cmp ah,3 - jbe gogo - jmp graphp + mov ds,ax + mov ax,0F02h + mov dx,sequencer + out dx,ax + mov ax,0105h + mov dx,graphics + out dx,ax + cld + rep movsb + mov ax,0005h + cmp cs:color,4 + je not256ok + mov ax,4005h +not256ok: + mov dx,graphics + out dx,ax + mov ax,0003h + out dx,ax + jmp graphp + textp: mov ax,0B800h mov es,ax @@ -719,7 +795,7 @@ textp: rep movsb graphp: pop es ds di si dx cx ax - ret + ret ;==========GETXY (Fonction 18h)========= ;Change les coordonnées du curseur a X:BH,Y:BL @@ -737,21 +813,7 @@ getxy: ;<- ;===================================== setxy: - push ax bx cx dx -; xor ax,ax -; int 16h -; mov cl,cs:lines -; dec cl -; sub cl,bl -; neg cl -; js zero -; xor ch,ch -; inc cl -; jmp nozero -;zero: -; mov cx,0 -;nozero: -; call scrolldown + push ax bx dx di mov cs:x,bh mov cs:y,bl mov al,bl @@ -763,56 +825,8 @@ setxy: add di,ax shl di,1 mov cs:xy,di - cmp byte ptr cs:graphic,1 - jne oktext - mov bl,cs:x - mov cl,cs:y - xor bh,bh - xor ch,ch - shl bx,3 - shl cx,3 - call setxyg - jmp endofsetxy -oktext: - mov ax,0B800h - mov es,ax - call setcursor -endofsetxy: - pop dx cx bx ax - ret - -setxy2: - push es di - call setxy - pop di es - ret - -;==========SETXYG (Fonction 0Ah)========= -;Change les coordonnées du curseur graphique a X:BX,Y:CX -;-> AH=x, BX coordonnées x, CX coordonnées y -;<- ES:DI pointeur sur pixel avec plan de bit ajusté -;====================================== -setxyg: - push ax bx cx dx - mov cs:xg,bx - mov cs:yg,cx - mov ax,cx - mov cl,bl - mul cs:linesize - shr bx,2 - add ax,bx - mov di,ax - and cl,3 - mov ah,1 - shl ah,cl - mov al,2 - mov dx, 3c4h - out dx,ax - mov cs:plane,cl - mov cs:xyg,di - mov ax,0A000h - mov es,ax - pop dx cx bx ax + call setcursor + pop di dx bx ax ret ;==========SHOWPIXEL (Fonction 08h)========= @@ -821,52 +835,82 @@ setxyg: ;<- ;========================================= showpixel: - push ax bx cx dx di bp es - mov bp,ax - mov ax,cx - mov cl,bl - mul cs:linesize - shr bx,2 - add ax,bx - mov di,ax - add di,cs:adress - and cl,3 - mov ah,1 - shl ah,cl - mov al,2 - mov dx,sequencer - out dx,ax - mov bx,0A000h - mov es,bx - mov ax,bp - mov es:[di],al - pop es bp di dx cx bx ax + push ax bx cx dx si di es + cmp cs:color,4 + je showpixel4 + mov si,ax + mov ax,cx + mov cl,bl + mul cs:linesize + shr bx,2 + add ax,bx + mov di,ax + add di,cs:adress + and cl,3 + mov ah,1 + shl ah,cl + mov al,2 + mov dx,sequencer + out dx,ax + mov bx,0A000h + mov es,bx + mov ax,si + mov es:[di],al + jmp endofshow + +showpixel4: + mov dx,ax + mov ax,cx + mov ch,dl + mov cl,bl + mul cs:linesize + shr bx,3 + add ax,bx + mov di,ax + add di,cs:adress + and cl,111b + xor cl,111b + mov ah,1 + shl ah,cl + mov al,8 + mov dx,graphics ;masque + out dx,ax + mov ax,0205h + out dx,ax + mov ax,0003h + out dx,ax + mov bx,0A000h + mov es,bx + mov al,es:[di] + mov es:[di],ch + +endofshow: + pop es di si dx cx bx ax ret -;==========SHOWPIXEL (Fonction 09h)========= +;==========GETPIXEL (Fonction 09h)========= ;Récupère en al la couleur du pixel de coordonnées X:BX,Y:CX ;-> AH=x, BX coordonnées x, CX coordonnées y, AL couleur ;<- ;========================================= getpixel: push ax bx cx dx di bp es - mov bp,ax - mov ax,cx - mov cl,bl - mul cs:linesize - shr bx,2 - add ax,bx - mov di,ax - add di,cs:adress - and cl,3 + mov bp,ax + mov ax,cx + mov cl,bl + mul cs:linesize + shr bx,2 + add ax,bx + mov di,ax + add di,cs:adress + and cl,3 mov ah,cl - mov al,4 - mov dx,graphics - out dx,ax - mov bx,0A000h - mov es,bx + mov al,4 + mov dx,graphics + out dx,ax + mov bx,0A000h + mov es,bx mov ax,bp - mov al,es:[di] pop es bp di dx cx bx ax ret @@ -901,6 +945,21 @@ waitr: jz waitr pop dx ax ret + +;==========WAITHRETRACE (Fonction 0xh)========= +;Synchronisation avec la retrace horizontale +;<- AH=x +;-> +;============================================= +waithretrace: + push ax dx + mov dx,3DAh +waitr2: + in al,dx + test al,1 + jz waitr2 + pop dx ax + ret ;Renvoie le caractère sur le curseur en dl getchar: @@ -915,7 +974,7 @@ getchar: ;Ecrit le caractère ASCII CL attribut CH aprés le curseur, en le mettant à jours charout: push ax bx cx dx di es - cmp byte ptr cs:graphic,1 + cmp cs:graphic,1 jne textaccess call emulatechar jmp adjusttext @@ -927,9 +986,9 @@ textaccess: add cs:xy,2 adjusttext: inc cs:x - mov cl,cs:columns - cmp cs:x,cl - jb noadjusted + mov cl,cs:columns + cmp cs:x,cl + jb noadjusted call showline noadjusted: call setcursor @@ -937,7 +996,9 @@ noadjusted: ret setcursor: - push ax cx dx + push ax cx dx + cmp cs:cursor,1 + jne notshow mov dx,CCRT mov al,0Eh mov cx,cs:xy @@ -947,52 +1008,51 @@ setcursor: mov ah,cl inc al out dx,ax - pop dx cx ax +notshow: + pop dx cx ax ret ;Ecrit le caractère ASCII CL attribut CH aprés le curseur graphique, en le mettant à jours en mode graphique emulatechar: push ax bx cx dx di - mov dx,cx - mov di,dx + mov al,ch + mov di,cx and di,11111111b shl di,3 add di,offset font8x8 - xor bx,bx - xor cx,cx + mov bl,cs:x + mov cl,cs:y + xor bh,bh + xor ch,ch + shl bx,3 + shl cx,3 mov ah,cs:[di] + xor dx,dx bouclet: - mov al,dh - rol ah,1 - jc colored + rol ah,1 + push ax + jc colored shr al,4 - bt word ptr cs:style,0 - jc transparent + cmp cs:style,0 + jnz transparent colored: - and al,1111b - push bx cx - add cx,cs:yg - add bx,cs:xg + and al,1111b call showpixel - pop cx bx transparent: + pop ax inc bx - cmp bx,8 + inc dl + cmp dl,8 jb bouclet - xor bx,bx inc di mov ah,cs:[di] + xor dl,dl + sub bx,8 inc cx - cmp cx,8 + inc dh + cmp dh,8 jb bouclet - add cs:xg,8 - mov cx,cs:linesize - shl cx,2 - cmp cs:xg,cx - jb ended - mov cs:xg,0 - add cs:yg,8 ended: pop di dx cx bx ax ret @@ -1061,43 +1121,7 @@ Restoreparamfrom: rep movsb pop es di si ecx ret - -;sauve la page1 dans un bloc de mémoire -Savepage1: -push ax cx dx si di bp ds es gs -mov bp,sp -mov dx,ss:[bp+22] -mov ah,2 -mov cx,cs:pagesize -push cs -pop ds -mov si,offset data4 -int 49h -mov ah,6 -int 49h -push gs -pop es -xor di,di -call Savepage1to -pop gs es ds bp di si dx cx ax -ret -data4 db '/vgapage1',0 - -;===================================sauve l'ecran rapidement================ -Savepage1to: - push ecx si di ds - mov cx,0B800H - mov ds,cx - xor ecx,ecx - mov cx,cs:pagesize - shr cx,2 - mov si,cs:pagesize - cld - rep movsd - pop ds di si ecx - ret - ;R‚cupŠre l'ecran de la carte depuis son bloc mémoire RestoreScreen: push ax dx si bp ds gs @@ -1199,6 +1223,8 @@ int 49h pop gs es ds bp di si dx cx ax ret +data4 db '/vgatemp',0 + ;Sauve l'‚tat de la carte dans un bloc mémoire savestate: From 84a816919f1c0c58df9cd2eee41e86ccaab710cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Mon, 5 Dec 2005 08:02:33 +0000 Subject: [PATCH 39/53] fix: correction de bogue et optimisation des fonctions --- lib/bmp.asm | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/lib/bmp.asm b/lib/bmp.asm index f1e9be7..114b1ab 100644 --- a/lib/bmp.asm +++ b/lib/bmp.asm @@ -28,15 +28,22 @@ showbmp PROC FAR ARG pointer:word, x:word, y:word=taille push bp mov bp,sp - push ax bx cx si di + push ax bx cx dx si di mov si,[pointer] cmp word ptr [si+BMP_file.BMP_FileType],"MB" jne @@errorshowing - mov di,si - add di,436h + mov edi,[si+BMP_BitMapOffset] + add di,si mov ah,8 - xor bx,bx - mov cx,[si+offset BMP_File.BMP_height] + xor ebx,ebx + mov ecx,[si+offset BMP_File.BMP_height] + mov edx,[si+offset BMP_File.BMP_width] + and dx,11111100b + cmp edx,[si+offset BMP_File.BMP_width] + jae @@noadjust + add dx,4 +@@noadjust: + sub dx,[si+offset BMP_File.BMP_width] @@bouclette: mov al,[di] push bx cx @@ -46,14 +53,15 @@ showbmp PROC FAR pop cx bx inc bx inc di - cmp bx,[si+offset BMP_File.BMP_width] + cmp ebx,[si+offset BMP_File.BMP_width] jb @@bouclette xor bx,bx + add di,dx dec cx cmp cx,0 jne @@bouclette clc - pop di si cx bx ax + pop di si dx cx bx ax pop bp retf taille @@ -63,8 +71,6 @@ showbmp PROC FAR pop bp retf taille -xc dw 0 -yc dw 0 showbmp ENDP From 5e1fa958fe7d4a0494f083ba2bce0dd308f65651 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Mon, 5 Dec 2005 08:03:34 +0000 Subject: [PATCH 40/53] build: changement du repertoire binaire --- MAKEFILE | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/MAKEFILE b/MAKEFILE index 590d8df..8977b8f 100644 --- a/MAKEFILE +++ b/MAKEFILE @@ -21,13 +21,13 @@ all: copy: make all - copy commande\*.exe ..\data - copy programs\*.exe ..\data - copy programs\*.rip ..\data - copy noyau\*.sys ..\data - rem copy noyau\*.bin ..\data - copy contribs\*.exe ..\data - copy install\*.com ..\ + copy commande\*.exe ..\binaires\data + copy programs\*.com ..\binaires\data + copy programs\*.rip ..\binaires\data + copy noyau\*.sys ..\binaires\data + copy noyau\*.bin ..\binaires\data + copy contribs\*.com ..\binaires\data + copy install\*.com ..\binaires make clean clean: From a5c9fa4dd7556fa69a212aa1839711fea95ea2a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Mon, 5 Dec 2005 08:04:42 +0000 Subject: [PATCH 41/53] feat: mise a jour des classes et sous classes PCI --- programs/detect.asm | 103 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 89 insertions(+), 14 deletions(-) diff --git a/programs/detect.asm b/programs/detect.asm index df773de..7011638 100644 --- a/programs/detect.asm +++ b/programs/detect.asm @@ -201,19 +201,30 @@ dw offset class9 dw offset class10 dw offset class11 dw offset class12 -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 +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: @@ -230,6 +241,11 @@ 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 @@ -242,30 +258,40 @@ 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 @@ -282,6 +308,7 @@ 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 @@ -290,28 +317,41 @@ 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 @@ -335,11 +375,46 @@ 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 'smbus',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 + ;bx pci version, cl nbbus, al pci type getPciInfos: From 8c1701b5afd44f0cbd36d632c718acef57d64e65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Mon, 5 Dec 2005 08:09:17 +0000 Subject: [PATCH 42/53] build: suppression du renomage des fichiers --- programs/MAKEFILE | 11 +---------- programs/memoire.asm | 1 + 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/programs/MAKEFILE b/programs/MAKEFILE index 62eb6e0..47397db 100644 --- a/programs/MAKEFILE +++ b/programs/MAKEFILE @@ -7,52 +7,43 @@ all: detect.com editeur.com gestion.com logo.com pmode.com souris.com test.com v memoire.com: memoire.asm $(asm) memoire $(lnk) memoire - ren memoire.com memoire.com detect.com: detect.asm $(asm) detect $(lnk) detect - ren detect.com detect.com editeur.com: editeur.asm $(asm) editeur $(lnk) editeur - ren editeur.com editeur.com gestion.com: gestion.asm $(asm) gestion $(lnk) gestion - ren gestion.com gestion.com logo.com: logo.asm $(asm) logo $(lnk) logo - ren logo.com logo.com pmode.com: pmode.asm $(asm) pmode $(lnk) pmode - ren pmode.com pmode.com souris.com: souris.asm $(asm) souris $(lnk) souris - ren souris.com souris.com test.com: test.asm $(asm) test $(lnk) test - ren test.com test.com verifier.com: verifier.asm $(asm) verifier $(lnk) verifier - ren verifier.com verifier.com volume.com: volume.asm $(asm) volume $(lnk) volume - ren volume.com volume.com + clean: del *.obj diff --git a/programs/memoire.asm b/programs/memoire.asm index b9d1890..f220b60 100644 --- a/programs/memoire.asm +++ b/programs/memoire.asm @@ -73,6 +73,7 @@ nonresident db "non",0 line db "%0P\h15%w\h24%0\h30%0P\h46%hW\l",0 msg db "Memory manager V1.5\lNom Taille Res Parent Mem\l",0 none db ".",0 + imports: db "VIDEO.LIB::print",0 print dd 0 From 8db2a163d4b5f22a25fd3454380f877d73c51e26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Mon, 5 Dec 2005 08:16:09 +0000 Subject: [PATCH 43/53] feat: passage a la convention d'appel stdcall BREAKING CHANGE: attention modification majeure du code --- noyau/8259a.asm | 274 ++++++++++++++++++++++++------------------------ 1 file changed, 139 insertions(+), 135 deletions(-) diff --git a/noyau/8259a.asm b/noyau/8259a.asm index 592c021..46a3601 100644 --- a/noyau/8259a.asm +++ b/noyau/8259a.asm @@ -1,55 +1,39 @@ -.model tiny +.model tiny,StdCall .486 -smart .code +Locals +jumps + org 0h + +include ..\include\mem.h +include ..\include\bmp.h + start: -jmp tsr -db 'PIC8259A' -Tsr: -cli -cmp ax,1234h -jne nomore -mov ax,4321h -jmp itsok -nomore: -push bx -mov bl,ah -xor bh,bh -shl bx,1 -mov bx,cs:[bx].tables -mov cs:current,bx -pop bx -call cs:current -itsok: -jnc noerror -push bp -mov bp,sp -or byte ptr [bp+6],1b -pop bp -mov ax,cs -shl eax,16 -mov ax,cs:current -jmp endofint -noerror: -push bp -mov bp,sp -and byte ptr [bp+6],0FEh -pop bp -endofint: -sti -iret -current dw 0 -tables dw enableirq - dw disableirq - dw readmaskirq - dw readirr - dw readisr - dw installhandler - dw replacehandler - dw getint - dw setint - dw seteoi +header exe <,1,0,,,,offset exports,> + +exports: + db "enableirq",0 + dw enableirq + db "disableirq",0 + dw enableirq + db "readmaskirq",0 + dw readmaskirq + db "readirr",0 + dw readirr + db "readisr",0 + dw readisr + db "installhandler",0 + dw installhandler + db "replacehandler",0 + dw replacehandler + db "getint",0 + dw getint + db "setint",0 + dw setint + db "seteoi",0 + dw seteoi + dw 0 ;Adresses de port du contr“leur IRQ MASTERPIC = 020h ;Adresse de base du PIC maŒtre @@ -82,98 +66,118 @@ IRR = 0Ah ; Pas d'op ;Autorise une interruption ‚lectronique -;Entr‚e : AL - Num‚ro de l'interruption (0-15) … autoriser 0-7 = MASTERPIC , 8-15 = SLAVEPIC -EnableIRQ: -push ax cx dx -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 -pop dx cx ax -ret +;Entr‚e : %1 - Num‚ro de l'interruption (0-15) … autoriser 0-7 = MASTERPIC , 8-15 = SLAVEPIC +EnableIRQ PROC 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 +EnableIRQ endp ;Desactive une interruption ‚lectronique -;Entr‚e : AL - Num‚ro de l'interruption (0-15) … desactiver 0-7 = MASTERPIC , 8-15 = SLAVEPIC -DisableIRQ: -push ax cx dx -mov dx,MASTERPIC+IRQMASK -cmp al,7 -jbe master2 -mov dx,SLAVEPIC+IRQMASK -master2: -mov cl,al -and cl,7 -mov al,1 -shl al,cl -mov ah,al -in al,dx -or al,ah -out dx,al -pop dx cx ax -ret +;Entr‚e : %0 - Num‚ro de l'interruption (0-15) … desactiver 0-7 = MASTERPIC , 8-15 = SLAVEPIC +DisableIRQ PROC 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 +DisableIRQ endp + + +;Signale "End Of Interrupt" de l'interruption %0 +SetEOI PROC 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 +DisableIRQ endp + + +;Lit les masques d'un contr“leur IRQ dans ax, 0 master ou slave 1 ds %1 +ReadmaskIrq PROC 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 +ReadmaskIrq endp + +;Lit le registre d'‚tat d'un contr“leur IRQ dans ax, 0 master ou slave 1 ds %1 +ReadISR PROC 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 +ReadISR endp -;Signale "End Of Interrupt" de l'interruption al -SetEOI: -push ax dx -cmp al,7 -jbe master3 -mov al,EOI -out SLAVEPIC,al -master3: -mov al,EOI -out MASTERPIC,al -pop dx ax -ret - -;Lit les masques d'un contr“leur IRQ dans al, 0 master ou slave 1 ds bh -ReadmaskIrq: -push dx -mov dx,MASTERPIC+ IRQMASK -cmp bh,0 -jne Master5 -mov dx,SLAVEPIC+ IRQMASK -master5: -in al,dx -pop dx -ret ;Lit le registre d'‚tat d'un contr“leur IRQ dans al, 0 master ou slave 1 ds bh -ReadISR: -push dx -mov dx,MASTERPIC -cmp bh,0 -jne Master6 -mov dx,SLAVEPIC -master6: -mov al,isr -out dx,al -in al,dx -pop dx -ret - -;Lit le registre d'‚tat d'un contr“leur IRQ dans al, 0 master ou slave 1 ds bh -ReadIRR: -push dx -mov dx,MASTERPIC -cmp bh,0 -jne Master7 -mov dx,SLAVEPIC -master7: -mov al,irr -out dx,al -in al,dx -pop dx -ret +ReadIRR PROC 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 +ReadIRR endp ;remplace le handler pointer par ds:si en bx:100h interruption ax replacehandler: From 1ede6ca979fdc1dcc48ac1484fb4c5f7ef3cfe38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Mon, 5 Dec 2005 08:17:18 +0000 Subject: [PATCH 44/53] feat: gestion du PNP et de l'ISA/EISA --- programs/isa.asm | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 programs/isa.asm diff --git a/programs/isa.asm b/programs/isa.asm new file mode 100644 index 0000000..2d50ab9 --- /dev/null +++ b/programs/isa.asm @@ -0,0 +1,39 @@ +.model tiny +.486 +smart +.code + +org 0100h + +start: + +PNP_ADR_PORT equ 0x279 +PNP_WRITE_PORT equ 0xA79 +;MIN and MAX READ_ADDR must have the bottom two bits set +MIN_READ_ADDR equ 0x203 +MAX_READ_ADDR equ 0x3FF +;READ_ADDR_STEP must be a multiple of 4 +READ_ADDR_STEP equ 8 + +;bits +CONFIG_WAIT_FOR_KEY equ 0x02 +CONFIG_RESET_CSN equ 0x04 +IDENT_LEN equ 9 + +;renvoie le timer en ax +ctc: + cli + mov dx,043h + mov al,0 + out dx,al + mov dx,40h + in al,dx + mov ah,al + in al,dx + sti + ret + +;attend pendant ax microsecondes +usleep: + +end start From 2e67065bd969a280de4e08394ed30ee3305c91e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Mon, 5 Dec 2005 20:29:48 +0000 Subject: [PATCH 45/53] =?UTF-8?q?docs:=20un=20copie=20d'=C3=A9cran=20de=20?= =?UTF-8?q?la=20version=201.3.1fr=20au=20boot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Graphisme/screenshots/bootnew.jpg | Bin 0 -> 30620 bytes SCREENSHOTS.md | 1 + 2 files changed, 1 insertion(+) create mode 100644 Graphisme/screenshots/bootnew.jpg diff --git a/Graphisme/screenshots/bootnew.jpg b/Graphisme/screenshots/bootnew.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6829feb3475b97926e4bf372791efe480bdd15b8 GIT binary patch literal 30620 zcmeIbWmHz});7FoBt_{Eq`O2~LZp?H?(UXGKoF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@`OHoYO^LTXxw)ifHzpRQ4vC`@+zAR9q`r2^mp{ATCtonDb zC%m;R@^O&P5uQ??{Z-eC*zlH6-{6R zl%t+^0Ck*%A1)QRRK@Yy1ETTXHxJRdEFagb%4bwo#YTuH`3JVD?`u^e5M2NtaP!ap z8FkAdCH0xqHB-Un_M1rTFwU!9?KdY_D*WwZm;Ae^Blvw&<$}NVg8DS8Tf^>!Ny#3CE^`xAGi)vi&J}WaGnOEnBw$(^uYQgzM)oC_q_4K4{kEAx+~`_KRT zAL*d=pSl0PSZMm6HT<77{GT=O|M4|YZGVxGfJ~-C%9xPuIf`1WOJs+STev#${+;ei`e!>87P`wl*`8d{*#4usiQljk71V8}zPZTqV!4P6$9 z$oKv|OrV;0r;v_+NHil--Rxc+Y8(i|WsQJ(Us4Q7W)U+5hPM&m#ng?2ww_b3=cQFjSY-_y+ydhiu2L7J+l`$ZT4q8KBMFc@prDfP{G;Rl{%kvXo6 zD~ml_lcNF5@VzR7=xVR?6U3XP)$}O0IJ?>j$R!|uRXlHlC_#eUQHc899y)@eo(doq z1PgG^(HV7C2-E-k63+ONLXL@1S6fbLgzyd^fa(zA)EnV#_(l9PpV#CL5YW0#_;LpX Urrmd6`>*aD(Eo@3qTkK_FAxBTod5s; literal 0 HcmV?d00001 diff --git a/SCREENSHOTS.md b/SCREENSHOTS.md index 5751d32..d4f0e9e 100644 --- a/SCREENSHOTS.md +++ b/SCREENSHOTS.md @@ -1,6 +1,7 @@ ![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) From 264586b6c373c867927413cfd3d417815fd547cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Tue, 13 Mar 2007 20:31:51 +0000 Subject: [PATCH 46/53] =?UTF-8?q?feat:=20mise=20=C3=A0=20jour=20du=20code?= =?UTF-8?q?=20pour=20compilation=20sur=20LZASM=20en=20stdcall?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/divers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/divers.h b/include/divers.h index 33c09b6..a8e0063 100644 --- a/include/divers.h +++ b/include/divers.h @@ -1,2 +1,2 @@ -True equ 1 -False equ 0 +true equ 1 +false equ 0 From 8ec203c774cae3ac3da457eb905b8c6be535894a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Tue, 13 Mar 2007 20:34:15 +0000 Subject: [PATCH 47/53] =?UTF-8?q?feat:=20version=20initiale=20-=20contient?= =?UTF-8?q?=20les=20diff=C3=A9rentes=20structures=20et=20d=C3=A9clarations?= =?UTF-8?q?=20pour=20les=20=C3=A9l=C3=A9ments=20graphiques?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/graphic.h | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 include/graphic.h diff --git a/include/graphic.h b/include/graphic.h new file mode 100644 index 0000000..5eedb97 --- /dev/null +++ b/include/graphic.h @@ -0,0 +1,4 @@ +struc point +coordx db 0 +coordy db 0 +ends point From 7334a55e1dcebfee8228324c383618cf198ea9b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Tue, 13 Mar 2007 20:36:31 +0000 Subject: [PATCH 48/53] =?UTF-8?q?feat:=20ajouts=20pour=20la=20d=C3=A9tecti?= =?UTF-8?q?on=20avanc=C3=A9e=20de=20p=C3=A9riph=C3=A9rique=20PCI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/pci.h | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/include/pci.h b/include/pci.h index 380875e..936321d 100644 --- a/include/pci.h +++ b/include/pci.h @@ -1,4 +1,4 @@ -pci Struc +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 @@ -6,7 +6,7 @@ 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 +class db 0 ;class code cache db 0 ;cache line size timer db 0 ;latency timer typed db 0 ;header type @@ -16,4 +16,19 @@ typed db 0 ;header type ;02h PCI-to-CardBus bridge ;bit 7: multi-function device result db 0 ;Built-In Self-Test result -pci Ends +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 From 8ac538cc0e16ce47d8510990449939b45a1ea38e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Tue, 13 Mar 2007 20:41:27 +0000 Subject: [PATCH 49/53] =?UTF-8?q?feat:=20ajout=20d'une=20structure=20d?= =?UTF-8?q?=C3=A9crivant=20les=20processeurs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/cpu.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 include/cpu.h diff --git a/include/cpu.h b/include/cpu.h new file mode 100644 index 0000000..e2dbe43 --- /dev/null +++ b/include/cpu.h @@ -0,0 +1,20 @@ +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 From dcae05febe30693cf41607adb21665f0c14f52a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Tue, 13 Mar 2007 20:44:48 +0000 Subject: [PATCH 50/53] feat: rajout d'une structure pour le passage en mode FLAT --- include/mem.h | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/include/mem.h b/include/mem.h index 0c70401..3b78371 100644 --- a/include/mem.h +++ b/include/mem.h @@ -1,23 +1,32 @@ -MB struc ;Bloc de mémoire -Check dw '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 -MB ends +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 -exe struc ;Executable COS -Checks db "CE" ;signature de l'exe -major db 1 ;N° version majeur -minor db 0 ;N° version mineur +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 -import dw 0 ;importation de fonctions -export dw 0 ;exportation de fonctions -blocs dw 0 ;sections des blocs mémoire -exe ends +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 +free equ 0 ;Reference quand libre memorystart equ 0052h ;premier bloc de la mémoire From 2591259b6f69dca0272eb5d1d8e6cc1a0bee7d9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Tue, 13 Mar 2007 20:49:51 +0000 Subject: [PATCH 51/53] =?UTF-8?q?feat:=20librairie=20permettant=20la=20det?= =?UTF-8?q?ection=20du=20CPU,=20des=20p=C3=A9riph=C3=A9riques=20PCI=20et?= =?UTF-8?q?=20de=20VMWARE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/detect.asm | 772 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 772 insertions(+) create mode 100644 lib/detect.asm diff --git a/lib/detect.asm b/lib/detect.asm new file mode 100644 index 0000000..7d87ead --- /dev/null +++ b/lib/detect.asm @@ -0,0 +1,772 @@ +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,,,> + +exports: + db "cpuinfo",0 + dw cpuinfo + db "setinfo",0 + dw setinfo + db "pciinfo",0 + dw pciinfo + db "getpciclass",0 + dw getpciclass + db "getpcisubclass",0 + dw getpcisubclass + db "getcardinfo",0 + dw getcardinfo + db "pcireadbyte",0 + dw pcireadbyte + db "pcireadword",0 + dw pcireadword + db "pcireaddword",0 + dw pcireaddword + db "detectvmware",0 + dw detectvmware + dd 0 + +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 + 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 + mov di,[@pointer] +@@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 + + From 12b9aa9f58ff7daa50c570f8e7d2f4ab0c401447 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Tue, 13 Mar 2007 20:55:40 +0000 Subject: [PATCH 52/53] =?UTF-8?q?feat:=20mise=20=C3=A0=20jour=20du=20code?= =?UTF-8?q?=20pour=20compilation=20sur=20LZASM=20en=20stdcall=20Changement?= =?UTF-8?q?=20radical=20avec=20ajout=20d'un=20syst=C3=A8me=20multisection?= =?UTF-8?q?=20au=20format=20PE=20et=20detection=20de=20peripheriques?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noyau/systeme.asm | 1433 +++++++-------------------------------------- 1 file changed, 224 insertions(+), 1209 deletions(-) diff --git a/noyau/systeme.asm b/noyau/systeme.asm index 20919f7..b7f1c4d 100644 --- a/noyau/systeme.asm +++ b/noyau/systeme.asm @@ -1,1223 +1,238 @@ -.model tiny -.486 -smart -.code +model tiny,stdcall +p586N +locals +jumps +codeseg +option procalign:byte + +include "..\include\mem.h" +include "..\include\divers.h" +include "..\include\cpu.h" +include "..\include\pci.h" org 0h -include ..\include\fat.h -include ..\include\mem.h +mb0: +header exe <"CE",1,0,0,offset exports,offset imports,offset section,offset start> start: -push cs -push cs -push cs -push cs -pop ds -pop es -pop fs -pop gs - xor ax,ax - mov ds,ax - mov si,7C00h - mov di,offset myboot - mov cx,type bootsector - push cs - pop es - rep movsb - push cs - pop ds -jmp noone - xor ax,ax - mov es,ax - mov di,1Eh*4 - lds si,es:[di] - mov es:[di],cs - mov word ptr es:[di],offset myDPT - push cs - pop es - mov cx,type DPT - rep movsb - mov ax,cs:[Bootsector.SectorsPerTrack] - mov es:[DPT.SectorPerTracks],al -noone: - push cs - push cs - push cs - push cs - pop ds - pop es - pop fs - pop gs - mov si,offset present - mov bl,4 - call showstr - mov si,offset premice2 - mov bl,7 - call showstr - call MBinit - jc nomem1 - mov cx,65453 - mov si,offset sysname - call MBcreate - call InitDrive - mov si,offset premice - mov bl,7 - call showstr - mov si,offset next - call showstr - mov si,offset conf - call showstr - mov al,0 - mov cx,2000 - mov di,offset loadinglist - rep stosb - mov di,offset loadinglist - call loadfile - jc noconfread - mov si,offset debut - mov bl,7 - call showstr - xor cx,cx - mov si,offset loadinglist -suiteloading: - call readline - jc noconfload - mov bl,7 - push si - mov si,offset next - call showstr - pop si - call showstr - xor bp,bp - mov dx,ax - cmp ax,8h - jb noadder - cmp ax,10h - ja noadder - mov bp,1 - sub dx,8 - jmp haveirq -noadder: - cmp ax,70h - jb noadd - cmp ax,78h - ja noadd - mov bp,1 - sub dx,68h -haveirq: - push si - mov si,offset irqs - call showstr - mov cx,4 - call showhex - mov si,offset irqsend - call showstr - pop si -noadd: - cmp bp,1 - jne install - call replacehandler - jmp suites -install: - call installhandler -suites: - jc nohandlerload - mov dx,es - mov bl,7 - push si - mov si,offset address - call showstr - mov cx,16 - call showhex - mov si,offset addressend - call showstr - inc cx - pop si - call nextline - jnz suiteloading - - ;initialisation des MCBs - mov ah,0 - int 49h - mov ah,3 - int 48h - push memorystart - pop gs - mov ah,10 - int 49h - mov ah,1 - int 49h - - mov si,offset fini - mov bl,7 - call showstr - mov si,offset next - call showstr - mov si,offset prompt - call showstr - mov ah,18 - int 48h - jc nopromptload - -nopromptload: - mov si,offset prompte - mov bl,4 - call showstr - jmp erroron - -nohandlerload: - mov si,offset handlere - mov bl,4 - call showstr - jmp erroron - -noconfread: - mov si,offset confee - mov bl,4 - call showstr - jmp erroron - -nomem1: - mov si,offset premice2e - mov bl,4 - call showstr - jmp erroron - -nomem2: - mov si,offset premice3e - mov bl,4 - call showstr - jmp erroron - - -noconfload: - mov di,si - mov si,offset confe - mov bl,4 - call showstr - mov dx,cx - mov cx,16 - call showhex - mov si,offset confe2 - mov bl,3 - call showstr - mov dx,di - mov cx,16 - call showhex - -erroron: - push cs - pop ds - mov si,offset erreur - mov bl,4 - call showstr - mov ax,0 - int 16h - push 0FFFFh - push 0 - db 0CBh - -address db ' [',0 -addressend db '] ',0 -irqs db ' (IRQ ',0 -irqsend db ')',0 -prompt db 'commande.ce',0 -conf db 'systeme.ini',0 -sysname db 'SYSTEME.SYS',0 -premice db 0Dh,0Ah,'Chargement du fichier de configuration:',0 -debut db 0Dh,0Ah,'Chargement des pilotes systeme:',0 -fini db 0Dh,0Ah,'Chargement de l''interpreteur de commande:',0 -next db 0Dh,0Ah,' - ',0 -prompte db 0Dh,0Ah,'Erreur lors du chargement de l''interpreteur',0 -handlere db 0Dh,0Ah,'Erreur lors du chargement des pilotes',0 -confe db 0Dh,0Ah,'Erreur dans le fichier de configuration a la ligne ',0 -confee db 0Dh,0Ah,'Erreur de lecture du fichier de configuration',0 -confe2 db ' caractere ',0 -erreur db 0Dh,0Ah,'Pressez une touche pour redemarrer...',0 -present db 0Dh,0Ah,'COS2000 Version 1.2',0 -premice2 db 0Dh,0Ah,'Initialisation de la memoire',0 -premice2e db 0Dh,0Ah,'Erreur lors de l''initialisation memoire',0 -premice3e db 0Dh,0Ah,'Erreur lors de la reservation memoire',0 -;==positionne si sur l'entrée suivante de la loading liste jusqu'a equal -nextline: -push ax cx di -push cs -pop es -mov di,si -mov al,0Ah -mov cx,20 -cld -repnz scasb -mov si,di -cmp byte ptr [di],0 -pop di cx ax -ret - -;==Lit la loading list et initialise SI(Fichier) AX(interruption) -readline: -push cx dx di es -push cs -pop es -;Voir taille de la ligne -> DX -mov di,si -mov al,0Dh -mov cx,20 -cld -repne scasb -sub cx,20 -neg cx -mov dx,cx -;N° interruption ?? -mov di,si -mov al,'(' -repne scasb -jne noaddr -;Non, je recherche l'int positionnement parenthese de fin -mov al,')' -repne scasb -jne errorlist -;Je lit l'interruption dans DL -xor dl,dl -xor cx,cx -dec di -readingint: -dec di -mov al,[di] -cmp al,'(' -je finishint -call eval -jc errorlist -shl ax,cl -add dl,al -add cx,4 -cmp cx,8 -ja errorlist -jmp readingint -noaddr: -dec di -mov dl,0 -finishint: -;mise d'un 0 a la fin du nom -mov byte ptr [di],0 -mov al,dl -pop es di dx cx -clc -ret -errorlist: -sub di,si -mov si,di -pop es di dx cx -stc -ret - - -;return carry si pas hexa pour al et renvoie dans al la valeur décimale -eval: -push si -xor si,si -searchex: -cmp al,cs:[si+offset hexas] -je endsearchex -inc si -cmp si,15 -jbe searchex -pop si -stc -ret -endsearchex: -mov ax,si -pop si -clc -ret - -hexas db '0123456789ABCDEF',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 - -showreg: -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 poppp -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 poppp -call Showstr -xor ax,ax -int 16h -pop ds -popf -popad -ret -begines db ' es[',0 -beginds db ' ds[',0 -ende db '] ',0 - -;vide ES pour 200 octets (pour test) -showmem: -pushad -pushf -mov si,offset poppp -mov bx,7 -call Showstr -mov dx,es -mov cx,16 -mov bx,7 -call ShowHex -mov si,offset poppp -mov bx,7 -call Showstr -xor si,si -loopererr: -mov dx,es:[si] -mov cx,8 -mov bx,7 -call ShowHex -inc si -cmp si,200 -jb loopererr -mov si,offset poppp -mov bx,7 -call Showstr -xor ax,ax -int 16h -popf -popad -ret - -poppp db 0Ah,0Dh,'*********',0Ah,0Dh,0 - -;================================================ -;Routine de gestion de la mémoire -;================================================ - -include ..\include\mem.h - -FirstMB dw 0 - - -;Initialise les blocs de mémoire en prenant GS pour segment de base -MBinit: - push ax cx es - mov ax,memorystart - mov cs:Firstmb,ax - mov cx,0A000h - sub cx,ax - dec ax - dec ax - mov es,ax - mov es:[MB.Reference],Free - mov es:[MB.Sizes],cx - mov es:[MB.Check],'NH' - mov dword ptr es:[MB.Names],'eerF' - mov dword ptr es:[MB.Names+4],0 - mov es:[MB.IsNotLast],False - clc - pop es cx ax - ret -notforfree: - stc - pop es cx ax - ret - -;Creér un bloc de nom ds:si de taille cx (octets) -> n°segment dans GS -MBCreate: - push ax bx cx dx si di es - shr cx,4 - inc cx - mov bx,cs:firstmb - dec bx - dec bx - mov dl,1 -searchfree: - cmp dl,False - je wasntgood - mov es,bx - cmp es:[MB.Check],'NH' - jne wasntgood - cmp es:[MB.IsNotLast],True - sete dl - cmp es:[MB.Reference],Free - jne notsogood - mov ax,es:[MB.Sizes] - cmp cx,ax - ja notsogood - mov word ptr es:[MB.Check],'NH' - mov es:[MB.IsNotLast],True - mov es:[MB.Reference],cs - mov es:[MB.IsResident],True - mov es:[MB.Sizes],cx - mov di,MB.Names - push ax cx - mov cx,32 -loops: - mov dh,[si] - inc si - dec cx - jz endofloops - cmp dh,0 - je endofloops - mov es:[di],dh - inc di - jmp loops -endofloops: - inc cx - mov al,0 - rep stosb - pop cx ax - sub ax,cx - dec ax - dec ax - ;js nofree - inc bx - inc bx - mov gs,bx - add bx,cx - mov es,bx - mov es:[MB.IsNotLast],dl - mov es:[MB.IsResident],False - mov es:[MB.Reference],Free - mov es:[MB.Sizes],ax - mov dword ptr es:[MB.Names],'eerF' - mov dword ptr es:[MB.Names+4],0 - mov es:[MB.Check],'NH' -nofree: - clc - pop es di si dx cx bx ax - ret -wasntgood: - stc - pop es di si dx cx bx ax - ret -notsogood: - inc bx - inc bx - add bx,es:[MB.Sizes] - jmp searchfree - -;================================================ -;Routine de gestion de handler -;================================================ - -;remplace le handler pointer par ds:si en bloc:100h interruption ax -replacehandler: -push ax bx cx si di ds -call projfile -jc reph -mov bx,ax -call getint -mov es:[2h],si -mov es:[4h],ds -call setint -reph: -pop ds di si cx bx ax -ret - -;install le handler pointer par ds:si en bloc:100h interruption ax -> es -installhandler: -push bx cx -call projfile -jc insh -mov bx,ax -call setint -insh: -pop cx bx -ret - -;met es:100h le handle de l'int bx -setint: -push ax bx ds -cli -shl bx,2 -xor ax,ax -mov ds,ax -mov word ptr ds:[bx],0h -mov ds:[bx+2],es -pop ds bx ax -sti -ret - -;met dans ds:si le handle de l'int bx -getint: -push ax bx es -shl bx,2 -xor ax,ax -mov es,ax -mov si,es:[bx] -mov ds,es:[bx+2] -pop es bx ax -ret - -;================================================ -;Routine de gestion de systeme de fichier FAT12 -;================================================ - -;DPT disquette -mydpt DPT ? - -;Secteur de boot -myboot bootSector ? - -;Données Calculée -clustersize dw 0 -TracksPerHead dw 0 -DriveSize dd 0 -AdressBoot dw 0 -AdressFat dw 0 -AdressParent dw 0 -AdressData dw 0 -AddingValue dw 0 -CurrentDir dw 0 ;En cluster -CurrentDirStr db 128 dup (0) - -;Pour recherches -EntryPlace dw 0 ;En octet -AdressDirectory dw 0 ;En cluster -firstsearch dw 1 ;Premiere requete ? - -getfat: - push ax bx dx si - mov ax,cx - mov bx,ax - and bx,0000000000000001b - shr ax,1 - mov cx,3 - mul cx - mov si,offset bufferfat - add si,ax - cmp bx,0h - jnz evenfat -oddfat: - mov dx,cs:[si] - and dx,0FFFh - mov cx,dx - jmp endfat -evenfat: - mov dx,cs:[si+1] - and dx,0FFF0h - shr dx,4 - mov cx,dx -endfat: - cmp dx,0FF0h - jbe nocarry - stc - pop si dx bx ax - ret -nocarry: - clc - pop si dx bx ax - ret - -;============projfile (Fonction 17)=============== -;Charge le fichier ds:si sur un bloc mémoire -> ecx taille -> es bloc -;-> AH=17 -;<- Flag Carry si erreur -;===================================================== -projfile: - push eax bx di gs - push cs - pop es - call uppercase - mov di,offset tempfit - call searchfile - jne errorload - jc errorload - mov eax,cs:tempfit.FileSize - mov ecx,eax - call MBCreate - jc errorload - push gs - pop es - mov cx,cs:tempfit.FileGroup - mov di,0h - call loadway - jc errorload - clc - mov ecx,eax - pop gs di bx eax - ret -errorload: - stc - mov ecx,0 - pop gs di bx eax - ret - -;============loadfile (Fonction 4)=============== -;Charge le fichier ds:si en es:di ->ecx taille -;-> AH=4 -;<- Flag Carry si erreur -;===================================================== -loadfile: - push eax bx di - push es di - push cs - pop es - mov di,offset tempfit - call searchfile - pop di es - jne errorload - jc errorload - mov cx,cs:tempfit.FileGroup - mov eax,cs:tempfit.FileSize - call loadway - jc errorload2 - clc - ;mov ecx,eax - pop di bx eax - ret -errorload2: - stc - mov ecx,0 - pop di bx eax - ret - -tempfit db 32 dup (0) - -;=============SearchFile (Fonction 10)=============== -;Renvois dans ES:DI la fit du fichier DS:SI et non equal si pas existant -;-> AH=10 -;<- Flag Carry si erreur -;===================================================== -SearchFile: - push ax cx ds si di es - call uppercase - push ds si - call findfirstfilez - push ds - pop es - mov di,si - pop si ds - jc errorsearch - jmp founded -nextsearch: - push ds si - call findnextfilez - push ds - pop es - mov di,si - pop si ds -founded: - cmp byte ptr cs:[di],0 - je notgood - cmp byte ptr cs:[di+FileAttr],0Fh - je nextsearch - call cmpnames - jc nextsearch -okfound: - push cs - pop ds - mov si,di - pop es di - push di es - mov cx,32 - rep movsb - clc - pop es di si ds cx ax - ret -notgood: - cmp si,0FF5h - pop es di si ds cx ax - ret -errorsearch: - stc - pop es di si ds cx ax - ret - -;Transforme la chaine ds:si en maj -uppercase: - push si ax - mov di,si -uppercaser: - mov al,ds:[si] - cmp al,0 - je enduppercase - cmp al,'a' - jb nonmaj - cmp al,'z' - ja nonmaj - sub al,'a'-'A' - mov ds:[si],al -nonmaj: - inc si - jmp uppercaser -enduppercase: - clc - pop ax si - ret - -;Compare le nom ds:si '.' avec es:di -CmpNames: - push ax cx si di - mov cx,8 - repe cmpsb - jne nequal - inc si - jmp equal -nequal: - cmp byte ptr es:[di-1],' ' - jne notequal -equal: - cmp byte ptr [si-1],'.' - jne trynoext - mov al,' ' - rep scasb - mov cx,3 - rep cmpsb - jne nequal2 + push cs + push cs + push cs + push cs + pop ds + pop es + pop fs + pop gs + call biosprint,offset return + call biosprint,offset msg_memory + call biosprint,offset return + call biosprint,offset msg_memory_init + call mbinit + jc error + call biosprint,offset msg_ok + call biosprint,offset msg_memory_section + mov ax,cs + dec ax + dec ax + call mbloadsection,ax + jc error + call biosprint,offset msg_ok + call biosprint,offset msg_memory_jumps + jmp [dword ptr cs:pointer] +pointer: + dw suite + dw memorystart +suite: + push cs + push cs + push cs + push cs + pop ds + pop es + pop fs + pop gs + call biosprint,offset msg_ok + call biosprint,offset msg_video_init + call [setvideomode],2 + jc error + call [clearscreen] + call [print],offset msg_memory + call [print],offset msg_ok2 + call [print],offset msg_memory_init + call [print],offset msg_ok2 + call [print],offset msg_memory_section + call [print],offset msg_ok2 + call [print],offset msg_memory_jumps + call [print],offset msg_ok2 + call [print],offset msg_video_init + call [print],offset msg_ok2 + call [print],offset msg_cpu_detect + call [cpuinfo],offset thecpu + call [setinfo],offset thecpu,offset temp + call [print],offset msg_ok2 + push offset temp + xor eax,eax + mov al,[thecpu.family] + push eax + mov al,[thecpu.models] + push eax + mov al,[thecpu.stepping] + push eax + push offset thecpu.names + push offset thecpu.vendor + call [print],offset msg_cpu_detect_inf + call [print],offset msg_pci + call [pciinfo],offset thepci + jc nopci + call [print],offset msg_ok2 + xor eax,eax + mov al,[thepci.maxbus] + push eax + mov al,[thepci.version_minor] + push eax + mov al,[thepci.version_major] + push eax + call [print],offset msg_pci_info + call [print],offset msg_pci_enum + xor ebx,ebx + xor ecx,ecx + xor esi,esi +searchpci: + call [getcardinfo],bx,cx,si,offset temp + jc stopthis + mov al,[(pcidata offset temp).subclass] + push ax + mov al,[(pcidata offset temp).class] + push ax + call [getpcisubclass] + push dx + push ax + mov al,[(pcidata offset temp).class] + xor ah,ah + push ax + call [getpciclass] + push dx + push ax + push 4 + push esi + push 4 + push ecx + push 4 + push ebx + mov ax,[(pcidata offset temp).device] + push eax + mov ax,[(pcidata offset temp).vendor] + push eax + call [print],offset msg_pci_card inc si - jmp equal2 -nequal2: - cmp byte ptr es:[di-1],' ' - jne notequal -equal2: - cmp byte ptr [si-1],0 - jne notequal -itok: - clc - pop di si cx ax - ret -notequal: - stc - pop di si cx ax - ret -trynoext: - cmp byte ptr [si-1],0 - jne notequal - jmp itok + cmp si,7 + jbe searchpci +stopthis: + xor si,si + inc cx + cmp cx,31 + jbe searchpci + xor cx,cx + inc bx + cmp bx,16 + jbe searchpci + jmp next +nopci: + call [print],offset msg_echec2 +next: + call [print],offset msg_fini +; call [detectvmware] +; jne novirtual +; call [print],offset msg_vmware +;novirtual: -;charge le fichier de de groupe CX et de taille eax -LoadWay: - push eax bx dx si di ecx ds es - cmp eax,0 - je Zeroload - rol eax,16 - mov dx,ax - ror eax,16 - div cs:clusterSize - mov bx,ax - cmp bx,1 - jb adjustlast -Loadfat: - call readcluster - jc noway - add di,cs:clusterSize - call getfat - dec bx - jnz loadfat -AdjustLast: - push es di - push cs - pop es - mov di,offset bufferread - mov si,di - call Readcluster - pop di es - jc noway - mov cx,dx - push cs - pop ds - rep movsb -zeroload: - clc - pop es ds ecx di si dx bx eax - ret -noway: - stc - pop es ds ecx di si dx bx eax - ret +error2: + call [print],offset msg_error2 + call bioswaitkey + jmp far 0FFFFh:0000h -;=============INITDRIVE (Fonction 04H)=============== -;Initialise le lecteur pour une utilisation ultérieure -;-> AH=4 -;<- Flag Carry si erreur -;===================================================== -InitDrive: - push eax bx cx edx di ds es - push cs - pop ds - push cs - pop es - mov cs:lastseg,0 - mov cs:lastoff,0 - mov cs:LastRead,0 - mov ax,myboot.sectorsize - mov bl,myboot.SectorsPerCluster - xor bh,bh - mul bx - mov clustersize,ax - mov bx,myboot.HiddenSectorsL - adc bx,myboot.HiddenSectorsH - mov AdressBoot,bx - add bx,myboot.ReservedSectors - mov AdressFat,bx - xor ax,ax - mov al,myboot.FatsPerDrive - mul myboot.SectorsPerFat - add bx,ax - mov AdressParent,bx - mov AdressDirectory,bx - mov ax,32 - mul myboot.DirectorySize - div myboot.SectorSize - add bx,ax - mov AdressData,bx - sub bx,2 - mov AddingValue,bx - mov ax,myboot.SectorsPerDrive - div myboot.SectorsPerTrack - xor dx,dx - div myboot.HeadsPerDrive - mov TracksPerHead,ax - xor eax,eax - mov ax,myboot.SectorsPerDrive - sub ax,AdressData - mul myboot.SectorSize - shl edx,16 - add edx,eax - mov DriveSize,edx - mov CurrentDir,0 - mov EntryPlace,0 - mov adressdirectory,0 - mov firstsearch,1 - mov currentdirstr,0 - mov di,offset bufferfat - mov dx,myboot.SectorsPerFat - mov cx,AdressFat -SeeFat: - call readsector - jc ErrorInit - add di,myboot.SectorSize - inc cx - dec dx - jnz seefat - clc - pop es ds di edx cx bx eax - ret -ErrorInit: - stc - pop es ds di edx cx bx eax - ret +error: + call biosprint,offset msg_error + call bioswaitkey + jmp far 0FFFFh:0000h + -;=============FindFirstFile (Fonction 7)============== -;Renvois dans ES:DI un bloc d'info -;-> AH=7 -;<- Flag Carry si erreur -;===================================================== -FindFirstFileZ: - push cx - mov cx,cs:CurrentDir - mov cs:AdressDirectory,cx - xor cx,cx - mov cs:EntryPlace,cx - mov cs:firstsearch,1 - call findnextfileZ - pop cx - ret +thepci pciinf <> +thecpu cpu <> +temp db 256 dup (0) +return db 0dh,0ah,0 +msg_memory db "Initialisation de la memoire",0 +msg_memory_init db " -Creation du bloc primordial",0 +msg_memory_section db " -Developpement des sections",0 +msg_memory_jumps db " -Redirection du systeme",0 +msg_video_init db "Initialisation du pilote VIDEO",0 +msg_cpu_detect db "Dectection du processeur",0 +msg_cpu_detect_inf db " -Fondeur : %0\l -Modele : %0\l -Revision : %u\l -Version : %u\l -Famille : %u\l -Technologies: %0\l",0 +msg_pci db "Detection des systemes PCI",0 +msg_pci_info db " -Version : %yB.%yB\l -Nombre de bus : %u\l",0 +msg_pci_enum db " -Enumeration des peripheriques PCI:\l" + db " |Vendeur|Modele|Bus |Dev.|Func|Classe.Sous-classe\l",0 +msg_pci_card db " | %hW | %hW |%w|%w|%w|%0P.%0P\l",0 +;msg_vmware db "\c04 VMWare a été detecté !!!\c07",0 +msg_fini db "\c04Demarrage terminee : c pas encore fini :(:(:( mais c pour l'inspiration !",0 -;=============FindnextFile (Fonction 8)============== -;Renvois dans ES:DI un bloc d'info -;-> AH=8 -;<- Flag Carry si erreur -;===================================================== -;fait pointer ds:si sur la prochaine entrée du repertoire courant -FindnextFileZ: - push ax bx cx es di - push cs - pop ds - mov cx,cs:AdressDirectory - mov bx,cs:Entryplace -FindnextFileagain: - cmp cs:firstsearch,1 - je first - add bx,32 - cmp bx,cs:clusterSize - jb nopop -first: - mov di,offset bufferentry - push cs - pop es - mov bx,0 - cmp cs:currentdir,0 - jne notrootdir - cmp cs:firstsearch,1 - je noaddfirst1 - inc cx -noaddfirst1: - add cx,cs:adressparent - mov al,myboot.sectorspercluster -readroot: - call readsector - jc notwell - add di,myboot.sectorsize - dec al - jnz readroot - sub cx,cs:adressparent - jmp nopop -notrootdir: - cmp cs:firstsearch,1 - je noaddfirst2 - call getfat -noaddfirst2: - jc notwell - call readcluster - jc notwell -nopop: - mov cs:firstsearch,0 - mov si,offset bufferentry - add si,bx - cmp byte ptr cs:[si],0 - je notwell - mov cs:entryplace,bx - mov cs:AdressDirectory,cx - cmp byte ptr cs:[si],0E5h - je findnextfileagain - cmp byte ptr cs:[si+fileattr],28h - je findnextfileagain - cmp byte ptr cs:[si+fileattr],0Fh - je findnextfileagain - clc - pop di es cx bx ax - ret -notwell: - stc - pop di es cx bx ax - ret +msg_error db " [Erreur]",0dh,0ah,"",0 +msg_ok db " [ Ok ]",0dh,0ah,0 +msg_error2 db "\h70 [\c04Erreur\c07]\g00,49",0 +msg_ok2 db "\h70 [\c02 Ok \c07]\l",0 +msg_echec2 db "\h70 [\c0CPasser\c07]\l",0 + +imports: + db "VIDEO::setvideomode",0 +setvideomode dd 0 + db "VIDEO::clearscreen",0 +clearscreen dd 0 + db "VIDEO.LIB::print",0 +print dd 0 + db "DETECT.LIB::cpuinfo",0 +cpuinfo dd 0 + db "DETECT.LIB::setinfo",0 +setinfo dd 0 + db "DETECT.LIB::pciinfo",0 +pciinfo dd 0 + db "DETECT.LIB::getcardinfo",0 +getcardinfo dd 0 + db "DETECT.LIB::getpcisubclass",0 +getpcisubclass dd 0 + db "DETECT.LIB::getpciclass",0 +getpciclass dd 0 + ;db "DETECT.LIB::detectvmware",0 +;detectvmware dd 0 + dw 0 + +exports: +include "mcb.asm" +mb1: +includebin "video.sys" +mb2: +includebin "..\lib\video.lib" +mb3: +includebin "..\lib\detect.lib" +mb4: +section: +dw offset mb0 +dw offset mb1-offset mb0 +db "SYSTEME",0 -;=============READCLUSTER (Fonction 14)=============== -;Lit le secteur CX et le met en es:di -;-> AH=14 -;<- Flag Carry si erreur -;===================================================== -readcluster: - push ax bx cx dx di - mov ax,cx - mov bl,cs:myboot.sectorspercluster - xor bh,bh - mul bx - mov cx,ax - add cx,cs:addingvalue -readsectors: - call readsector - jc errorreadincluster - add di,cs:myboot.sectorsize - inc cx - dec bl - jnz readsectors - clc - pop di dx cx bx ax - ret -errorreadincluster: - stc - pop di dx cx bx ax - ret +dw offset mb1 +dw offset mb2-offset mb1 +db "VIDEO",0 -;=============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 - cmp cx,cs:lastread - jne gom - mov ax,es - cmp cs:lastseg,ax - jne gom - cmp di,cs:lastoff - jne gom - jmp done -gom: - mov cs:lastseg,ax - mov cs:lastoff,di - mov cs:LastRead,cx - mov ax,cx - xor dx,dx - div cs:myboot.SectorsPerTrack - inc dl - mov bl,dl - xor dx,dx - div cs:myboot.HeadsPerDrive - mov dh,cs:myboot.bootdrive - 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 - int 13h - jnc Done - dec SI - jnz TryAgain -Done: - pop si dx cx bx ax -ret +dw offset mb2 +dw offset mb3-offset mb2 +db "VIDEO.LIB",0 + +dw offset mb3 +dw offset mb4-offset mb +db "DETECT.LIB",0 + +dd 0 + -lastread dw 0 -lastseg dw 0 -lastoff dw 0 - -bufferread equ $ -bufferFat equ $+2048 -bufferentry equ $+2048+2048 -loadinglist equ $+2048+2048+2048 -end start From 89b122da160072863947b14aba890fac30967d0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Tue, 13 Mar 2007 20:56:55 +0000 Subject: [PATCH 53/53] =?UTF-8?q?feat:=20mise=20=C3=A0=20jour=20du=20code?= =?UTF-8?q?=20pour=20compilation=20sur=20LZASM=20en=20stdcall?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MAKEFILE | 29 +- include/fat.h | 106 ++-- install/MAKEFILE | 18 +- install/setup.asm | 36 +- lib/MAKEFILE | 26 + lib/video.asm | 713 ++++++++++-------------- noyau/8259a.asm | 149 +---- noyau/MAKEFILE | 79 +-- noyau/boot.asm | 348 ++++++------ noyau/mcb.asm | 1207 +++++++++++++++++++++++------------------ noyau/video.asm | 1317 ++++++++++++++++++++++----------------------- 11 files changed, 1944 insertions(+), 2084 deletions(-) create mode 100644 lib/MAKEFILE diff --git a/MAKEFILE b/MAKEFILE index 8977b8f..51bd6de 100644 --- a/MAKEFILE +++ b/MAKEFILE @@ -1,9 +1,5 @@ all: - cd commande - make - cd .. - - cd programs + cd lib make cd .. @@ -11,31 +7,16 @@ all: make cd .. - cd contribs - make - cd .. - cd install make cd .. copy: make all - copy commande\*.exe ..\binaires\data - copy programs\*.com ..\binaires\data - copy programs\*.rip ..\binaires\data - copy noyau\*.sys ..\binaires\data - copy noyau\*.bin ..\binaires\data - copy contribs\*.com ..\binaires\data - copy install\*.com ..\binaires - make clean + clean: - cd commande - make clean - cd .. - - cd programs + cd lib make clean cd .. @@ -43,10 +24,6 @@ clean: make clean cd .. - cd contribs - make clean - cd .. - cd install make clean cd .. diff --git a/include/fat.h b/include/fat.h index 4c89a7d..f7f2edf 100644 --- a/include/fat.h +++ b/include/fat.h @@ -1,58 +1,52 @@ -Free equ 0 -True equ 1 -False equ 0 +struc dpt +steprate&headunload db 0DFh ;Vitesse de progression & mont‚e 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 donn‚es +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 mont‚e en vitesse du moteur +ends dpt -DPT struc -StepRate&HeadUnload db 0DFh ;Vitesse de progression & mont‚e 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 donn‚es -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 mont‚e en vitesse du moteur -DPT ends +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 -Entries Struc -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 -Entries Ends - -BootSector Struc -jumper db 0,0,0 -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 -MédiaDescriptor 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 cach‚s -HiddenSectorsL dw 0 ; -SectorPerDisk2 dd 0 ;Nombre secteur du volume si > 32 Mo+20h ; the number of sectors -BootDrive db 0 ;Lecteur de d‚marrage -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 -bootcode db 453 dup (0) -BootSector ends +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 cach‚s +hiddensectorsl dw 0 ; +sectorperdisk2 dd 0 ;Nombre secteur du volume si > 32 Mo+20h ; the number of sectors +bootdrive db 0 ;Lecteur de d‚marrage +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 diff --git a/install/MAKEFILE b/install/MAKEFILE index b37e0e8..bee0406 100644 --- a/install/MAKEFILE +++ b/install/MAKEFILE @@ -1,16 +1,20 @@ -lnk_boot = tlink /x -asm= tasm /t/m5/zi -lnk= tlink /x/t +asm= lzasm +lnk= elink all: setup.com -setup.com: setup.asm - $(asm) setup - $(lnk) setup +setup.com: setup.obj + $(lnk) setup.obj setup.com + +setup.obj: + $(asm) setup.asm clean: del *.obj del *.exe + del *.bak + del *.lib del *.com + del *.bin del *.sys - del *.err + del *.err \ No newline at end of file diff --git a/install/setup.asm b/install/setup.asm index e55dd8d..949cb11 100644 --- a/install/setup.asm +++ b/install/setup.asm @@ -1,20 +1,21 @@ -.model tiny -.486 -smart -.code +model tiny,stdcall +p486 +locals +jumps +codeseg +option procalign:byte org 0100h ent equ 32h -start: -jmp CopyCOS +jmp copycos -Message db 0Dh,0Ah,'COS 2000 V1.2Fr 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,'$' +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 @@ -53,7 +54,7 @@ copycos: mov dx,offset message3 int 21h allfile: - mov byte ptr [offset dta+43],'$' + mov [byte ptr offset dta+43],'$' mov ah,9 mov dx,offset dta+30 int 21h @@ -97,8 +98,8 @@ allfile: push cs pop es mov di,offset dta+30-3 - mov word ptr [di],":a" - mov byte ptr [di+2],"\" + mov [word ptr di],":a" + mov [byte ptr di+2],"\" xor cx,cx mov dx,di int 21h @@ -118,7 +119,7 @@ allfile: jc error mov ah,4fh int 21h - jnc allfile + jnc allfile mov ah,09 mov dx,offset message2 int 21h @@ -146,7 +147,7 @@ allfile: xor bx,bx int 13h mov ah,09 - mov dx,offset Ok + mov dx,offset ok int 21h xor ax,ax int 16h @@ -160,5 +161,4 @@ error: xor ax,ax int 16h ret - -end start + diff --git a/lib/MAKEFILE b/lib/MAKEFILE new file mode 100644 index 0000000..a66c89b --- /dev/null +++ b/lib/MAKEFILE @@ -0,0 +1,26 @@ +asm= lzasm +lnk= elink + +all: detect.lib video.lib + +detect.lib: detect.obj + $(lnk) detect.obj detect.lib + +video.lib: video.obj + $(lnk) video.obj video.lib + +detect.obj: + $(asm) detect.asm + +video.obj: + $(asm) video.asm + +clean: + del *.obj + del *.exe + del *.bak + del *.lib + del *.com + del *.bin + del *.sys + del *.err \ No newline at end of file diff --git a/lib/video.asm b/lib/video.asm index 2af1806..c90b916 100644 --- a/lib/video.asm +++ b/lib/video.asm @@ -1,14 +1,15 @@ -.model tiny -.486 -smart +model tiny,stdcall +p486 locals -.code +jumps +codeseg +option procalign:byte + +include "..\include\mem.h" + org 0h -include ..\include\mem.h - -start: -header exe <,1,0,,,,offset exports,> +header exe <"CE",1,0,0,offset exports,offset imports,,> exports: db "print",0 @@ -25,20 +26,16 @@ exports: dw showsize db "showspace",0 dw showspace - db "showline",0 - dw showline - db "showchar",0 - dw showchar db "showint",0 - dw ShowInt - db "Showsigned",0 - dw Showsigned + dw showint + db "showsigned",0 + dw showsigned db "showhex",0 - dw ShowHex + dw showhex db "showbin",0 - dw Showbin + dw showbin db "showbcd",0 - dw ShowBCD + dw showbcd db "showstring",0 dw showstring db "showstring0",0 @@ -48,19 +45,40 @@ exports: db "showintl",0 dw showintl dw 0 + +imports: + db "VIDEO::addline",0 +addline dd 0 + db "VIDEO::setcolor",0 +setcolor dd 0 + db "VIDEO::getxy",0 +getxy dd 0 + db "VIDEO::setxy",0 +setxy dd 0 + db "VIDEO::setvideomode",0 +setvideomode dd 0 + db "VIDEO::setfont",0 +setfont dd 0 + db "VIDEO::clearscreen",0 +clearscreen dd 0 + db "VIDEO::enablescroll",0 +enablescroll dd 0 + db "VIDEO::disablescroll",0 +disablescroll dd 0 + db "VIDEO::showchar",0 +showchar dd 0 + dw 0 ;================PRINT============== ;Affiche la chaine %0 en utilisant les parametres de formatage %x....%x ;-> %0 %x ;<- ;=================================== -print PROC FAR - ARG pointer:word=taille - push bp - mov bp,sp +PROC print FAR + ARG @@pointer:word push ax bx cx si di xor di,di - mov si,[pointer] + mov si,[@@pointer] @@strinaize0: mov cl,[si] cmp cl,0 @@ -70,16 +88,17 @@ print PROC FAR cmp cl,'\' je @@special2 @@showit: - call charout + xor ch,ch + call [cs:showchar],cx,0FFFFh inc si jmp @@strinaize0 @@special: - cmp byte ptr [si+1],'%' + cmp [byte ptr si+1],'%' jne @@notshowit inc si jmp @@showit @@notshowit: - mov cl,byte ptr [si+1] + mov cl,[byte ptr si+1] cmp cl,'c' je @@showchar cmp cl,'u' @@ -114,20 +133,18 @@ print PROC FAR jmp @@no0 @@showchar: - cmp byte ptr [si+2],'M' + cmp [byte ptr si+2],'M' je @@showmultchar - push word ptr [offset pointer+di+2] - call showchar + call [cs:showchar],[word ptr @@pointer+di+2],0FFFFh add si,2 add di,2 jmp @@strinaize0 @@showmultchar: - mov cx,[offset pointer+di+2+2] + mov cx,[offset @@pointer+di+2+2] cmp cx,0 je @@nextfunc @@showcharx: - push word ptr [offset pointer+di+2] - call showchar + call [cs:showchar],[word ptr @@pointer+di+2],0FFFFh dec cx jnz @@showcharx @@nextfunc: @@ -136,27 +153,20 @@ print PROC FAR jmp @@strinaize0 @@showint: - push dword ptr [offset pointer+di+2] - call showint + call showint,[dword ptr @@pointer+di+2] add si,2 add di,4 jmp @@strinaize0 @@showfixint: - push dword ptr [offset pointer+di+2] - add di,4 - push word ptr [offset pointer+di+2] - add di,2 - call showintl + call showintl,[word ptr @@pointer+di+6],[dword ptr @@pointer+di+2] + add di,6 add si,2 jmp @@strinaize0 @@showintr: - push dword ptr [offset pointer+di+2] - add di,4 - push word ptr [offset pointer+di+2] - add di,2 - call showintr + call showintr,[word ptr @@pointer+di+6],[dword ptr @@pointer+di+2] + add di,6 add si,2 jmp @@strinaize0 @@ -176,36 +186,32 @@ print PROC FAR jmp @@strinaize0 @@showstring: - cmp byte ptr [si+2],'P' - je @@showstringpointer - push word ptr [offset pointer+di+2] - call 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 -@@showstringpointer: +@@showstring@@pointer: push ds - mov ds,[offset pointer+di+2+2] - push word ptr [offset pointer+di+2] - call showstring + 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 @@showstring0pointer - push word ptr [offset pointer+di+2] - call 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 -@@showstring0pointer: +@@showstring0@@pointer: push ds - mov ds,[offset pointer+di+2+2] - push word ptr [offset pointer+di+2] - call showstring0 + mov ds,[offset @@pointer+di+2+2] + call showstring0,[word ptr offset @@pointer+di+2] add si,3 add di,4 pop ds @@ -217,49 +223,44 @@ print PROC FAR jmp @@strinaize0 @@showsize: - push dword ptr [offset pointer+di+2] - call showsize + call showsize,[dword ptr offset @@pointer+di+2] add si,2 add di,4 jmp @@strinaize0 @@showattr: - push word ptr [offset pointer+di+2] - call showattr + call showattr,[word ptr offset @@pointer+di+2] add si,2 add di,2 jmp @@strinaize0 @@showname: - push word ptr [offset pointer+di+2] - call showname + call showname,[word ptr offset @@pointer+di+2] add si,2 add di,2 jmp @@strinaize0 @@showtime: - push word ptr [offset pointer+di+2] - call showtime + call showtime,[word ptr offset @@pointer+di+2] add si,2 add di,2 jmp @@strinaize0 @@showdate: - push word ptr [offset pointer+di+2] - call 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] + push [dword ptr offset @@pointer+di+2] add di,4 - cmp byte ptr [si+2],'B' + cmp [byte ptr si+2],'B' je @@byte - cmp byte ptr [si+2],'W' + cmp [byte ptr si+2],'W' je @@word - cmp byte ptr [si+2],'D' + cmp [byte ptr si+2],'D' je @@dword dec si @@ -282,12 +283,12 @@ print PROC FAR retn @@special2: - cmp byte ptr [si+1],'\' + cmp [byte ptr si+1],'\' jne @@notshowit2 inc si jmp @@showit @@notshowit2: - mov cl,byte ptr [si+1] + mov cl,[byte ptr si+1] cmp cl,'l' je @@showline cmp cl,'g' @@ -314,29 +315,29 @@ print PROC FAR jmp @@no0 @@color: - mov cl,[si+2] - sub cl,'0' - shl cl,4 - add cl,[si+3] - sub cl,'0' - mov ah,21 - int 47h + 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 ah,24 - int 47h - mov ah,[si+2] - sub ah,'0' - mov bh,ah - shl bh,3 - add bh,ah - add bh,ah - add bh,[si+3] + mov bh,[si+2] sub bh,'0' - mov ah,25 - int 47h + 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 @@ -349,34 +350,32 @@ print PROC FAR add al,ah add al,[si+3] sub al,'0' - mov ah,0 - int 47h + xor ah,ah + call [cs:setvideomode] add si,4 jmp @@strinaize0 @@setfont: mov ah,[si+2] sub ah,'0' - mov cl,ah - shl cl,3 - add cl,ah - add cl,ah - add cl,[si+3] - sub cl,'0' - mov ah,3 - int 47h + 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: - mov ah,6 - int 47h + call [cs:addline] add si,2 jmp @@strinaize0 @@clearscreen: - mov ah,2 - int 47h + call [cs:clearscreen] add si,2 jmp @@strinaize0 @@ -393,35 +392,36 @@ print PROC FAR jmp @@strinaize0 @@enablescroll: - mov ah,42 - int 47h + call [cs:enablescroll] add si,2 jmp @@strinaize0 @@disablescroll: - mov ah,43 - int 47h + call [cs:disablescroll] add si,2 jmp @@strinaize0 @@goto: mov ah,[si+2] sub ah,'0' - mov bh,ah - shl bh,3 - add bh,ah - add bh,ah - add bh,[si+3] - sub bh,'0' + mov al,ah + shl al,3 + add al,ah + add al,ah + add al,[si+3] + sub al,'0' + xor ah,ah ; - mov ah,[si+5] - sub ah,'0' - mov bl,ah + mov bh,[si+5] + sub bh,'0' + mov bl,bh shl bl,3 - add bl,ah - add bl,ah + add bl,bh + add bl,bh add bl,[si+6] sub bl,'0' + xor bh,bh + call [cs:setxy],ax,bx mov ah,25 int 47h add si,7 @@ -429,312 +429,215 @@ print PROC FAR @@no0: add di,bp - add di,2 - 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 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 - pop bp - retf + ret + +ENDP print -print ENDP -;================TESTS============== -;met dans DX le contenu de %0 -;-> %0 -;<- -;=================================== -tests PROC FAR - ARG date:word=taille - push bp - mov bp,sp - push ax cx edx - mov dx,[date] - pop edx cx ax - pop bp - retf taille -tests ENDP ;================SHOWDATE============== ;Affiche la date contenu en %0 ;-> %0 ;<- ;====================================== -ShowDate PROC FAR - ARG date:word=taille - push bp - mov bp,sp - push edx +PROC showdate FAR + ARG @dates:word + USES edx xor edx,edx - mov dx,[date] + mov dx,[@dates] and dx,11111b - push edx - push 2 - call showintl - push '/' - call showchar - mov dx,[date] + call showintl,2,edx + call [cs:showchar],'/',0FFFFh + mov dx,[@dates] shr dx,5 and dx,111b - push edx - push 2 - call showintl - push '/' - call showchar - mov dx,[date] + call showintl,2,edx + call [cs:showchar],'/',0FFFFh + mov dx,[@dates] shr dx,8 and dx,11111111b add dx,1956 - push edx - push 4 - call showintl - pop edx - pop bp - retf taille -ShowDate ENDP + call showintl,2,edx + ret +ENDP showdate ;================SHOWTIME============== ;Affiche l'heure contenu en %0 ;-> %0 ;<- ;====================================== -ShowTime PROC FAR - ARG time:word=taille - push bp - mov bp,sp - push edx +PROC showtime FAR + ARG @times:word + USES edx xor edx,edx - mov dx,[time] + mov dx,[@times] shr dx,11 and dx,11111b - push edx - push 2 - call showintl - push ':' - call showchar - mov dx,[time] + call showintl,2,edx + call [cs:showchar],':',0FFFFh + mov dx,[@times] shr dx,5 and dx,111111b - push edx - push 2 - call showintl - push ':' - call showchar - mov dx,[time] + call showintl,2,edx + call [cs:showchar],':',0FFFFh + mov dx,[@times] and dx,11111b shl dx,1 - push edx - push 2 - call showintl - pop edx - pop bp - retf taille -ShowTime ENDP + call showintl,2,edx + ret +ENDP showtime ;================SHOWNAME============== ;Affiche le nom pointé par ds:%0 ;-> ds:%0 ;<- ;====================================== -ShowName PROC FAR - ARG thename:word=taille - push bp - mov bp,sp - push cx si - mov si,[thename] +PROC showname FAR + ARG @thename:word + USES cx,si + mov si,[@thename] xor cx,cx @@showthename: - push word ptr ds:[si] - call showchar + call [cs:showchar],[word ptr ds:si],0FFFFh inc si inc cx cmp cx,8 jne @@suiteaname - push ' ' - call showchar + call [cs:showchar],' ',0FFFFh @@suiteaname: cmp cx,8+3 jb @@showthename - pop si cx - pop bp - retf taille -ShowName ENDP + ret +ENDP showname ;================SHOWATTR============== ;Affiche les attributs spécifié par %0 ;-> %0 ;<- ;====================================== -ShowAttr PROC FAR - ARG attr:word=taille - push bp - mov bp,sp - test [attr],00000001b +PROC showattr FAR + ARG @attr:word + push 0FFFFh + test [@attr],00000001b je @@noreadonly push 'L' jmp @@readonly @@noreadonly: push '-' @@readonly: - call showchar - test [attr],00000010b + call [cs:showchar] + push 0FFFFh + test [@attr],00000010b je @@nohidden push 'C' jmp @@hidden @@nohidden: push '-' @@hidden: - call showchar - test [attr],00000100b + call [cs:showchar] + push 0FFFFh + test [@attr],00000100b je @@nosystem push 'S' jmp @@system @@nosystem: push '-' @@system: - call showchar - test [attr],00100000b + call [cs:showchar] + push 0FFFFh + test [@attr],00100000b je @@noarchive push 'A' jmp @@archive @@noarchive: push '-' @@archive: - call showchar - test [attr],00010000b + call [cs:showchar] + push 0FFFFh + test [@attr],00010000b je @@nodirectory push 'R' jmp @@directory @@nodirectory: push '-' @@directory: - call showchar - pop bp - retf taille -ShowAttr ENDP + call [cs:showchar] + ret +ENDP showattr ;================SHOWSIZE============== ;Affiche le nom pointé par %0 ;-> %0 ;<- ;====================================== -ShowSize PROC FAR - ARG thesize:dword=taille - push bp - mov bp,sp - push edx ds +PROC showsize FAR + ARG @thesize:dword + USES edx,ds push cs pop ds - mov edx,[thesize] + mov edx,[@thesize] cmp edx,1073741824 ja @@giga cmp edx,1048576*9 ja @@mega cmp edx,1024*9 ja @@kilo - push edx - push 4 - call showintR - push offset unit - call showstring0 + call showintr,4,edx + call showstring0,offset unit jmp @@finsize @@kilo: shr edx,10 - push edx - push 4 - call showintR - push offset unitkilo - call showstring0 + call showintr,4,edx + call showstring0,offset unitkilo jmp @@finsize @@mega: shr edx,20 - push edx - push 4 - call showintR - push offset unitmega - call showstring0 + call showintr,4,edx + call showstring0,offset unitmega jmp @@finsize @@giga: shr edx,30 - push edx - push 4 - call showintR - push offset unitgiga - call showstring0 + call showintr,4,edx + call showstring0,offset unitgiga @@finsize: - pop ds edx - pop bp - retf taille + ret unit db ' o ',0 unitkilo db ' ko',0 unitmega db ' mo',0 unitgiga db ' go',0 -ShowSize ENDP +ENDP showsize ;==========SHOWSPACE=========== ;met un espace aprés le curseur ;-> ;<- ;============================== -showspace PROC FAR - push bp - mov bp,sp - push cx - mov cl,' ' - call charout +PROC showspace FAR + call [cs:showchar],' ',0FFFFh clc - pop cx - pop bp - retf -showspace ENDP + ret +ENDP showspace -;==========SHOWLINE=============== -;remet le curseur text a la ligne avec un retfour chariot -;-> -;<- -;================================= -showline PROC FAR - push ax - mov ah,06 - int 47h - pop ax - retf - showline ENDP - -;==========SHOWCHAR=========== -;met un caractère de code ASCII %0 aprés le curseur -;-> %0 -;<- -;============================= -showchar PROC FAR - ARG char:word=taille - push bp - mov bp,sp - push cx - mov cx,[char] - call charout - pop cx - pop bp - retf taille -showchar ENDP ;==========SHOWINT=========== ;Affiche un entier %0 aprés le curseur ;-> %0 ;<- ;============================ -ShowInt PROC FAR - ARG integer:dword=taille - push bp - mov bp,sp - push eax bx cx edx esi +PROC showint FAR + ARG @integer:dword + USES eax,bx,cx,edx,esi xor cx,cx - mov eax,[integer] + mov eax,[@integer] mov esi,10 mov bx,offset showbuffer+27 @@decint: @@ -742,37 +645,33 @@ ShowInt PROC FAR div esi add dl,'0' inc cx - mov cs:[bx],dl + mov [cs:bx],dl dec bx cmp ax,0 jne @@decint mov ax,cx @@showinteger: inc bx - mov cl,cs:[bx] - call charout + mov cl,[cs:bx] + call [cs:showchar],cx,0FFFFh dec ax jnz @@showinteger - pop esi edx cx bx eax - pop bp - retf taille + ret showbuffer db 50 dup (0FFh) -ShowInt ENDP +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 ;<- ;=============================== -ShowIntL PROC FAR - ARG sizeofint:word,integer:dword=taille - push bp - mov bp,sp - push eax bx cx edx esi di - mov di,[sizeofint] +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 eax,[@integer] mov esi,10 mov bx,offset showbuffer+27 @@decint: @@ -780,7 +679,7 @@ ShowIntL PROC FAR div esi add dl,'0' inc cx - mov cs:[bx],dl + mov [cs:bx],dl dec bx cmp cx,di jae @@nomuch @@ -790,7 +689,7 @@ ShowIntL PROC FAR xchg cx,di sub cx,di @@rego: - mov byte ptr cs:[bx],'0' + mov [byte ptr cs:bx],'0' dec bx dec cx jnz @@rego @@ -800,28 +699,24 @@ ShowIntL PROC FAR @@finishim: @@showinteger: inc bx - mov cl,cs:[bx] - call charout + mov cl,[cs:bx] + call [cs:showchar],cx,0FFFFh dec ax jnz @@showinteger - pop di esi edx cx bx eax - pop bp - retf taille -showintl ENDP + 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 ;<- ;=============================== -ShowIntR PROC FAR - ARG sizeofint:word,integer:dword=taille - push bp - mov bp,sp - push eax bx cx edx esi di - mov di,[sizeofint] +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 eax,[@integer] mov esi,10 mov bx,offset showbuffer+27 @@decint: @@ -829,7 +724,7 @@ ShowIntR PROC FAR div esi add dl,'0' inc cx - mov cs:[bx],dl + mov [cs:bx],dl dec bx cmp cx,di jae @@nomuch @@ -839,7 +734,7 @@ ShowIntR PROC FAR xchg cx,di sub cx,di @@rego: - mov byte ptr cs:[bx],' ' + mov [byte ptr cs:bx],' ' dec bx dec cx jnz @@rego @@ -849,27 +744,23 @@ ShowIntR PROC FAR @@finishim: @@showinteger: inc bx - mov cl,cs:[bx] - call charout + mov cl,[cs:bx] + call [cs:showchar],cx,0FFFFh dec ax jnz @@showinteger - pop di esi edx cx bx eax - pop bp - retf taille -ShowIntR ENDP + ret +ENDP showintr ;==========SHOWSIGNED=========== ;Affiche un entier %0 de taille %1 aprés le curseur ;-> %0 un entier, %1 la taille ;<- ;=============================== -Showsigned PROC FAR - ARG sizeofint:word,integer:dword=taille - push bp - mov bp,sp - push ebx cx edx - mov ebx,[integer] - mov cx,[sizeofint] +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 @@ -892,89 +783,75 @@ Showsigned PROC FAR jbe @@notsigned neg edx @@showminus: - push '-' - call showchar + call [cs:showchar],'-',0FFFFh @@notsigned: - push edx - call showint - pop edx cx ebx - pop bp - retf taille -Showsigned ENDP + call showint,edx,0FFFFh + ret +ENDP showsigned ;==========SHOWHEX=========== ;Affiche un nombre hexadécimal %0 de taille %1 aprés le curseur ;-> %0 un entier, %1 la taille ;<- ;============================ -ShowHex PROC FAR - ARG sizeofint:word,integer:dword=taille - push bp - mov bp,sp - push ax bx cx edx - mov edx,[integer] - mov cx,[sizeofint] +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 - mov ax,[sizeofint] - shr ax,2 @@Hexaize: rol edx,4 mov bx,dx and bx,0fh - mov cl,cs:[bx+offset Tab] - call charout + mov cl,[cs:bx+offset Tab] + call [cs:showchar],cx,0FFFFh dec al jnz @@Hexaize - pop edx cx bx ax - pop bp - retf taille + ret Tab db '0123456789ABCDEF' -ShowHex ENDP +ENDP showhex ;==========SHOWBIN=========== ;Affiche un nombre binaire %0 de taille %1 aprés le curseur ;-> %0 un entier, %1 la taille ;<- ;============================ -Showbin PROC FAR - ARG sizeofint:word,integer:dword=taille - push bp - mov bp,sp - push ax cx edx - mov edx,[integer] - mov cx,[sizeofint] +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] + mov ax,[@sizeofint] @@binaize: rol edx,1 mov cl,'0' adc cl,0 - call charout + call [cs:showchar],cx,0FFFFh dec al jnz @@binaize - pop edx cx ax - pop bp - retf taille -Showbin ENDP + ret +ENDP showbin ;==========SHOWBCD=========== ;Affiche un nombre en BCD %0 de taille %1 aprés le curseur ;-> %0 un entier, %1 la taille ;<- ;============================ -ShowBCD PROC FAR - ARG sizeofint:word,integer:dword=taille - push bp - mov bp,sp - push ax cx edx - mov edx,[integer] - mov ax,[sizeofint] +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 @@ -984,69 +861,47 @@ ShowBCD PROC FAR mov cl,dl and cl,0fh add cl,'0' - call charout + call [cs:showchar],cx,0FFFFh dec al jnz @@BCDaize - pop edx cx ax - pop bp - retf taille -ShowBCD ENDP + 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 ;<- ;=============================== -showstring PROC FAR - ARG pointer:word=taille - push bp - mov bp,sp - push bx cx si - mov si,[pointer] +PROC showstring FAR + ARG @pointer:word + USES bx,si + mov si,[@pointer] mov bl,[si] @@strinaize: inc si - mov cl,[si] - call charout + call [cs:showchar],[word ptr si],0FFFFh dec bl jnz @@strinaize - pop si cx bx - pop bp - retf taille -showstring ENDP + ret +ENDP showstring ;==========SHOWSTRING0=========== ;Affiche une chaine de caractère pointée par ds:%1 aprés le curseur ;-> ds:%1 pointeur chaine type zéro terminal ;<- ;================================ -showstring0 PROC FAR - ARG pointer:word=taille - push bp - mov bp,sp - push cx si - mov si,[pointer] +PROC showstring0 FAR + ARG @pointer:word + USES cx,si + mov si,[@pointer] @@strinaize0: mov cl,[si] cmp cl,0 je @@no0 - call charout + call [cs:showchar],cx,0FFFFh inc si jmp @@strinaize0 @@no0: - pop si cx - pop bp - retf taille -showstring0 ENDP - -;Envoie le caractère CL vers l'ecran -charout PROC NEAR - push ax dx - mov ah,7 - mov dl,cl - int 47h - pop dx ax ret -charout ENDP +ENDP showstring0 -end start diff --git a/noyau/8259a.asm b/noyau/8259a.asm index 46a3601..561719e 100644 --- a/noyau/8259a.asm +++ b/noyau/8259a.asm @@ -1,48 +1,11 @@ -.model tiny,StdCall -.486 -.code -Locals -jumps - -org 0h - -include ..\include\mem.h -include ..\include\bmp.h - -start: -header exe <,1,0,,,,offset exports,> - -exports: - db "enableirq",0 - dw enableirq - db "disableirq",0 - dw enableirq - db "readmaskirq",0 - dw readmaskirq - db "readirr",0 - dw readirr - db "readisr",0 - dw readisr - db "installhandler",0 - dw installhandler - db "replacehandler",0 - dw replacehandler - db "getint",0 - dw getint - db "setint",0 - dw setint - db "seteoi",0 - dw seteoi - dw 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 + 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 sp‚cifi‚ + DISABLEROTATION = 000h ;Desactiver la rotation de priorités en mode EOI automatique + EOI = 020h ;End of Interrupt non sp‚cifi‚ 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 @@ -50,24 +13,23 @@ exports: 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 + 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 et modes OCW3 = 008h ;OCW3 POLLING = 004h ;Polling bit ISR = 0Bh ; Pas d'op‚ration, pas de Poll, lire ISR OCW3 -IRR = 0Ah ; Pas d'op‚ration, pas de Poll, lire IRR - +IRR = 0Ah ; Pas d'op‚ration, pas de Poll, lire IRR ;Autorise une interruption ‚lectronique ;Entr‚e : %1 - Num‚ro de l'interruption (0-15) … autoriser 0-7 = MASTERPIC , 8-15 = SLAVEPIC -EnableIRQ PROC FAR +PROC enableirq FAR ARG @irq:word USES ax,cx,dx mov ax,[@irq] @@ -86,11 +48,11 @@ EnableIRQ PROC FAR and al,ah out dx,al ret -EnableIRQ endp +endp enableirq ;Desactive une interruption ‚lectronique ;Entr‚e : %0 - Num‚ro de l'interruption (0-15) … desactiver 0-7 = MASTERPIC , 8-15 = SLAVEPIC -DisableIRQ PROC FAR +PROC disableirq FAR ARG @irq:word USES ax,cx,dx mov ax,[@irq] @@ -109,11 +71,11 @@ DisableIRQ PROC FAR or al,ah out dx,al ret -DisableIRQ endp +endp disableirq ;Signale "End Of Interrupt" de l'interruption %0 -SetEOI PROC FAR +PROC seteoi FAR ARG @irq:word USES ax,dx mov ax,[@irq] @@ -125,11 +87,11 @@ SetEOI PROC FAR mov al,EOI out MASTERPIC,al ret -DisableIRQ endp +endp seteoi ;Lit les masques d'un contr“leur IRQ dans ax, 0 master ou slave 1 ds %1 -ReadmaskIrq PROC FAR +PROC readmaskirq FAR ARG @controleur:word USES bx,dx mov bx,[@controleur] @@ -142,10 +104,10 @@ ReadmaskIrq PROC FAR in al,dx pop dx ret -ReadmaskIrq endp +endp readmaskirq ;Lit le registre d'‚tat d'un contr“leur IRQ dans ax, 0 master ou slave 1 ds %1 -ReadISR PROC FAR +PROC readisr FAR ARG @controleur:word USES bx,dx mov bx,[@controleur] @@ -154,16 +116,16 @@ ReadISR PROC FAR jne @@master mov dx,SLAVEPIC @@master: - mov al,isr + mov al,ISR out dx,al xor ah,ah in al,dx ret -ReadISR endp +endp readisr ;Lit le registre d'‚tat d'un contr“leur IRQ dans al, 0 master ou slave 1 ds bh -ReadIRR PROC FAR +PROC readirr FAR ARG @controleur:word USES bx,dx mov bx,[@controleur] @@ -172,74 +134,9 @@ ReadIRR PROC FAR jne @@master mov dx,SLAVEPIC @@master: - mov al,irr + mov al,IRR out dx,al xor ah,ah in al,dx ret -ReadIRR endp - -;remplace le handler pointer par ds:si en bx:100h interruption ax -replacehandler: -push ax bx cx si di ds es -mov es,bx -mov di,0100h -mov ah,4 -int 48h -jc reph -mov bx,ax -call getint -mov es:[102h],si -mov es:[104h],ds -call setint -reph: -pop es ds di si cx bx ax -ret - -;install le handler pointer par ds:si en bx:100h interruption ax -installhandler: -push bx cx di es -mov es,bx -mov di,100h -mov ah,4 -int 48h -jc inh -mov bx,ax -call setint -inh: -pop es di cx bx -ret - -;met es:di le handle de l'int al -setint: -push ax bx ds -call disableirq -cli -xor ah,ah -mov bx,ax -shl bx,2 -xor ax,ax -mov ds,ax -mov ds:[bx],di -mov ds:[bx+2],es -pop ds bx ax -sti -call enableirq -ret - -;met ds:si le handle de l'int al -getint: -push ax bx es -xor ah,ah -mov bx,ax -shl bx,2 -xor ax,ax -mov es,ax -mov si,es:[bx] -mov ds,es:[bx+2] -pop es bx ax -ret - - -end start - +endp readirr \ No newline at end of file diff --git a/noyau/MAKEFILE b/noyau/MAKEFILE index dd47167..b328844 100644 --- a/noyau/MAKEFILE +++ b/noyau/MAKEFILE @@ -1,73 +1,36 @@ -lnk_boot = tlink /x -asm= tasm /t/m5/zi -lnk= tlink /x/t +asm= lzasm +lnk= elink -all: boot.bin clavier.sys 8259a.sys disque.sys heure.sys horloge.sys manette.sys port.sys souris.sys systeme.sys video.sys mcb.sys +all: systeme.sys boot.bin -boot.bin: boot.asm - $(asm) boot - $(lnk_boot) boot - exe2boot boot.exe boot.bin +systeme.sys: video.obj systeme.obj + $(lnk) systeme.obj systeme.sys -clavier.sys: clavier.asm - $(asm) clavier - $(lnk) clavier - ren clavier.com clavier.sys +systeme.obj: ../lib/detect.lib ../lib/video.lib video.sys + $(asm) systeme.asm -8259a.sys: 8259a.asm - $(asm) 8259a - $(lnk) 8259a - ren 8259a.com 8259a.sys -disque.sys: disque.asm - $(asm) disque - $(lnk) disque - ren disque.com disque.sys +video.sys: + $(lnk) video.obj video.sys -heure.sys: heure.asm - $(asm) heure - $(lnk) heure - ren heure.com heure.sys +boot.bin: boot.obj + $(lnk) boot.obj boot.bin /bs -horloge.sys: horloge.asm - $(asm) horloge - $(lnk) horloge - ren horloge.com horloge.sys +detect.obj: + $(asm) detect.asm -manette.sys: manette.asm - $(asm) manette - $(lnk) manette - ren manette.com manette.sys +video.obj: + $(asm) video.asm -port.sys: port.asm - $(asm) port - $(lnk) port - ren port.com port.sys - -souris.sys: souris.asm - $(asm) souris - $(lnk) souris - ren souris.com souris.sys - -systeme.sys: systeme.asm - $(asm) systeme - $(lnk) systeme - ren systeme.com systeme.sys - -video.sys: video.asm - $(asm) video - $(lnk) video - ren video.com video.sys - -mcb.sys: mcb.asm - $(asm) mcb - $(lnk) mcb - ren mcb.com mcb.sys +boot.obj: + $(asm) boot.asm clean: del *.obj del *.exe + del *.bak + del *.lib del *.com - del *.sys - del *.err del *.bin + del *.sys + del *.err \ No newline at end of file diff --git a/noyau/boot.asm b/noyau/boot.asm index 42655b9..4d1e41c 100644 --- a/noyau/boot.asm +++ b/noyau/boot.asm @@ -1,222 +1,216 @@ -boots segment -.386 -org 7C00h -assume cs:boots,ds:boots +model tiny,stdcall +p486 +locals +jumps +codeseg +option procalign:byte + +include "..\include\mem.h" +include "..\include\fat.h" +include "..\include\divers.h" + +org 7C00h -start: jmp boot -bootdb db 'COS2000A' ;Fabricant + n°série Formatage -sizec dw 512 ;octet/secteur - db 1 ;secteur/cluster -reserv dw 1 ;secteur reserv‚ -nbfat db 2 ;nb de copie de la FAT -nbfit dw 224 ;taille rep racine -allclu dw 2880 ;nb secteur du volume si < 32 még - db 0F0h ;Descripteur de média -fatsize dw 9 ;secteur/FAT -nbtrack dw 18 ;secteur/piste -head dw 2 ;nb de tˆteb de lecture/écriture -hidden dd 0 ;nombre de secteur cach‚s - dd 0 ;si nbsecteur = 0 nbsect ; the number of sectors -bootdrv db 0 ;Lecteur de d‚marrage -bootsig db 0 ;NA - db 29h ;boot signature 29h -bootsig2 dd 01020304h ;no de serie -pope db 'COS2000 ' ;nom de volume - db 'FAT12 ' ;FAT -specialboot: +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 + -errorloading db ' [Erreur]',0dh,0ah,0 -okloading db 'Recherche noyau ',0Dh,0ah,' - system.sys',0 -syst db ' [ Ok ]',0dh,0ah,'Chargement',0 -dot db '.',0 -Sys db 'SYSTEME SYS' errorboot: - mov si,offset errorloading - call showstr - mov ah,0 - int 16h - int 19h -boot: - mov Bootdrv,dl - cli - mov ax,09000h - mov ss,ax - mov sp,0FFFFh - sti + 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 - int 13h - jc errorboot - mov si,offset okloading - call showstr - mov cx,Reserv - add cx,word ptr [offset Hidden] - adc cx,word ptr [offset Hidden+2] - push cx - mov bx,fatsize - mov di,offset bufferfat + 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 - inc cx - add di,sizec - dec bx - jnz readfat - pop cx - xor ax,ax - mov al,NbFat - mov bx,FatSize - mul bx - add cx,ax - mov ax,32 - mul nbfit - div sizec - add ax,cx - sub ax,2 - mov word ptr [offset bootsig],ax - xor dx,dx -CheckRoot: - mov di,offset buffer - call readsector - jc errorboot - xor bx,bx + 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 + 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,nbfit - ja errorboot - cmp bx,sizec - jb findnext - inc cx - jmp Checkroot + 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,0900h - mov es,ax - push es - mov di,000h - push di - mov si,offset dot - xor ax,ax + mov si,offset syst + call showstr + mov cx,[di+26] + mov ax,0900h + 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 [offset bootsig] - call readsector - pop cx - jc errorboot + 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,sizec - call getfat - jnc fatagain + call showstr + add di,[bootsec.sectorsize] + call getfat + jnc fatagain finishload: - db 0CBh + retf ;=============READSECTOR (Fonction 01H)=============== ;Lit le secteur CX et le met en es:di ;-> AH=1 ;<- Flag Carry si erreur ;===================================================== -ReadSector: +readsector: push ax bx cx dx si mov ax,cx - xor dx,dx - div nbtrack - inc dl - mov bl,dl - xor dx,dx - div head - mov dh, 0 - xchg dl,dh - mov cx,ax - xchg cl,ch - shl cl,6 - or cl, bl + 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 si, 4 + mov al, 1 +tryagain: + mov ah, 2 + mov dl,[bootsec.bootdrive] int 13h - jnc Done - dec SI - jnz TryAgain -Done: + jnc done + dec si + jnz tryagain +done: pop si dx cx bx ax -ret + ret + getfat: - push ax bx dx di - mov di,offset bufferfat + 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 + 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 + and dx,0FFFh + mov cx,dx + jmp endfat evenfat: - mov dx,[di+1] - and dx,0FFF0h - shr dx,4 - mov cx,dx + mov dx,[di+1] + and dx,0FFF0h + shr dx,4 + mov cx,dx endfat: - pop di dx bx ax + pop di dx bx ax ret + showstr: - push ax bx si + 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 + or al,al + jz fin + mov ah,0Eh + mov bx,07h + int 10h + jmp again +fin: + pop si bx ax ret + db 055h,0AAh -Buffer equ $ -BufferFat equ $+2048 +endof: -boots ends -end start +buffer equ offset endof+2048 +bufferfat equ offset endof+4096 diff --git a/noyau/mcb.asm b/noyau/mcb.asm index 6878f07..f27dc9e 100644 --- a/noyau/mcb.asm +++ b/noyau/mcb.asm @@ -1,562 +1,731 @@ -.model tiny -.486 -smart -.code -org 0h + db "biosprint",0 + dw biosprint + db "mbinit",0 + dw mbinit + db "mbcreate",0 + dw mbcreate + db "mbfree",0 + dw mbfree + db "mbclean",0 + dw mbclean + db "mbresident",0 + dw mbresident + db "mbnonresident",0 + dw mbnonresident + db "mbchown",0 + dw mbchown + db "mballoc",0 + dw mballoc + db "mbfind",0 + dw mbfind + db "mbfindsb",0 + dw mbfindsb + db "mbget",0 + dw mbget + db "mbloadfuncs",0 + dw mbloadfuncs + db "mbsearchfunc",0 + dw mbsearchfunc + db "bioswaitkey",0 + dw bioswaitkey + db "mbloadsection",0 + dw mbloadsection + db "enableirq",0 + dw enableirq + db "disableirq",0 + dw enableirq + db "readmaskirq",0 + dw readmaskirq + db "readirr",0 + dw readirr + db "readisr",0 + dw readisr + db "seteoi",0 + dw seteoi + dd 0 -include ..\include\mem.h -include ..\include\divers.h +include "8259a.asm" -start: -maxfunc equ 13 - - jmp tsr ;Saute à la routine résidente -nameed db 'MB' ;Nom drivers -id dw 1234h ;Identifiant drivers -Tsr: - cli ;Désactive interruptions logiciellement - cmp ax,cs:ID ;Compare si test de chargement - jne nomore ;Si pas test alors on continu - rol ax,3*4 ;Rotation de 3 chiffre de l'ID pour montrer que le drivers est chargé - jmp itsok ;On termine l'int avec notre code d'ID preuve du bon chargement de VIDEO -nomore: - cmp ah,maxfunc - jbe noerrorint - stc - jmp itsok - noerrorint: - clc - push bx - mov bl,ah ;On calcule d'aprés le n° de fonction - xor bh,bh ;quel sera l'entrée dans la table indexée - shl bx,1 ;des adresses fonctions. - mov bx,cs:[bx+tables] ;On récupère cette adresse depuis la table - mov cs:current,bx ;On la stocke temporairement pour obtenir les registres d'origine - pop bx - clc - call cs:current ;Puis on execute la fonction -itsok: - push bp - mov bp,sp ;On prend sp dans bp pour adresser la pile - jnc noerror ;La fonction appelée a renvoyer une erreur : Flag CARRY ? - or byte ptr [bp+6],1b;Si oui on le retranscrit sur le registre FLAG qui sera dépilé lors du IRET - ;xor eax,eax - ;mov ax,cs ;On récupère le segment et l'offset puis en renvoie l'adresse physique - ;shl eax,4 ;de l'erreur. - ;add ax,cs:current - jmp endofint ;on termine l'int -noerror: - and byte ptr [bp+6],0FEh;Si pas d'erreur on efface le Bit CARRY du FLAG qui sera dépilé lors du IRET -endofint: - pop bp - sti ;On réactive les interruptions logiciellement - iret ;Puis on retourne au programme appelant. - -current dw 0 ;Mot temporaire qui contient l'adresse de la fonction appelée -tables dw MBinit ;Table qui contient les adresses de toutes les fonctions de VIDEO (WORD) - dw MBFree - dw MBCreate - dw MBresident - dw MBGet - dw MBFind - dw MBChown - dw MBAlloc - dw MBclean - dw MBfindsb - dw MBnonresident - dw MBSearchfunc - dw MBLoadfuncs - ;dw MBdefrag - ;dw MBcopy - ;dw MBchname - -FirstMB dw 0 - -;Resouds les dépendances du bloc de mémoire GS -MBloadfuncs: - push ax bx ecx dx si di ds es gs - push gs - pop ds - cmp word ptr ds:[0],"EC" - ;jne notloaded - jne endofloading - mov si,ds:[exe.import] -loadfuncs: - cmp word ptr [si],0 - je endofloading - call MBSearchfunc - jnc toendoftext - mov bx,si -findend2: - inc bx - cmp byte ptr [bx], ':' - jne findend2 - mov byte ptr [bx],0 - mov ah,17 - int 48h - jc notloaded - mov byte ptr [bx],':' - call MBSearchfunc - jc notloaded -toendoftext: - mov al,[si] - cmp al,0 - je oktonext2 - inc si - jmp toendoftext -oktonext2: - inc si - mov [si],dx - mov [si+2],gs - add si,4 - jmp loadfuncs -endofloading: - clc - pop gs es ds di si dx ecx bx ax - ret -notloaded: - stc - pop gs es ds di si dx ecx bx ax - ret - - -;Recherche une fonction pointé par DS:SI en mémoire et renvoie son adresse en GS:DX -MBSearchfunc: - push bx si di - mov bx,si -findend: - inc bx - cmp byte ptr [bx], ':' - jne findend - mov byte ptr [bx],0 - call MBfind - mov byte ptr [bx],':' - jc notfoundattallthesb - cmp word ptr gs:[exe.checks],"EC" - jne notfoundattallthesb - mov di,gs:[exe.export] - inc bx - inc bx -functions: - cmp word ptr gs:[di],0 - je notfoundattallthesb - mov si,bx -cmpnamesfunc: - mov al,gs:[di] - cmp al,ds:[si] - jne notfoundthesb - cmp al,0 - je seemsok - inc si - inc di - jmp cmpnamesfunc -notfoundthesb: - mov al,gs:[di] - cmp al,0 - je oktonext - inc di - jmp notfoundthesb -oktonext: - inc di - inc di - inc di - jmp functions -seemsok: - mov dx,gs:[di+1] - clc - pop di si bx +;Affiche le nombre hexa dans %0[dword] +PROC biosprinth FAR + ARG @num:dword + USES ax,bx,cx,edx,si,di + mov edx,[@num] + mov ah,09h + mov di,8 +@@hexaize: + rol edx,4 + mov si,dx + and si,1111b + mov al,[cs:si+offset @@tab] + mov cx,1 + cmp al,32 + jb @@control + mov bx,7 + mov ah,09h + int 10h +@@control: + mov ah,0Eh + int 10h + dec di + jnz @@hexaize ret -notfoundattallthesb: - stc - pop di si bx +@@tab db '0123456789ABCDEF' +endp biosprinth + +;Affiche le texte ASCIIZ pointé par %0 +PROC biosprint FAR + ARG @pointer:word + USES ax,bx,cx,si + mov si,[@pointer] + mov cx,1 + mov bx,7 +@@again: + lodsb + or al,al + jz @@fin + cmp al,32 + jb @@control + mov ah,09h + int 10h +@@control: + mov ah,0Eh + int 10h + jmp @@again +@@fin: ret +endp biosprint + +;PROC flatmode FAR +; USES eax,bx,edx +; ; first, calculate the linear address of GDT +; xor edx,edx +; xor eax,eax +; mov dx,cs +; shl edx,4 +; add [dword ptr cs:offset @@gdt+2],edx ; store as GDT linear base addr +; ; now load the GDT into the GDTR +; lgdt [fword ptr cs:offset @@gdt] ; load GDT base (286-style 24-bit load) +; mov bx,1 * size descriptor ; point to first descriptor +; mov eax,cr0 ; prepare to enter protected mode +; or al,1 ; flip the PE bit +; cli ; turn off interrupts +; mov cr0,eax ; we're now in protected mode +; mov fs,bx ; load the FS segment register +; and al,0FEh ; clear the PE bit again +; mov cr0,eax ; back to real mode +; sti ; resume handling interrupts +; ret ; + +;@@gdt descriptor <@@gdtend - @@gdt - 1, @@gdt, 0, 0, 0, 0> ; the GDT itself +; descriptor <0ffffh, 0, 0, 091h, 0cfh, 0> ; 4G data segment +;@@gdtend: +;endp flatmode + +;Attend l'appuie sur une touche +PROC bioswaitkey FAR + xor ax,ax + int 16h + ret +endp bioswaitkey + +firstmb dw 0 -;Mise a nivo de la mémoire (jonction de blocs libre) -MBclean: - push ax bx dx es gs - mov bx,cs:firstmb - dec bx - dec bx - xor ax,ax - xor dx,dx -searchfree3: - mov gs,bx - cmp gs:[MB.Check],'NH' - jne erroronsearch - inc bx - inc bx - add bx,gs:[MB.Sizes] - cmp word ptr gs:[MB.Sizes],0 - je erroronsearch - cmp gs:[MB.Reference],Free - jne notfreeatall - cmp ax,0 - je notmeetafree - add dx,gs:[MB.Sizes] - mov word ptr gs:[MB.Check],0 - mov dword ptr gs:[MB.Names],0 - mov dword ptr gs:[MB.Names+4],0 - inc dx - inc dx - jmp nottrigered -notmeetafree: - xor dx,dx - mov ax,gs - jmp nottrigered -notfreeatall: - cmp ax,0 - je nottrigered +;Charge les sections du block %0 +PROC mbloadsection FAR + ARG @blocks:word + USES ax,bx,cx,si,di,ds,es + LOCAL @@toresov:word:60 + mov ax,[@blocks] + inc ax + inc ax + mov es,ax + mov ds,ax + cmp [word ptr 0],"EC" + jne @@notace + lea si,[@@toresov] + mov [word ptr ss:si],0FFFFh + mov bx,[ds:exe.sections] +@@loading: + cmp [dword ptr bx],0 + je @@finishloading + mov ax,bx + add ax,4 + call mbcreate,ax,[word ptr bx+2] + jc @@error + inc si + inc si + mov [ss:si],ax + push si + mov si,[bx] + xor di,di mov es,ax - add es:[MB.Sizes],dx - xor ax,ax -nottrigered: - cmp gs:[MB.IsNotLast],true - je searchfree3 - cmp ax,0 - je reallyfinish - mov es,ax - add es:[MB.Sizes],dx - mov es:[MB.IsNotLast],False -reallyfinish: - clc - pop gs es dx bx ax - ret -erroronsearch: - stc - pop gs es dx bx ax + mov cx,[bx+2] + cld + rep movsb + pop si + add bx,4 +@@gonext: + inc bx + cmp [byte ptr bx],0 + jne @@gonext + inc bx + jmp @@loading +@@finishloading: +pushad +xor eax,eax +mov ax,[word ptr ss:si] +call biosprinth,eax +popad + cmp [word ptr ss:si],0FFFFh + je @@finishdepands + call mbloadfuncs,[word ptr ss:si] + jc @@depandserror + dec si + dec si + jmp @@finishloading +@@finishdepands: ret - +@@notace: + stc + ret +@@error: + stc + ret +@@depandserror: + stc + ret +endp mbloadsection + ;Initialise les blocs de mémoire en prenant memorystart pour segment de base -MBinit: - push ax cx es - cmp cs:FirstMB,0 - jne notforfree - mov ax,memorystart - mov cs:Firstmb,ax - mov cx,0A000h - sub cx,ax - dec ax - dec ax - mov es,ax - cmp es:[MB.Check],'NH' - je notforfree - mov es:[MB.Reference],Free - mov es:[MB.Sizes],cx - mov es:[MB.Check],'NH' - mov dword ptr es:[MB.Names],'eerF' - mov dword ptr es:[MB.Names+4],0 - mov es:[MB.IsNotLast],False - clc - pop es cx ax - ret -notforfree: - stc - pop es cx ax - ret - -;Libère le bloc de mémoire GS -MBFree: - push ax bx es - mov bx,gs - mov ax,bx - dec bx - dec bx - mov es,bx - cmp es:[MB.Reference],Free - je wasfree - cmp es:[MB.IsResident],true - je wasfree - mov es:[MB.IsResident],false - mov es:[MB.Reference],Free - mov dword ptr es:[MB.Names],'eerF' - mov dword ptr es:[MB.Names+4],0 - mov bx,cs:firstmb - dec bx - dec bx -searchtofree: - mov gs,bx - cmp gs:[MB.Check],'NH' - jne wasfree - inc bx - inc bx - add bx,gs:[MB.Sizes] - cmp word ptr gs:[MB.Sizes],0 - je wasfree - cmp ax,gs:[MB.Reference] - jne nottofree - mov gs:[MB.IsResident],false - mov gs:[MB.Reference],Free - mov dword ptr gs:[MB.Names],'eerF' - mov dword ptr gs:[MB.Names+4],0 -nottofree: - cmp gs:[MB.IsNotLast],true - je searchtofree - call MBclean - pop es bx ax - ret -wasfree: - stc - pop es bx ax - ret - -;Change le proprietaire de GS a dx -MBChown: - push bx es - mov bx,gs - dec bx - dec bx - mov es,bx - cmp es:[MB.Reference],Free - je wasfree2 - mov es:[MB.Reference],dx - pop es bx - ret -wasfree2: - stc - pop es bx - ret - -;Alloue un bloc de CX caractere pour le process visé -> GS -MBAlloc: - push dx si bp ds - mov bp,sp - mov dx,ss:[bp+12] +PROC mbinit FAR + USES ax,cx,si,di,ds,es + cmp [cs:firstmb],0 + jne @@alreadyok push cs pop ds - mov si,offset data - call MBCreate - call MBChown - pop ds bp si dx + mov [cs:firstmb],memorystart + mov ax,memorystart-2 + mov es,ax + mov si,offset afree + xor di,di + mov cx,size mb + rep movsb + clc ret - -data db '/Data',0 +@@alreadyok: + stc + ret +endp mbinit -;Renvoie en GS le MB n° cx carry quand terminé -MBGet: - push bx dx - mov bx,cs:firstmb - dec bx - dec bx - xor dx,dx -searchfree2: - mov gs,bx - cmp gs:[MB.Check],'NH' - jne itsend - inc bx - inc bx - add bx,gs:[MB.Sizes] - cmp word ptr gs:[MB.Sizes],0 - je itsend - cmp dx,cx - je foundmcb - ja itsend - inc dx - cmp gs:[MB.IsNotLast],true - je searchfree2 -itsend: - stc - pop dx bx - ret -foundmcb: - clc - pop dx bx - ret - -;Renvoie en GS le MCB qui correspond a ds:si -MBFind: - push ax bx si di - mov bx,cs:firstmb - dec bx - dec bx - mov di,MB.Names -search: - mov gs,bx - cmp gs:[MB.Check],'NH' - jne itsend2 - inc bx - inc bx - add bx,gs:[MB.Sizes] - cmp word ptr gs:[MB.Sizes],0 - je itsend2 - push si di -cmpnames: - mov al,gs:[di] - cmp al,ds:[si] - jne ok - cmp al,0 - je ok - inc si - inc di - jmp cmpnames -ok: - pop di si - je foundmcb2 - cmp gs:[MB.IsNotLast],true - je search -itsend2: - stc - pop di si bx ax - ret -foundmcb2: - mov bx,gs - inc bx - inc bx - mov gs,bx - clc - pop di si bx ax - ret - -;Renvoie en GS le sous mcb qui correspond a ds:si et qui appartien a dx -MBFindsb: - push ax bx si di - mov bx,cs:firstmb - dec bx - dec bx - mov di,MB.Names -search2: - mov gs,bx - cmp gs:[MB.Check],'NH' - jne itsend3 - inc bx - inc bx - add bx,gs:[MB.Sizes] - cmp word ptr gs:[MB.Sizes],0 - je itsend3 - push si di -cmpnames2: - mov al,gs:[di] - cmp al,ds:[si] - jne ok2 - cmp al,0 - je ok2 - inc si - inc di - jmp cmpnames2 -ok2: - pop di si - jne notfoundmcb2 - cmp gs:[MB.Reference],dx - je foundmcb3 -notfoundmcb2: - cmp gs:[MB.IsNotLast],true - je search2 -itsend3: - stc - pop di si bx ax - ret -foundmcb3: - mov bx,gs - inc bx - inc bx - mov gs,bx - clc - pop di si bx ax - ret - -;Creér un bloc de nom ds:si de taille cx (octets) -> n°segment dans GS -MBCreate: - push bp - mov bp,sp - mov gs,ss:[bp+6] - push ax bx cx dx si di es +afree mb <"HN",0,0,0,0A000h-memorystart,"Libre"> + db 0 + +;Creér un bloc de nom %0 de taille %1 (octets) -> n°segment dans AX +PROC mbcreate FAR + ARG @blocks:word,@size:word + USES bx,cx,dx,si,di,ds,es + push gs + mov gs,[ss:bp+4] + mov cx,[@size] shr cx,4 inc cx - mov bx,cs:firstmb + mov bx,[cs:firstmb] dec bx dec bx - mov dl,1 -searchfree: - cmp dl,False - je wasntgood - mov es,bx - cmp es:[MB.Check],'NH' - jne wasntgood - cmp es:[MB.IsNotLast],True + mov dl,true +@@searchfree: + cmp dl,false + je @@notenougtmem + mov es,bx + cmp [word ptr es:mb.check],"NH" + jne @@memoryerror + cmp [es:mb.isnotlast],true sete dl - cmp es:[MB.Reference],Free - jne notsogood - mov ax,es:[MB.Sizes] + cmp [es:mb.reference],free + jne @@notsogood + mov ax,[es:mb.sizes] cmp cx,ax - ja notsogood - mov word ptr es:[MB.Check],'NH' - mov es:[MB.IsNotLast],True - mov es:[MB.Reference],gs - mov es:[MB.IsResident],False - mov di,MB.Names - push ax cx - mov cx,32 -loops: - mov dh,[si] - inc si - dec cx - jz endofloops - cmp dh,0 - je endofloops - mov es:[di],dh - inc di - jmp loops -endofloops: - inc cx - mov al,0 - rep stosb - pop cx ax + ja @@notsogood + ;mov [word ptr es:mb.check],"NH" + mov [es:mb.isnotlast],true + mov [es:mb.reference],gs + mov [es:mb.isresident],false + lea di,[es:mb.names] + push cx + mov cx,24/4 + push cs + pop ds + mov si,[@blocks] + cld + rep movsd + pop cx inc bx inc bx sub ax,cx cmp ax,0 - je nofree + je @@nofree dec ax dec ax - mov es:[MB.Sizes],cx + mov [es:mb.sizes],cx add cx,bx - mov es,cx - mov es:[MB.IsNotLast],dl - mov es:[MB.IsResident],False - mov es:[MB.Reference],Free - mov es:[MB.Sizes],ax - mov dword ptr es:[MB.Names],'eerF' - mov dword ptr es:[MB.Names+4],0 - mov es:[MB.Check],'NH' -nofree: - mov gs,bx + mov es,cx + mov si,offset afree + xor di,di + mov cx,size mb + cld + rep movsb + mov [es:mb.isnotlast],dl + mov [es:mb.sizes],ax +@@nofree: + mov ax,bx clc - pop es di si dx cx bx ax - pop bp + pop gs ret -wasntgood: +@@notsogood: + inc bx + inc bx + add bx,[es:mb.sizes] + jmp @@searchfree +@@memoryerror: stc - pop es di si dx cx bx ax - pop bp + pop gs ret -notsogood: - inc bx - inc bx - add bx,es:[MB.Sizes] - jmp searchfree +@@notenougtmem: + pop gs + stc + ret +endp mbcreate -;Rend le segment GS résident -MBresident: - push bx es - mov bx,gs +;Libère le bloc de mémoire %0 et ses sous blocs +PROC mbfree FAR + ARG @blocks:word + USES ax,bx,cx,si,di,ds,es + mov bx,[@blocks] + mov ax,bx + dec bx + dec bx + mov es,bx + cmp [word ptr es:mb.check],"NH" + jne @@memoryerror + cmp [es:mb.reference],free + je @@wasfree + cmp [es:mb.isresident],true + je @@wasresident + mov [es:mb.reference],free + push cs + pop ds + mov si,offset @@isfree + lea di,[es:mb.names] + mov cx,6 + cld + rep movsb + mov bx,[cs:firstmb] + dec bx + dec bx +@@searchtofree: + mov es,bx + cmp [word ptr es:mb.check],"NH" + jne @@memoryerror + inc bx + inc bx + add bx,[es:mb.sizes] + cmp [es:mb.sizes],0 + je @@nottofree + cmp ax,[es:mb.reference] + jne @@nottofree + mov [es:mb.isresident],false + mov [es:mb.reference],free + mov cx,6 + cld + rep movsb +@@nottofree: + cmp [es:mb.isnotlast],true + je @@searchtofree + call mbclean + ret +@@memoryerror: + stc + ret +@@wasfree: + stc + ret +@@wasresident: + stc + ret + +@@isfree db "libre",0 +endp mbfree + +;Mise a nivo de la mémoire (jonction de blocs libre) +PROC mbclean FAR + USES ax,bx,dx,es,gs + mov bx,[cs:firstmb] + dec bx + dec bx + xor ax,ax + xor dx,dx +@@searchfree: + mov gs,bx + cmp [word ptr gs:mb.check],"NH" + jne @@memoryerror + inc bx + inc bx + add bx,[gs:mb.sizes] + cmp [word ptr gs:mb.sizes],0 + je @@notenougtmem + cmp [gs:mb.reference],free + jne @@notfree + cmp ax,0 + je @@notmeetfree + add dx,[gs:mb.sizes] + mov [word ptr gs:mb.check],0 + mov [dword ptr gs:mb.names],0 + inc dx + inc dx + jmp @@nottrigered +@@notmeetfree: + xor dx,dx + mov ax,gs + jmp @@nottrigered +@@notfree: + cmp ax,0 + je @@nottrigered + mov es,ax + add [es:mb.sizes],dx + xor ax,ax +@@nottrigered: + cmp [gs:mb.isnotlast],true + je @@searchfree + cmp ax,0 + je @@reallyfinish + mov es,ax + add [es:mb.sizes],dx + mov [es:mb.isnotlast],false +@@reallyfinish: + clc + ret +@@notenougtmem: + stc + ret +@@memoryerror: + stc + ret +endp mbclean + +;Rend le segment %0 résident +PROC mbresident FAR + ARG @blocks:word + USES bx,es + mov bx,[@blocks] dec bx dec bx mov es,bx - mov es:[MB.IsResident],True - pop es bx + cmp [word ptr es:mb.check],"NH" + jne @@memoryerror + mov [es:mb.isresident],true ret +@@memoryerror: + stc + ret +endp mbresident -;Rend le segment GS résident -MBnonresident: - push bx es - mov bx,gs +;Rend le segment %0 non résident +PROC mbnonresident FAR + ARG @blocks:word + USES bx,es + mov bx,[@blocks] dec bx dec bx mov es,bx - mov es:[MB.IsResident],False - pop es bx + cmp [word ptr es:mb.check],"NH" + jne @@memoryerror + mov [es:mb.isresident],false ret +@@memoryerror: + stc + ret +endp mbnonresident + + +;Change le proprietaire de %0 a %1 +PROC mbchown FAR + ARG @blocks:word,@owner:word + USES bx,dx,es + mov bx,[@blocks] + dec bx + dec bx + mov es,bx + cmp [word ptr es:mb.check],"NH" + jne @@memoryerror + cmp [es:mb.reference],free + je @@wasfree + mov dx,[@owner] + mov [es:mb.reference],dx + ret +@@memoryerror: + stc + ret +@@wasfree: + stc + ret +endp mbchown -end start +;Alloue un bloc /data de CX caractere pour le process appelant -> ax +PROC mballoc FAR + ARG @size:word + USES ax,si,ds + push cs + pop ds + call mbcreate,offset @@data,[@size] + call mbchown,ax,[word ptr ss:bp+4] + ret + +@@data db '/data',0 +endp mballoc + +;Renvoie en AX le MB n° %0 carry quand terminé +PROC mbget FAR + ARG @num:word + USES bx,dx,es + mov bx,[cs:firstmb] + dec bx + dec bx + xor dx,dx +@@searchfree: + mov es,bx + cmp [word ptr es:mb.check],"NH" + jne @@memoryerror + inc bx + inc bx + add bx,[es:mb.sizes] + cmp [es:mb.sizes],0 + je @@memoryerror + cmp dx,[@num] + je @@foundmcb + ja @@notfound + inc dx + cmp [es:mb.isnotlast],true + je @@searchfree +@@memoryerror: + stc + ret +@@foundmcb: + mov ax,es + inc ax + inc ax + clc + ret +@@notfound: + stc + ret +endp mbget + +;Renvoie en AX le MCB qui correspond a ds:%0 +PROC mbfind FAR + ARG @blocks:word + USES bx,si,di,es + mov bx,[cs:firstmb] + dec bx + dec bx + mov si,[@blocks] + lea di,[es:mb.names] +@@search: + mov es,bx + cmp [word ptr es:mb.check],"NH" + jne @@memoryerror + inc bx + inc bx + add bx,[es:mb.sizes] + cmp [es:mb.sizes],0 + je @@memoryerror + push si di +@@cmpnames: + mov al,[es:di] + cmp al,[ds:si] + jne @@ok + cmp al,0 + je @@ok + inc si + inc di + jmp @@cmpnames +@@ok: + pop di si + je @@foundmcb + cmp [es:mb.isnotlast],true + je @@search +@@notfound: + stc + ret +@@memoryerror: + stc + ret +@@foundmcb: + mov ax,es + inc ax + inc ax + clc + ret +endp mbfind + + +;Renvoie en AX le sous mcb qui correspond a %0 et qui appartien a %1 +PROC mbfindsb FAR + ARG @blocks:word,@owner:word + USES bx,dx,si,di,es + mov bx,[cs:firstmb] + dec bx + dec bx + mov si,[@blocks] + lea di,[es:mb.names] + mov dx,[@owner] +@@search: + mov es,bx + cmp [word ptr es:mb.check],"NH" + jne @@memoryerror + inc bx + inc bx + add bx,[es:mb.sizes] + cmp [es:mb.sizes],0 + je @@memoryerror + push si di +@@cmpnames: + mov al,[es:di] + cmp al,[ds:si] + jne @@ok + cmp al,0 + je @@ok + inc si + inc di + jmp @@cmpnames +@@ok: + pop di si + jne @@notfoundmcb + cmp [es:mb.reference],dx + je @@foundmcb +@@notfoundmcb: + cmp [es:mb.isnotlast],true + je @@search +@@notfound: + stc + ret +@@foundmcb: + mov ax,es + inc ax + inc ax + clc + ret +@@memoryerror: + stc + ret +endp mbfindsb + +;Resouds les dépendances du bloc de mémoire %0 +PROC mbloadfuncs FAR + ARG @blocks:word + USES ax,bx,cx,dx,si,ds + mov ds,[@blocks] + cmp [word ptr 0],"EC" + jne @@notace + mov si,[ds:exe.imports] + cmp si,0 + je @@endofloading +@@loadfuncs: + cmp [word ptr si],0 + je @@endofloading + call mbsearchfunc,si + jnc @@toendoftext + mov bx,si +@@findend: + inc bx + cmp [byte ptr bx], ':' + jne @@findend + mov [byte ptr bx],0 +;call projectfile,bx + jc @@erroronload + mov [byte ptr bx],':' + call mbsearchfunc,si + jc @@libnotexist +@@toendoftext: + mov cl,[si] + cmp cl,0 + je @@oktonext + inc si + jmp @@toendoftext +@@oktonext: + inc si + mov [si],ax + mov [si+2],dx + add si,4 + jmp @@loadfuncs +@@endofloading: + clc + ret +@@notace: + stc + ret +@@libnotexist: + stc + ret +@@erroronload: + stc + ret +endp mbloadfuncs + + +;Recherche une fonction pointé par DS:SI en mémoire et renvoie son adresse en DX:AX +PROC mbsearchfunc FAR + ARG @func:word + USES bx,si,di,es + mov bx,[@func] + push bx +@@findend: + inc bx + cmp [byte ptr bx], ':' + jne @@findend + mov [byte ptr bx],0 + call mbfind + mov [byte ptr bx],':' + jc @@notfoundattallthesb + mov es,ax + cmp [word ptr es:exe.checks],"EC" + jne @@notfoundattallthesb + mov di,[es:exe.exports] + inc bx + inc bx +@@functions: + cmp [word ptr es:di],0 + je @@notfoundattallthesb + mov si,bx +@@cmpnamesfunc: + mov al,[es:di] + cmp al,[ds:si] + jne @@notfoundthesb + cmp al,0 + je @@seemsok + inc si + inc di + jmp @@cmpnamesfunc +@@notfoundthesb: + mov al,[es:di] + cmp al,0 + je @@oktonext + inc di + jmp @@notfoundthesb +@@oktonext: + inc di + inc di + inc di + jmp @@functions +@@seemsok: + mov dx,es + mov ax,[es:di+1] + clc + ret +@@notfoundattallthesb: + stc + ret +endp mbsearchfunc diff --git a/noyau/video.asm b/noyau/video.asm index c4c6d2b..79bbc55 100644 --- a/noyau/video.asm +++ b/noyau/video.asm @@ -1,104 +1,86 @@ -.model tiny -.486 -smart -.code +model tiny,stdcall +p486 +locals +jumps +codeseg +option procalign:byte + +include "..\include\mem.h" +include "..\include\graphic.h" org 0h +header exe <"CE",1,0,0,offset exports,,,> -start: - jmp tsr ;Saute à la routine résidente -names db 'VIDEO' ;Nom drivers -id dw 1234h ;Identifiant drivers -Tsr: - cli ;Désactive interruptions logiciellement - cmp ax,cs:ID ;Compare si test de chargement - jne nomore ;Si pas test alors on continu - rol ax,3*4 ;Rotation de 3 chiffre de l'ID pour montrer que le drivers est chargé - jmp itsok ;On termine l'int avec notre code d'ID preuve du bon chargement de VIDEO -nomore: - cmp ah,maxfunc - jbe noerrorint - stc - jmp itsok - noerrorint: - clc - push bx - mov bl,ah ;On calcule d'aprés le n° de fonction - xor bh,bh ;quel sera l'entrée dans la table indexée - shl bx,1 ;des adresses fonctions. - mov bx,cs:[bx+tables] ;On récupère cette adresse depuis la table - mov cs:current,bx ;On la stocke temporairement pour obtenir les registres d'origine - pop bx - clc - call cs:current ;Puis on execute la fonction -itsok: - push bp - mov bp,sp ;On prend sp dans bp pour adresser la pile - jnc noerror ;La fonction appelée a renvoyer une erreur : Flag CARRY ? - or byte ptr [bp+6],1b;Si oui on le retranscrit sur le registre FLAG qui sera dépilé lors du IRET - ;xor eax,eax - ;mov ax,cs ;On récupère le segment et l'offset puis en renvoie l'adresse physique - ;shl eax,4 ;de l'erreur. - ;add ax,cs:current - ;jmp endofint ;on termine l'int -noerror: - and byte ptr [bp+6],0FEh;Si pas d'erreur on efface le Bit CARRY du FLAG qui sera dépilé lors du IRET -endofint: - pop bp - sti ;On réactive les interruptions logiciellement - iret ;Puis on retourne au programme appelant. -current dw 0 ;Mot temporaire qui contient l'adresse de la fonction appelée -tables dw setvideomode ;Table qui contient les adresses de toutes les fonctions de VIDEO (WORD) +exports: + db "setvideomode",0 + dw setvideomode + db "getvideomode",0 dw getvideomode + db "clearscreen",0 dw clearscreen + db "setfont",0 dw setfont + db "loadfont",0 dw loadfont + db "getfont",0 dw getfont - dw showline + db "addline",0 + dw addline + db "showchar",0 dw showchar + db "showpixel",0 dw showpixel + db "getpixel",0 dw getpixel - dw nothings + db "setstyle",0 dw setstyle + db "getstyle",0 dw getstyle + db "enablecursor",0 dw enablecursor + db "disablecursor",0 dw disablecursor - dw nothings - dw nothings - dw nothings - dw nothings - dw nothings - dw nothings + db "setcolor",0 dw setcolor + db "getcolor",0 dw getcolor + db "scrolldown",0 dw scrolldown + db "getxy",0 dw getxy + db "setxy",0 dw setxy + db "savescreen",0 dw savescreen + db "restorescreen",0 dw restorescreen + db "page2to1",0 dw page2to1 + db "page1to2",0 dw page1to2 - dw xchgPages - dw nothings + ;db "xchgPages",0 + ;dw xchgpages + db "waithretrace",0 dw waithretrace + db "waitretrace",0 dw waitretrace + db "getvgainfos",0 dw getvgainfos - dw nothings - dw nothings - dw nothings - dw savedac - dw restoredac - dw savestate - dw restorestate + ;db "savedac",0 + ;dw savedac + ;db "restoredac",0 + ;dw restoredac + ;db "savestate",0 + ;dw savestate + ;db "restorestate",0 + ;dw restorestate + db "enablescroll",0 dw enablescroll + db "disablescroll",0 dw disablescroll - dw nothings - dw nothings - dw nothings - dw nothings - dw nothings + db "getchar",0 dw getchar ;================================Table des modes videos (64 BYTES) ============================================ @@ -211,8 +193,8 @@ mode11 DB 0E7H DB 100,75 -DATABLOCKSIZE equ 40 -DATABLOCK equ $ +datablocksize equ 40 +datablock equ $ ;============================================DATABLOCK========================================================= lines db 0 columns db 0 @@ -238,63 +220,47 @@ base dw 0 scrolling db 1 ;=======================================Equivalence pour la clarté du code======================================== -Sequencer equ 03C4h +sequencer equ 03C4h misc equ 03C2h -CCRT equ 03D4h -Attribs equ 03C0h +ccrt equ 03D4h +attribs equ 03C0h graphics equ 03CEh statut equ 03DAh -maxfunc equ 39h -maxmode equ 11 +maxmode equ 11 planesize equ 65000 ;============================================Fonctions de l'int VIDEO=========================================== -;message d'erreur specifiant que les interruptions n'existent plus -nothings: - push cx si - mov si,offset msg - mov ch,04 -showit: - mov cl,cs:[si] - cmp cl,0 - je endshowit - inc si - call charout - jmp showit -endshowit: - pop si cx - ret -msg db 'ERREUR: int 47h fonction inexistante !!!',0 - -;=============ENABLESCROLLING (Fonction 02AH)========= -;Autorise le d‚filement -;-> AH=42 +;=============ENABLESCROLLING========= +;Autorise le défilement +;-> ;<- -;===================================================== - EnableScroll: - mov cs:scrolling,1 +;===================================== +PROC enablescroll FAR + mov [cs:scrolling],1 ret +endp enablescroll -;=============DISABLESCROLLING (Fonction 2Bh)========= -;D‚sactive le d‚filement -;-> AH=43 +;=============DISABLESCROLLING========= +;Désactive le d‚filement +;-> ;<- -;===================================================== -DisableScroll: - mov cs:scrolling,0 +;====================================== +PROC disablescroll FAR + mov [cs:scrolling],0 ret - -;=============ENABLECURSOR (Fonction 013)========= +endp disablescroll + +;=============ENABLECURSOR============= ;Autorise le d‚filement -;-> AH=42 +;-> ;<- -;===================================================== - EnableCursor: - push ax dx - mov cs:cursor,1 - mov dx,CCRT +;====================================== +PROC enablecursor FAR + USES ax,dx + mov [cs:cursor],1 + mov dx,ccrt mov al,0Ah out dx,al inc dx @@ -304,21 +270,23 @@ DisableScroll: dec dx mov al,0Ah out dx,ax - mov bh,cs:x - mov bl,cs:y - call setxy - pop dx ax + mov al,[cs:x] + xor ah,ah + mov dl,[cs:y] + xor dh,dh + call setxy,ax,dx ret +endp enablecursor -;=============DISABLECURSOR (Fonction 14)========= +;=============DISABLECURSOR============= ;D‚sactive le d‚filement -;-> AH=43 +;-> ;<- -;===================================================== -DisableCursor: - push ax dx - mov cs:cursor,0 - mov dx,CCRT +;======================================= +PROC disablecursor FAR + USES ax,dx + mov [cs:cursor],0 + mov dx,ccrt mov al,0Ah out dx,al inc dx @@ -328,107 +296,103 @@ DisableCursor: dec dx mov al,0Ah out dx,ax - pop dx ax ret +endp disablecursor -;==========SETSTYLE (Fonction 11)========= -;Change le style du texte a CL -;-> AH=x ,CX style +;==========SETSTYLE========= +;Change le style du texte a %0 +;-> %0 style ;<- -;========================================= -setstyle: - mov cs:style,cl +;============================ +PROC setstyle FAR + ARG @style:word + USES cx + mov ax,[@style] + mov [cs:style],al ret +endp setstyle -;==========GETSTYLE (Fonction 12)========= -;Récupère le style du texte dans CL -;-> AH=x -;<- CX style -;========================================= -getstyle: - mov cl,cs:style - ret - -;==========SHOWCHAR (Fonction 07h)=========== -;met un caractère de code ASCII DL aprés le curseur -;-> AH=7, DL code ASCII du caractère -;<- -;============================================ -showchar: - push cx - mov cl,dl - mov ch,cs:colors - call charout - pop cx +;==========GETSTYLE========= +;Récupère le style du texte dans AX +;-> +;<- AX style +;=========================== +PROC getstyle FAR + mov al,[cs:style] + xor ah,ah ret +endp getstyle -;=============SetVideoMode (Fonction 00h)========= -;Fixe le mode vidéo courant a AL -;-> AH=0, AL mode d'écran +;=============SetVideoMode========= +;Fixe le mode vidéo courant a %0 +;-> %0 mode d'écran ;<- Carry if error -;================================================= -setvideomode: - push ax cx dx di +;================================== +PROC setvideomode FAR + ARG @mode:word + USES ax,cx,dx,di + mov ax,[@mode] + xor ah,ah cmp al,maxmode - ja errorsetvideomode - cmp cs:mode,5h - jb nographic + ja @@errorsetvideomode + cmp [cs:mode],5h + jb @@nographic cmp al,5h - jae nographic - call initvideo -nographic: - cmp cs:mode,0FFh - jne noinit - call initvideo -noinit: - mov cs:mode,al + jae @@nographic + call initfont +@@nographic: + cmp [cs:mode],0FFh + jne @@noinit + call initfont +@@noinit: + mov [cs:mode],al xor ah,ah mov di,ax shl di,6 add di,offset mode0 mov dx,misc - mov al,cs:[di] + mov al,[cs:di] out dx,al inc di mov dx,statut - mov al,cs:[di] + mov al,[cs:di] out dx,al inc di mov dx,sequencer xor ax,ax -initsequencer: - mov ah,cs:[di] +@@initsequencer: + mov ah,[cs:di] out dx,ax inc al inc di cmp al,4 - jbe initsequencer + jbe @@initsequencer mov ax,0E11h mov dx,ccrt out dx,ax xor ax,ax -initcrt: - mov ah,cs:[di] +@@initcrt: + mov ah,[cs:di] out dx,ax inc al inc di cmp al,24 - jbe initcrt + jbe @@initcrt mov dx,graphics xor ax,ax -initgraphic: - mov ah,cs:[di] +@@initgraphic: + mov ah,[cs:di] out dx,ax inc al inc di cmp al,8 - jbe initgraphic + jbe @@initgraphic mov dx,statut in al,dx mov dx,attribs xor ax,ax -initattribs: - mov ah,cs:[di] +@@initattribs: + mov ah,[cs:di] push ax in ax,dx pop ax @@ -439,97 +403,93 @@ initattribs: inc al inc di cmp al,20 - jbe initattribs + jbe @@initattribs mov al,20h out dx,al - mov al,cs:[di] - mov cs:columns,al - mov ah,cs:[di+1] - mov cs:lines,ah + mov al,[cs:di] + mov [cs:columns],al + mov ah,[cs:di+1] + mov [cs:lines],ah mul ah - mov cl,cs:[di-5] + mov cl,[cs:di-5] and cl,01000000b cmp cl,0 - je colors16 - mov cs:color,8 + je @@colors16 + mov [cs:color],8 mov cl,4 - jmp colors256 -colors16: - mov cs:color,4 + jmp @@colors256 +@@colors16: + mov [cs:color],4 mov cl,3 -colors256: - cmp cs:mode,5 - setae cs:graphic - jb istext +@@colors256: + cmp [cs:mode],5 + setae [cs:graphic] + jb @@istext shl ax,cl - mov cs:segments,0A000h - jmp wasgraph -istext: - mov cs:segments,0B800h + mov [cs:segments],0A000h + jmp @@wasgraph +@@istext: + mov [cs:segments],0B800h shl ax,1 -wasgraph: - mov cs:pagesize,ax +@@wasgraph: + mov [cs:pagesize],ax mov ax,planesize xor dx,dx - div cs:pagesize - mov cs:nbpage,al - mov al,cs:[di-36] + div [cs:pagesize] + mov [cs:nbpage],al + mov al,[cs:di-36] xor ah,ah shl ax,2 - mov cl,cs:graphic + mov cl,[cs:graphic] shr ax,cl - mov cs:linesize,ax - mov ax,cs:[di-43] - mov cs:adress,ax - mov cs:base,ax - mov cs:cursor,1 - mov cs:style,0 - pop di dx cx ax + mov [cs:linesize],ax + mov ax,[cs:di-43] + mov [cs:adress],ax + mov [cs:base],ax + mov [cs:cursor],1 + mov [cs:style],0 ret -errorsetvideomode: - pop di dx cx ax +@@errorsetvideomode: ret +endp setvideomode -initvideo: - push bx cx si ds + +initfont: + push ds call clearscreen push cs pop ds - mov si,offset font8x8 - mov cl,8 - mov bl,1 - call loadfont - mov si,offset font8x16 - mov cl,16 - mov bl,0 - call loadfont - pop ds si cx bx + call loadfont,offset font8x8,8,1 + call loadfont,offset font8x16,16,0 + pop ds ret -;=============GetVideoMode (Fonction 01h)========= -;Renvoie le mode vidéo courant dans AL -;-> AH=1 -;<- AL mode d'écran -;================================================= -getvideomode: - mov al,cs:mode +;=============GetVideoMode========= +;Renvoie le mode vidéo courant dans AX +;-> +;<- AX +;================================== +PROC getvideomode FAR + mov al,[cs:mode] + xor ah,ah ret +endp getvideomode -;=============CLEARSCREEN (Fonction 02h)========= +;=============CLEARSCREEN========= ;Efface l'ecran graphique ou texte -;-> AH=2 +;-> ;<- -;================================================ -clearscreen: - push eax cx dx di es +;================================= +PROC clearscreen FAR + USES eax,cx,dx,di,es mov cx,planesize - mov di,cs:adress + mov di,[cs:adress] shr cx,2 - cmp cs:graphic,1 - jne erasetext + cmp [cs:graphic],1 + jne @@erasetext mov ax,0A000h mov es,ax -erasegraph: +@@erasegraph: mov ax,0F02h mov dx,sequencer out dx,ax @@ -544,41 +504,40 @@ erasegraph: cld rep stosd mov ax,0005h - cmp cs:color,4 - je not256 + cmp [cs:color],4 + je @@not256 mov ax,4005h -not256: +@@not256: mov dx,graphics out dx,ax mov ax,0003h out dx,ax - jmp endoferase - - -erasetext: + jmp @@endoferase +@@erasetext: mov ax,0B800h mov es,ax mov eax,07200720h cld - rep stosd - -endoferase: - xor bx,bx - call setxy - pop es di dx cx eax + rep stosd +@@endoferase: + call setxy,0,0 ret +endp clearscreen -;=============SetFont (Fonction 03h)========= -;Active la font cl parmi les 8 -;-> AH=3, CL n° font +;=============SetFont========= +;Active la font %0 parmi les 8 +;-> %0 n° font ;<- Carry if error -;============================================ -setfont: - push ax cx dx +;============================= +PROC setfont FAR + ARG @font:word + USES ax,cx,dx + mov cx,[@font] + xor ch,ch cmp cl,7 - ja errorsetfont - mov cs:font,cl + ja @@errorsetfont + mov [cs:font],cl mov ah,cl and cl,11b and ah,0100b @@ -587,64 +546,54 @@ setfont: mov dx,sequencer mov al,3 out dx,ax - pop dx cx ax ret -errorsetfont: - pop dx cx ax +@@errorsetfont: ret +endp setfont -;=============GetFont (Fonction 05h)========= -;Récupère le n° de la font active -;-> AH=x +;=============GetFont========= +;Récupère le n° de la font active AX +;-> ;<- CL n° font, Carry if error -;============================================ -Getfont: - push ax cx dx - cmp cl,7 - ja errorgetfont - mov cs:font,cl - mov ah,cl - and cl,11b - and ah,0100b - shl ah,2 - add ah,cl - mov dx,sequencer - mov al,3 - out dx,ax - pop dx cx ax - ret -errorgetfont: - stc - pop dx cx ax - ret +;============================= +PROC getfont FAR + mov al,[cs:font] + xor ah,ah +endp getfont -;=============LoadFont (Fonction 04h)========== -;Charge une police pointée par ds:si dans la carte vidéo sous n°font BL, taille police dans CL -;-> AH=4, BL n°font, DS:SI pointeur vers Font, CL taille police +;!!!!!!!!!!!!!!!!!!!! a remettre les anciens params de timing depuis origine +;=============LoadFont======== +;Charge une police pointée par %0 dans la carte vidéo sous n°font %1, taille police dans %2 +;-> %0 n°font, %1 pointeur vers Font, %2 taille police ;<- Carry if error -;=========================================== -loadfont: - push ax bx cx dx si di es +;============================= +PROC loadfont FAR + ARG @pointer:word,@size:word,@font:word + USES ax,bx,cx,dx,si,di,es + LOCAL @poppop:dword + mov si,[@pointer] + mov cx,[@size] + mov bx,[@font] cmp bl,7 - ja errorloadfont + ja @@errorloadfont xor di,di cli mov dx,sequencer -doseq: - mov ax,cs:[di+offset reg1] +@@doseq: + mov ax,[cs:di+offset reg1] out dx,ax inc di inc di cmp di,6 - jbe doseq + jbe @@doseq mov dx,graphics -doseq2: - mov ax,cs:[di+offset reg1] +@@doseq2: + mov ax,[cs:di+offset reg1] out dx,ax inc di inc di cmp di,6+6 - jbe doseq2 + jbe @@doseq2 sti mov ax,0A000h mov es,ax @@ -652,14 +601,14 @@ doseq2: mov al,0 xor bh,bh cmp bl,4 - jb isless + jb @@isless sub bl,4 shl bl,1 inc bl - jmp okmake -isless: + jmp @@okmake +@@isless: shl bl,1 -okmake: +@@okmake: mov di,bx shl di,13 mov bh,cl @@ -668,104 +617,110 @@ okmake: neg bl xor cx,cx cld -popz: +@@popz: mov cl,bh rep movsb mov cl,bl rep stosb dec dx - jnz popz + jnz @@popz xor di,di mov dx,sequencer -doseqs: - mov ax,cs:[di+offset reg2] +@@doseqs: + mov ax,[cs:di+offset reg2] out dx,ax inc di inc di cmp di,6 - jbe doseqs - mov dx,graphics -doseqs2: - mov ax,cs:[di+offset reg2] + jbe @@doseqs + mov dx,graphics +@@doseqs2: + mov ax,[cs:di+offset reg2] out dx,ax inc di inc di cmp di,6+6 - jbe doseqs2 - pop es di si dx cx bx ax + jbe @@doseqs2 ret -errorloadfont: +@@errorloadfont: stc - pop es di si dx cx bx ax ret reg2 dw 0100h, 0302h, 0304h, 0300h dw 0004h, 1005h, 0E06h reg1 dw 0100h, 0402h, 0704h, 0300h - dw 0204h, 0005h, 0406h + dw 0204h, 0005h, 0406h +endp loadfont -;==========SHOWLINE (Fonction 06h)=============== +;==========SHOWLINE=============== ;remet le curseur text a la ligne avec un retour chariot -;-> AH=6 +;-> ;<- -;================================================ -showline: - push bx cx - mov bl,cs:y +;================================= +PROC addline FAR + USES bx,cx + mov bl,[cs:y] xor bh,bh - mov cl,cs:lines + mov cl,[cs:lines] sub cl,2 cmp bl,cl - jne scro + jne @@scro dec bl mov cx,1 - cmp cs:graphic,0 - je okscro + cmp [cs:graphic],0 + je @@okscro mov cx,8 -okscro: - call scrolldown -scro: +@@okscro: + call scrolldown,cx +@@scro: inc bl - call setxy - pop cx bx + call setxy,0,bx ret +endp addline -;==========SETCOLOR (Fonction 15h)========= +;==========SETCOLOR========= ;Change les attributs du texte a CL -;-> AH=21 ,CL couleur +;-> %0 couleur ;<- -;========================================= -setcolor: - mov cs:colors,CL +;=========================== +PROC setcolor FAR + ARG @color:word + USES cx + mov cx,[@color] + mov [cs:colors],cl ret +endp setcolor -;==========GETCOLOR (Fonction 16h)========= -;Récupère les attributs du texte dans CL -;-> AH=22 -;<- CL couleur -;========================================= -getcolor: - mov cl,cs:colors +;==========GETCOLOR========= +;Récupère les attributs du texte dans AX +;-> +;<- AX couleur +;=========================== +PROC getcolor FAR + mov al,[cs:colors] + xor ah,ah ret +endp getcolor -;==========SCROLLDOWN (Fonction 17h)========= -;defile de cx lines vers le bas -;-> AH=23, CX lines à défiler vers le bas +;==========SCROLLDOWN========= +;defile de %0 lines vers le bas +;-> %0 lines à défiler vers le bas ;<- ;============================= -scrolldown: - push ax cx dx si di ds es - cmp cs:scrolling,0 - je graphp - mov ax,cx - mul cs:linesize +PROC scrolldown FAR + ARG @line:word + USES ax,cx,dx,si,di,ds,es + cmp [cs:scrolling],0 + je @@graphp + mov ax,[@line] + mul [cs:linesize] mov si,ax - mov cx,cs:pagesize + mov cx,[cs:pagesize] sub cx,si - mov di,cs:adress + mov di,[cs:adress] cld - cmp byte ptr cs:graphic,1 - jne textp + cmp [cs:graphic],1 + jne @@textp mov ax,0A000h mov es,ax mov ds,ax @@ -778,74 +733,82 @@ scrolldown: cld rep movsb mov ax,0005h - cmp cs:color,4 - je not256ok + cmp [cs:color],4 + je @@not256ok mov ax,4005h -not256ok: +@@not256ok: mov dx,graphics out dx,ax mov ax,0003h out dx,ax - jmp graphp + jmp @@graphp -textp: +@@textp: mov ax,0B800h mov es,ax mov ds,ax rep movsb -graphp: - pop es ds di si dx cx ax - ret - -;==========GETXY (Fonction 18h)========= -;Change les coordonnées du curseur a X:BH,Y:BL -;-> AH=24 -;<- BH coordonnées x, BL coordonnées y -;============================= -getxy: - mov bh,cs:x - mov bl,cs:y +@@graphp: ret +endp scrolldown -;==========SETXY (Fonction 19h)========= -;Change les coordonnées du curseur a X:BH,Y:BL -;-> AH=25, BH coordonnées x, BL coordonnées y +;==========GETXY========= +;Met les coordonnées du curseur dans %0 au format point +;-> +;<- ah coordonnées x, al coordonnées y +;======================== +PROC getxy FAR + ARG @pointer:word + USES bx + mov bx,[@pointer] + mov ah,[cs:x] + mov al,[cs:y] + ret +endp getxy + +;==========SETXY========= +;Change les coordonnées du curseur a X:%0,Y:%1 +;-> %0 coordonnées x, %1 coordonnées y ;<- -;===================================== -setxy: - push ax bx dx di - mov cs:x,bh - mov cs:y,bl - mov al,bl - mov bl,bh - xor bh,bh - mov di,cs:adress +;======================== +PROC setxy FAR + ARG @x:word,@y:word + USES ax,bx,dx,di + mov ax,[@y] + mov bx,[@x] + mov [cs:x],bl + mov [cs:y],al + mov di,[cs:adress] add di,bx - mul cs:columns + mul [cs:columns] add di,ax shl di,1 - mov cs:xy,di + mov [cs:xy],di call setcursor - pop di dx bx ax ret +endp setxy -;==========SHOWPIXEL (Fonction 08h)========= -;Affiche un pixel de couleur AL en X:BX,Y:CX -;-> AH=x, BX coordonnées x, CX coordonnées y, AL couleur +;==========SHOWPIXEL========= +;Affiche un pixel de couleur AL en X:%0,Y:%1 +;-> %0 coordonnées x, %1 coordonnées y, %2 couleur ;<- -;========================================= -showpixel: - push ax bx cx dx si di es - cmp cs:color,4 - je showpixel4 +;============================ +PROC showpixel FAR + ARG @x:word,@y:word,@color:word + USES ax,bx,cx,dx,si,di,es + mov bx,[@x] + mov cx,[@y] + mov ax,[@color] + cmp [cs:color],4 + je @@showpixel4 mov si,ax mov ax,cx mov cl,bl - mul cs:linesize + mul [cs:linesize] shr bx,2 add ax,bx mov di,ax - add di,cs:adress + add di,[cs:adress] and cl,3 mov ah,1 shl ah,cl @@ -855,19 +818,19 @@ showpixel: mov bx,0A000h mov es,bx mov ax,si - mov es:[di],al - jmp endofshow + mov [es:di],al + jmp @@endofshow -showpixel4: +@@showpixel4: mov dx,ax mov ax,cx mov ch,dl mov cl,bl - mul cs:linesize + mul [cs:linesize] shr bx,3 add ax,bx mov di,ax - add di,cs:adress + add di,[cs:adress] and cl,111b xor cl,111b mov ah,1 @@ -881,28 +844,30 @@ showpixel4: out dx,ax mov bx,0A000h mov es,bx - mov al,es:[di] - mov es:[di],ch - -endofshow: - pop es di si dx cx bx ax + mov al,[es:di] + mov [es:di],ch +@@endofshow: ret +endp showpixel -;==========GETPIXEL (Fonction 09h)========= -;Récupère en al la couleur du pixel de coordonnées X:BX,Y:CX -;-> AH=x, BX coordonnées x, CX coordonnées y, AL couleur -;<- +;!!!!!!!!!!!!!! gerer le mode chain 4 +;==========GETPIXEL========= +;Récupère en ax la couleur du pixel de coordonnées X:%0,Y:%1 +;-> %0 coordonnées x, %1 coordonnées y +;<- AX couleur ;========================================= -getpixel: - push ax bx cx dx di bp es - mov bp,ax +PROC getpixel FAR + ARG @x:word,@y:word + USES ax,bx,cx,dx,di,es + mov bx,[@x] + mov cx,[@y] mov ax,cx mov cl,bl - mul cs:linesize + mul [cs:linesize] shr bx,2 add ax,bx mov di,ax - add di,cs:adress + add di,[cs:adress] and cl,3 mov ah,cl mov al,4 @@ -910,98 +875,115 @@ getpixel: out dx,ax mov bx,0A000h mov es,bx - mov ax,bp - mov al,es:[di] - pop es bp di dx cx bx ax + mov al,[es:di] ret +endp getpixel -;==========GETVGAINFO (Fonction 0xh)========= +;==========GETVGAINFO========= ;Renvoie un bloc de donnée en ES:DI sur l'état de la carte graphique -;<- AH=x, ES:DI pointeur +;<- ES:%0 pointeur ;-> ;============================================= -Getvgainfos: - push cx si di ds +PROC getvgainfos FAR + ARG @pointer:word + USES cx,si,di,ds push cs pop ds mov cx,datablocksize mov si,offset datablock + mov di,[@pointer] cld rep movsb - pop ds di si cx ret +endp getvgainfos -;==========WAITRETRACE (Fonction 0xh)========= +;==========WAITRETRACE========= ;Synchronisation avec la retrace verticale -;<- AH=x +;<- ;-> -;============================================= -waitretrace: - push ax dx +;============================== +PROC waitretrace FAR + USES ax,dx mov dx,3DAh -waitr: +@@waitr: in al,dx test al,8 - jz waitr - pop dx ax + jz @@waitr ret +endp waitretrace -;==========WAITHRETRACE (Fonction 0xh)========= +;==========WAITHRETRACE========= ;Synchronisation avec la retrace horizontale -;<- AH=x +;<- ;-> -;============================================= -waithretrace: - push ax dx +;=============================== +PROC waithretrace FAR + USES ax,dx mov dx,3DAh -waitr2: +@@waitr: in al,dx test al,1 - jz waitr2 - pop dx ax + jz @@waitr ret - -;Renvoie le caractère sur le curseur en dl -getchar: - push ax di es +endp waithretrace + +;==========GETCHAR========= +;Renvoie en AX le caractère sur le curseur +;<- +;-> +;========================== +PROC getchar FAR + USES di,es mov ax,0B800h mov es,ax - mov di,cs:xy - mov dl,es:[di] - pop es di ax + mov di,[cs:xy] + mov al,[es:di] + xor ah,ah ret +endp getchar -;Ecrit le caractère ASCII CL attribut CH aprés le curseur, en le mettant à jours -charout: - push ax bx cx dx di es - cmp cs:graphic,1 - jne textaccess +;==========SHOWCHAR========= +;Ecrit le caractère ASCII %0 attribut %1 aprés le curseur, en le mettant à jours +;<- +;-> +;=========================== +PROC showchar FAR + ARG @char:word,@attr:word + USES ax,bx,cx,dx,di,es + mov cl,[byte ptr @char] + mov ch,[byte ptr @attr] + cmp [@attr],0FFFFh + jne @@notlastattr + mov ch,[cs:colors] +@@notlastattr: + cmp [cs:graphic],1 + jne @@textaccess call emulatechar - jmp adjusttext -textaccess: + jmp @@adjusttext +@@textaccess: mov ax,0B800h mov es,ax - mov di,cs:xy - mov es:[di],cx - add cs:xy,2 -adjusttext: - inc cs:x - mov cl,cs:columns - cmp cs:x,cl - jb noadjusted - call showline -noadjusted: + mov di,[cs:xy] + mov [es:di],cx + add [cs:xy],2 +@@adjusttext: + inc [cs:x] + mov cl,[cs:columns] + cmp [cs:x],cl + jb @@noadjusted + call addline +@@noadjusted: call setcursor - pop es di dx cx bx ax ret +endp showchar setcursor: push ax cx dx - cmp cs:cursor,1 + cmp [cs:cursor],1 jne notshow - mov dx,CCRT + mov dx,ccrt mov al,0Eh - mov cx,cs:xy + mov cx,[cs:xy] shr cx,1 mov ah,ch out dx,ax @@ -1021,24 +1003,24 @@ emulatechar: and di,11111111b shl di,3 add di,offset font8x8 - mov bl,cs:x - mov cl,cs:y + mov bl,[cs:x] + mov cl,[cs:y] xor bh,bh xor ch,ch shl bx,3 shl cx,3 - mov ah,cs:[di] + mov ah,[cs:di] xor dx,dx bouclet: rol ah,1 push ax jc colored shr al,4 - cmp cs:style,0 + cmp [cs:style],0 jnz transparent colored: - and al,1111b - call showpixel + and ax,1111b + call showpixel,bx,cx,ax transparent: pop ax inc bx @@ -1046,7 +1028,7 @@ transparent: cmp dl,8 jb bouclet inc di - mov ah,cs:[di] + mov ah,[cs:di] xor dl,dl sub bx,8 inc cx @@ -1063,9 +1045,9 @@ ended: savescreen: push ax cx dx si di bp ds es gs mov bp,sp -mov dx,ss:[bp+22] +mov dx,[ss:bp+22] mov ah,2 -mov cx,cs:pagesize +mov cx,[cs:pagesize] push cs pop ds mov si,offset data3 @@ -1083,12 +1065,12 @@ data3 db '/vgascreen',0 ;===================================sauve l'ecran rapidement en es:di================ -SaveScreento: +savescreento: push cx si di ds mov cx,0B800h mov ds,cx xor ecx,ecx - mov cx,cs:pagesize + mov cx,[cs:pagesize] shr cx,2 xor si,si cld @@ -1097,7 +1079,7 @@ SaveScreento: ret ;===================================sauve les parametres en es:di================ -Saveparamto: +saveparamto: push ecx si di ds push cs pop ds @@ -1110,7 +1092,7 @@ Saveparamto: ret ;===================================restore les parametres depuis en ds:si================ -Restoreparamfrom: +restoreparamfrom: push ecx si di es push cs pop es @@ -1123,10 +1105,10 @@ Restoreparamfrom: ret ;R‚cupŠre l'ecran de la carte depuis son bloc mémoire -RestoreScreen: +restorescreen: push ax dx si bp ds gs mov bp,sp -mov dx,ss:[bp+16] +mov dx,[ss:bp+16] push cs pop ds mov si,offset data3 @@ -1140,12 +1122,12 @@ pop gs ds bp si dx ax ret ;===================================restore l'ecran rapidement de ds:si================ -RestoreScreenfrom: +restorescreenfrom: push ecx si di ds es mov cx,0B800H mov es,cx xor ecx,ecx - mov cx,cs:pagesize + mov cx,[cs:pagesize] shr cx,2 xor di,di cld @@ -1156,15 +1138,15 @@ RestoreScreenfrom: ;===============================Page2to1============================ -Page2to1: +page2to1: push ecx si di ds es mov cx,0B800H mov es,cx mov ds,cx xor ecx,ecx - mov cx,cs:pagesize + mov cx,[cs:pagesize] shr cx,2 - mov si,cs:pagesize + mov si,[cs:pagesize] xor di,di cld rep movsd @@ -1172,15 +1154,15 @@ Page2to1: ret ;===============================Page1to2============================ -Page1to2: +page1to2: push ecx si di ds es mov cx,0B800H mov es,cx mov ds,cx xor ecx,ecx - mov cx,cs:pagesize + mov cx,[cs:pagesize] shr cx,2 - mov di,cs:pagesize + mov di,[cs:pagesize] xor si,si cld rep movsd @@ -1188,196 +1170,195 @@ Page1to2: ret ;===============================xchgPages============================ -xchgPages: -push ax cx dx si di bp ds es gs -mov bp,sp -mov dx,ss:[bp+22] -mov ah,2 -mov cx,datablocksize -add cx,cs:pagesize -add cx,3*256 -push cs -pop ds -mov si,offset data4 -int 49h -mov ah,6 -int 49h -push gs -pop es -xor di,di -call savescreento -call Page2to1 -push gs -pop ds -xor si,si -mov cx,0B800H -mov es,cx -mov di,cs:pagesize -xor ecx,ecx -mov cx,cs:pagesize -shr cx,2 -cld -rep movsd -mov ah,01h -int 49h -pop gs es ds bp di si dx cx ax -ret - -data4 db '/vgatemp',0 +;xchgpages: +;push ax cx dx si di bp ds es gs +;mov bp,sp +;mov dx,[ss:bp+22] +;mov ah,2 +;mov cx,datablocksize +;add cx,[cs:pagesize] +;add cx,3*256 +;push cs +;pop ds +;mov si,offset data4 +;int 49h +;mov ah,6 +;int 49h +;push gs +;pop es +;xor di,di +;call savescreento +;call page2to1 +;push gs +;pop ds +;xor si,si +;mov cx,0B800H +;mov es,cx +;mov di,[cs:pagesize] +;xor ecx,ecx +;mov cx,[cs:pagesize] +;shr cx,2 +;cld +;rep movsd +;mov ah,01h +;int 49h +;pop gs es ds bp di si dx cx ax +;ret +; +;data4 db '/vgatemp',0 ;Sauve l'‚tat de la carte dans un bloc mémoire -savestate: -push ax cx dx si di bp ds es gs -mov bp,sp -mov dx,ss:[bp+22] -mov ah,2 -mov cx,datablocksize -add cx,cs:pagesize -add cx,3*256 -push cs -pop ds -mov si,offset data -int 49h -mov ah,6 -int 49h -push gs -pop es -xor di,di -call saveparamto -add di,datablocksize -call savescreento -add di,cs:pagesize -call savedacto -pop gs es ds bp di si dx cx ax -ret +;savestate: +;push ax cx dx si di bp ds es gs +;mov bp,sp +;mov dx,[ss:bp+22] +;mov ah,2 +;mov cx,datablocksize +;add cx,[cs:pagesize] +;add cx,3*256 +;push cs +;pop ds +;mov si,offset data +;int 49h +;mov ah,6 +;int 49h +;push gs +;pop es +;xor di,di +;call saveparamto +;add di,datablocksize +;call savescreento +;add di,[cs:pagesize] +;call savedacto +;pop gs es ds bp di si dx cx ax +;ret -data db '/vga',0 +;data db '/vga',0 ;R‚cupŠre l'‚tat de la carte depuis son bloc mémoire -restorestate: -push ax dx si bp ds gs -mov bp,sp -mov dx,ss:[bp+16] -push cs -pop ds -mov si,offset data -mov ah,9 -int 49h -push gs -pop ds -mov al,ds:[7] -cmp cs:mode,al -je nochangemode -mov ah,0 -call setvideomode -nochangemode: -xor si,si -call restoreparamfrom -add si,datablocksize -call restorescreenfrom -add si,cs:pagesize -call restoredacfrom -pop gs ds bp si dx ax -ret +;restorestate: +;push ax dx si bp ds gs +;mov bp,sp +;mov dx,[ss:bp+16] +;push cs +;pop ds +;mov si,offset data +;mov ah,9 +;int 49h +;push gs +;pop ds +;mov al,[ds:7] +;cmp [cs:mode],al +;je nochangemode +;mov ah,0 +;call setvideomode +;nochangemode: +;xor si,si +;call restoreparamfrom +;add si,datablocksize +;call restorescreenfrom +;add si,[cs:pagesize] +;call restoredacfrom +;pop gs ds bp si dx ax +;ret ;sauve le DAC dans un bloc de mémoire -savedac: -push ax cx dx si di bp ds es gs -mov bp,sp -mov dx,ss:[bp+22] -mov ah,2 -mov cx,3*256 -push cs -pop ds -mov si,offset data2 -int 49h -mov ah,6 -int 49h -push gs -pop es -xor di,di -call savedacto -pop gs es ds bp di si dx cx ax -ret +;savedac: +;push ax cx dx si di bp ds es gs +;mov bp,sp +;mov dx,[ss:bp+22] +;mov ah,2 +;mov cx,3*256 +;push cs +;pop ds +;mov si,offset data2 +;int 49h +;mov ah,6 +;int 49h +;push gs +;pop es +;xor di,di +;call savedacto +;pop gs es ds bp di si dx cx ax +;ret -data2 db '/vgadac',0 +;data2 db '/vgadac',0 ;R‚cupŠre le dac depuis son bloc mémoire -restoredac: -push ax dx si bp ds gs -mov bp,sp -mov dx,ss:[bp+16] -push cs -pop ds -mov si,offset data2 -mov ah,9 -int 49h -push gs -pop ds -xor si,si -call restoredacfrom -pop gs ds bp si dx ax -ret +;restoredac: +;push ax dx si bp ds gs +;mov bp,sp +;mov dx,[ss:bp+16] +;push cs +;pop ds +;mov si,offset data2 +;mov ah,9 +;int 49h +;push gs +;pop ds +;xor si,si +;call restoredacfrom +;pop gs ds bp si dx ax +;ret ;sauve le DAC en es:di -savedacto: -push ax cx dx di -mov dx,3C7h -mov cx,256 -save: -mov al,cl -dec al -out dx,al -inc dx -inc dx -in al,dx -mov es:[di],al -inc di -in al,dx -mov es:[di],al -inc di -in al,dx -mov es:[di],al -inc di -dec dx -dec dx -dec cx -jne save -pop di dx cx ax -ret +;savedacto: +;push ax cx dx di +;mov dx,3C7h +;mov cx,256 +;save: +;mov al,cl +;dec al +;out dx,al +;inc dx +;inc dx +;in al,dx +;mov [es:di],al +;inc di +;in al,dx +;mov [es:di],al +;inc di +;in al,dx +;mov [es:di],al +;inc di +;dec dx +;dec dx +;dec cx +;jne save +;pop di dx cx ax +;ret ;restore le DAC depuis ds:si -restoredacfrom: -push ax cx dx si -xor ax,ax -mov dx,3C8h -mov cx,256 -save2: -mov al,cl -dec al -out dx,al -inc dx -mov al,ds:[si] -inc si -out dx,al -mov al,ds:[si] -inc si -out dx,al -mov al,ds:[si] -inc si -out dx,al -dec dx -dec cx -jne save2 -pop si dx cx ax -ret +;restoredacfrom: +;push ax cx dx si +;xor ax,ax +;mov dx,3C8h +;mov cx,256 +;save2: +;mov al,cl +;dec al +;out dx,al +;inc dx +;mov al,[ds:si] +;inc si +;out dx,al +;mov al,[ds:si] +;inc si +;out dx,al +;mov al,[ds:si] +;inc si +;out dx,al +;dec dx +;dec cx +;jne save2 +;pop si dx cx ax +;ret font8x8: -include ..\include\pol8x8.inc +include "..\include\pol8x8.inc" font8x16: -include ..\include\pol8x16.inc +include "..\include\pol8x16.inc" -end start