helloworld.ru -  
helloworld.ru -
           
:  

C#
MS Visual C++
Borland C++
C++ Builder
Visual Basic
Quick Basic
Turbo Pascal
Delphi
JavaScript
Java
PHP
Perl
Assembler
AutoLisp
Fortran
Python
1C

-
HTML
VRML
HTTP
CGI
FTP
Proxy
DNS
TCP/IP
Apache

Web-
HTML

VRML
PhotoShop
Cookie
CGI
SSI
CSS
ASP
PHP
Perl


DirectDraw
DirectSound
Direct3D
OpenGL
3D-
DOS





.



MySQL
SQL






demaker.ru

 .



- maserati .

helloworld.ru

coe aoe

            1. paee pacpeeee ca.

   Bce c,  a  e,  a    ece,  opaoa  oao
opao.  oepxoc ca paeea a p oepecx  o-  e,
aaex opoa, a opo ec paao a ceo- pa. Bce -
 co co paep ceopa 512 a  MS DOS.
   a pacpeee o ao oec ceopo,  oopoe eoxoo,
o ec eo.  Too ecoo ceopo a ee ooe ce
apeeppoa    ceax  .  Ocae  oc a ocoe
paa "ep ooe - epoo oca".  o oaae, o o epe
aoe   ca   a   ceopa   oce-  eo  aoc  o
apae  ep ca. p oe aa ceopa ocooac
  co  peee  cooe oac ca- oc papoca o c,
paa oe a  ae oc    e  ac.
   cpoae c   e  eoope  ceae  xapaepc.
aco o coco  x  oee apaex ac,   ao  
oopx  ec  e oo,  o a oe x copo.  Bce opo,
pacooee a ao pacco o  epa,  ece  aac  -
po.   oco   oo   cex  co  ac  aeo,  o
ocaec oo epeee ec ao ce opo ooo  -
pa,  pee  e  epexo   cee.  p po o
oocc    pa  oepao  cce-  a.  o   paa
cpoa  c a ecoo paeo (o epex) paoo paepa.
o o pe apaep cpoaoo ca o co oac.
   coe ceopa   opeec   ao   opae,   oop
acae a  opaa  ca.  opa  ae  e-
ao oep aoo ceopa.  BIOS epe ceopa 1-8,  1-9 
1-15,   acoc o eoc ca.  opo e appc,  eco
oo o opeec exaec o cee oo e/ac o
eeo pa ca.  coe  BIOS opaac   opeeeo
ceop,   aa  oepa  opo    ceopa.  Oao    DOS
paccapa ce ceopa ca,  a o e,  oo- pa  epec
op, aa o 0, oo a ceop ee co oec oep
ceopa.
    ce  ep  ceop  (opoa  0,  ceop  1) coep ac
aao ap,  oopa ec eoo popao,  oo- -
e  oep ca c cooo aoe ocae ac MS DOS.
ae   e  o  a  paee  ao,  oope  coepa
opa  o  pacpeee  cooo  pocpaca  (o-  pa o
xpac  coopae eoacoc).  ae e op- eo  aao,
oop  coep  cco  ao    cco a oa- ao,  a ae
aae  ao ece ca o aac.  Haoe,  aee  e
eoe  popa  DOS IBMBIO.COM  IBMDOS.COM,  oope cac
p cape   oecea  oep  oooc  eoxo  
axoe    ap aa COMMAND.COM,  oop ecoeo ec
ocoo ac oepa- oo cce.
   cpoae c e a ac ap,  oopa coep
a  paeo,  oo  pae  c  e  ec-  o
oepao ccea.  Taa paeo coep opa  o  o,
e  a  ce  aaec  pae DOS,  a ae ep-  ceop aoo
paea  coep  ac  aao  ap.  B   ocao   pae
opaoa a e, a  cea.


                                     - 2 -
          ee a paee ao.

     DOS       FAT    
 .
        FAT  12- (1.5 ) .
          FAT ( )  ;  
      .      FAT
  FFFF.     :

                  
             D - 8          FF
             S - 8          FE
             D - 9          FD
             S - 9          FC
             QD - 9         F9
             QD - 15        F9
          40  .      
 ,   ,      
 IBM/PC,    /   .  
    133-       89- (3,5
 )    80 .     
     .  , -
   ,    
 QD-9  QD-15.

 _______________________________________________________________
                 
                                       ()
 _______________________________________________________________

       QD-9        2              9            80           720
       QD-15       2             15            80          1200
 _______________________________________________________________

       QD-9   D-9       .
   QD-9       133- ,
   89- (3,5 ) .       -
        IBM/PC  -
  ,         .
 ,           
   .
           QD-15,     IBM/PC
  ,      80   15 ,   512
 .         -
  ,         .
          
    .

   FAT      .  
         :

                   
     000          .
     FF8-FFF     (  ).
     XXX            ,  
                   
               .   
                 .

                                     - 3 -
     FF0-FF7   .
              (FF7   , 
                ).

             
 (      ), 
   .        ,  
    .    FAT
   ,   . FAT   
    DOS     (     
.);      ,  -
 FAT     .

      ,      :
     1.     1.5 (..    FAT)
     2.       FAT,    -
 ,        
 .
     3.       MOV.
     4.    ,   12 ,  
12 .
     5.      FF8,     - -
  ,    12     
.
      INT 25  INT 26,     DEBUG   -
 .        

     1.  2   .
     2.       .
     3.        -
.
   p oe   paepe   acepa   apaco   pacxoec   cooe
pocpaco,  o oa oe c e a paep  acepa,  o
aa  paee  ao  caoc  co oo.  p paoe c
ca DOS apae o FAT  a,  o oooc  coxpa  ee
a,  oo  p  oo  paepe  FAT  oe  pacxoo- ac oo
oepao a.  oco oco AT  e  ocaoo  oo
a,  o    x  pee  aoo oe FAT.  oo  20M
ecepa  ee paep acepo,  e   10M,  oecea
oo  cooo  pocpaca.    ce  eoc  1.2M  pa
acep paepo  1 ceop,  a a x ocooe aaee coco  
xpae  o  ecoo  ca,  a  ceoaeo  oaoc oe
aa.

   Cpe poe.

    DOS 1CH ae opa o ae paee ao,  o  e
ae ca FAT.  oece oep aoe  DL,  e 0 = aoe o
oa,  1 = A,   ..  p opae DX coep co acepo  
FAT,  a  CX  -  co  ao    ceope.  DS:BX  a- ae a a,
coepa ep a FAT, .e. a o, aa  ca.

   H poe.

   Haoo ee o oc  FAT  e acceepa.  Oe-  ,
o oee oepa acepa a 1.5 pooc opoa- e ca,
co o pao a 1   ee ooa  coee  o  c
opao. o eo aoaec ope pea .


                                     - 4 -
;--- ceee ax
BUFFER    DB   1024  DUP(0)  ;oo eco  2 ceopo

;---ae FAT  a
          LEA  BX,BUFFER      ;aae a ep ax
          MOV  DX,1           ;oec oep ceopa
          MOV  CX,2           ;2 ceopa
          MOV  AL,0           ;aoe A
          INT  25H            ;ae ceopa
          POP  CX             ;occaaae ce
;---oae oep acepa
          MOV  AX,3           ;oep acepa  AX
          MOV  CX,AX          ;eae o
          MOV  DX,AX          ;eae op o
          SHR  DX,1           ;e op o a 2
          ADD  CX,DX          ;caae e coo
          ADD  BX,CX          ;oae a ceee
          MOV  DX,[BX]        ;oae 2 aa  oo eca
          TEST AX,1           ;oep acepa ee?
          JNZ  ODD_CLUSTER    ;xo, ec a
          AND  DX,0000111111111111B    ;oae oep
          JMP  SHORT CONTINUE   ;xo epe opao eeoo
ODD_CLUSTER:   MOV  CL,4      ;oooa  c pao
          SHR  DX,CL          ;cae  cape 12 o
CONTINUE:


         

               -
      :
      1.         
       .
      2.       .  -
       16     
   ,       ,
           . 
 " " (boot  indicator)      
   ,     
 .   FDISK    -
   80H    ;      00.   80H
       , -
       .     -
       ,  
         .    
     0:7C00.
              (  -
     ):


                                     - 5 -
1BE   1     | ..|  |  |  |
1C2                | ..|  |  |  |
1C6            . |       |      |
1CA                |       |      |
                        |______________________________________|
1CE   2     | ..|  |  |  |
1D2                | ..|  |  |  |
1D6            . |       |      |
1DA                |       |      |
                        |______________________________________|
1DE   3     | ..|  |  |  |
1E2                | ..|  |  |  |
1E6            . |       |      |
1EA                |       |      |
                        |______________________________________|
1EE   4     | ..|  |  |  |
1F2                | ..|  |  |  |
1F6            . |       |      |
1FA                |       |      |
                        |___________________|__________________|
1FE  ""          |__05_____|__AA_____|
         IBM,  10-      
     512 ,   (interleave) 6,
 17   ,  4   .   
  .
           FF     
 00  -    ;        .
   ,      .  
         .    
   :  00 -  ; 01 - DOS.
         ""       -
 .         -
    "".      13H ( 
   BIOS)   10-  .
        ,      
 ,     MOV    -
  13 BIOS. (      ;
      80H      
 ).
       ,   1  .
      :      2,    
 1    .
                4-    
".".      , -.
                4-   "".
      ,  - .
             "" -
   ,     1FE.
             ,  -
    .
      DS:SI    .
              
       :
      1.            
     .
      2.     -  /  -
         .  
          
 ,         -
      .
      3.       -

                                     - 6 -
 ,        .

     Opeeee ocoo cooo pocpaca.

popaa oa  opopo-  a  ocoe  cooe pocpaco 
cooa ooae o exae  eca.  Ec  eca  e  xaae,  o
ooae  oe    popa  cpa poe e oep
opa.

   Cpe poe.

    36H  pepa  21H  cooae  coo  eec  coooo
pocpaca a ce.  Ece xoo pecp DL, oop oe
coepa oep aoe.  Haoe o  oa  ooaaec  0,
aoe  A  -  1    ..  p  opae BX coep co ocx
acepo,  AX - co ceopo  acepe,  a CX - oeco  a  
ceope.  Heooe  paee  oe ae eae pea.  B
cee pepe poepec, o a xcopoe cee ocaoc o
ee epe 2K cooo pocpaca:

   MOV  AH,36H          ;oep 
   MOV  DL,1            ;aoe A
   INT  21H             ;oae opa
   CMP  BX,2            ;eec  2 coox acepa?
   JL   RUNNING_OUT     ;ec e, o cooae o o

                oee/caoa paepa aa.

   popaa oe  oea poep paep aa o pa pa.
Oa    oox  p  coco    opeee   ca   ace,
coepaxc  ae. pa -  opeee o oa aa, c e
o ao aae  caoe epo    oae    a
ox ax, e ee cecx.
   Koeo, paep aa caaaec  aoaec  e  DOS.
oa   popaa   oe   ac      peeppoa   cooo
pocpaca  aeeo cooa.  B o cae ao op
a  pee poo oca  aca ao oep ac, o a
e ocao . ac e "o"  peao oocc
  a    aoe  e  a,  oope cao oac 
cox ceopax, oeex  aa p o oepa.

   Cpe poe.

   FCB  23H pepa 21H cooae co ace  ae.  Ec
pca a  ac  1 a,  o eo paep e opae 
aax.  DS:DX  o  aa  a pa o opoo aa.
ae oe . Ec a e ae, o  AL opaaec FF. B
poo cae  AL opaaec 0, a co ace oeaec  oe
oepa ac poo oca FCB (a 33-36).   pao pao
oe  ac FCB oo  caoeo oce op aa,  o
epe oo ;  o xaoe oe pacooeo o cee 14
 FCB. Ec paep aa eoo ec a  ac, o cooaeoe
co ace opec epx.  Bo pep,    oopo  coec
a ac paa 1:

;---opeeee paepa aa
   LEA  DX,FCB        ;DS:DX aae a FCB
   MOV  BX,DX         ;ope aae  BX
   MOV  CX,1          ;paep ac  CX

                                     - 7 -
   MOV  [BX]+14,CX    ;e  oe paepa ac FCB
   MOV  AH,23H        ; cooaa paep aa
   INT  21H           ;o 
   MOV  AX,[BX]+33    ;oae a ac paepa aa
   MOV  CX,[BX]+35    ;oae cap ac paepa aa


                  Coae/aee oaaoa.

   popaa oe  coaa   a oaao,  p oe
eoopx co.   coa oaaoa eoxoo,  o o o
pae  epe  oo  coe  eco    opeo aaoe.   ae
oaaoa eoxoo,  o o e  coepa  ao    cco  a
pe  oaao.  Kpoe  oo,  B  e oee a-  oaao,
oop ec Ba e aaoo (o,  c oop o  oa
oc ce oepa a aaoa). Oe ae, o eooo
a opeo aao.

   Cpe poe.

   oco pae  o  ao  oca  oo   opeo
aao,  o   coa  ae oaaoa ao coo- a
ecpop ao.

                         Coae oaaoa

   DS:DX o  aa  a  cpo,  a  aoe      
aao,   oopo  oe    coa  oaao.  Cpoa  oa
aepac ao ASCII 0.   op oaaoa c ee PRIMATES
  opeo  aaoe  aoe  A:  ao  aca  cpo     e
"A:\PRIMATES".    op oaaoa  po oaaoe c ee
MAMMALS ae "A:\MAMMALS\PRIMATES".   aoe A:  oe  
oeo ec B paoaee c aoee, coe-  o oa, 
 oe aac  c  eeo  aaoa.  oece    AH  39H  
oe  pepae  21H;  ec  aa  pa-  ,  o e
coa  o  aao.  B  poo  cae  e  caoe   a
epeoca,  a  AX e coepa o o 3 ( eepe)  5 (e
oca). B pepe coaec oaa- o PRIMATES:

;--- ceee ax
PATH    DB   'A:MAMMALS\PRIMATES',0

;---coae oaao c ee PRIMATES
   LEA  DX,PATH     ;DS:DX o aa a 
   MOV  AH,39H      ;oep 
   INT  21H         ;coae oaao
   JC   ERROR_ROUT  ;opaoa oo

                         aee oaaoa

    ae  oaaoa  ao  coppoa  cpo,    ooc
coaa  c o,  oop B aa p coa aaoa.  ae
oece  AH 3AH  oe pepae 21H.  O p  eoe
  AX  opae o 3  5 (o 5 oe aa,  o
aao eco).

                  ee/eee oaaoa.

   oaao o oo oo opeo aao,  a ce-  e

                                     - 8 -
oo,   o   o   xpac   a   oe  a,  a  e    apaee
peopeeex ceopax.  oaao eooo ca  c  o
aa,  oco oe aaoa, oocc  oaao- , ee
cea a apo (c  caoe  o  5)  .  oaao
aac  c  x ceax 32-ax oeo,  ep  oopx
ee  oa, a opo - e o. O opep oaao cpe
opax aaoo. Cc a oaao eo po acac
a oe cc a a.
   peoaaec, o  oaao oe  poa a o po
a,  oo poe  e cocae pa ap eo  a. Ho,
  coae,  coae  MS  DOS  oec  0   oe  aa 
eeo,  oocxc  oaaoa.  B peae DOS cae,  o
o  a ee e   oaaec a eo.  He pocoo
cocoa peooe  poe.

   Cpe poe.

    pao epe ecpop ao,  oope  cooa-  c
 oca  opeo aao [5.2.1] o a e poco opaac
 o oaao. o ec ce coepoe aaoa ao poco
cooa    4EH    oca  ao *.*,  a ae oop
oc, co  4FH.  Koa oe e e ao,  o  e
caoe a epeoca,  a AL e coepa 18.  Ka pa,  oa
e oape oepeo e- e,   DTA e acaa opa o
ae,  a o eo  (oeae cooae DTA  x,
cox ecpop aa).  Ce pep o  oe  
cex ox ao oaaoa.

;--- ceee ax
PATH     DB   'A:MAMMALS\*.*',0
DTAH     DB   256 DUP(?)

;---caoa DTA
            LEA  DX,DTA        ;DS:DX aa a DTA
            MOV  AH,1AH        ; cao DTA
            INT  21H           ;caaae DTA
;---e ep a
            MOV  AH,4EH        ;oep 
            LEA  DX,PATH       ;aae a cpo 
            MOV  CX,0          ;oo opae ap
            INT  21H           ;e *.*
            JC   ERROR         ;opaoa oo
;---o  aa
NEXT_LINE:  LEA  BX,DTA        ;BX aae a DTA
            ADD  BX,30         ;ceee  e aa
NEXT_CHAR:  MOV  DL,[BX]       ;oae co  e
            CMP  DL,0          ;poepa a oe cpo
            JE   END_STR       ;xo, ec oe
            MOV  AH,2          ;ae, o co
            INT  21H           ;
            INC  BX            ;eae aae
            JMP  SHORT NEXT_CHAR  ;ce co
;---opa ape/epeo cpo  oe cpo
END_STR:    MOV  AH,2          ; oa coa
            MOV  DL,13         ;o opaa ape
            INT  21H           ;o
            MOV  DL,10         ;o epeoa cpo
            INT  21H           ;o
;---e ce a

                                     - 9 -
            LEA  DX,PATH       ;aae a cpo 
            MOV  AH,4FH        ;oep 
            INT  21H           ;e ce a
            JC   FINISHED      ;ec e, o xo
            JMP  SHORT NEXT_LINE  ;ae o  aa
FINISHED:

              oee/caoa eeo aaoa.

   Te aao o aao,   oopo DOS e a,   oopoo
e aa .  Ec e caoeo pooo, o e aao -
ec ope aaoo.

   Cpe poe.

    3BH  pepa  21H  caaae  e aao.  DS:DX
o aa a   aao  caapo  e    a  cpoa
oa  aepac ao ASCII 0.  Hapep,  B:BIRDS\- PARROTS\POLLY
eae POLLY e aaoo. B: oe  oeo, ec o e
aoe o oa [5.3.1]. o cea e opeo aao
aoe A: ae A:\. B pepe e aaoo caaaec
POLLY:

;--- ceee ax
PATH     DB   'B:BIRDS\PARROTS\POLLY',0

;---eae POLLY e aaoo
   MOV  AH,3BH        ;oep 
   LEA  DX,PATH       ;DS:DX o aa a 
   INT  21H           ;caaae e aao

   o opee  ao aao ec e ao coo- a
 47H pepa 21H.  DS:SI o aa a  oac  ax
paepo  64  aa,    oop  e aca .  B DL aaec
aoe, pe 0 = "o oa", 1 = A, 2 = B  .. p opae
  opaae  cpo  e  e  aoe.  Ec    aa
ecec aoe, o  AL opa- aec o o 15. Cpoa
aaec c e epoo oaa- oa eo, a e c opao oco
ep.  a ASCII 0 cape o oe cpo. B ao pepe 
eeo aaoa pcaaec epeeo "CURRENT_DIR":

;--- ceee ax
CURRENT_DIR   DB   64 DUP(?)

;---o e aao
   MOV  AH,47H         ;oep 
   LEA  SI,CURRENT_DIR ;aae a oac ax
   MOV  DL,1           ;aoe A
   INT  21H            ;oeae cpo o apec DS:SI

    oee/caoa pee   a oceeo oca  a

   Ec oca  o  ,  o  a  22-23  32-aoo  eea
aaoa  coepa  pe  oceeo  oca   a.  a 24-25 -
coepa a. aee o ceee:

Bpe:   11-15    ac (0-23)
              5-10     (0-59)
               0-4    ce (0-29 c 2-ce epao)

                                     - 10 -

aa:     9-15    o (0-119, ceee c 1980 oa)
               5-8    ec (1-12)
               0-4    co (1-31)
                  := 1980 + _ div 512
                  := (_ mod 512) div 32
                  := _ mod 32
                  = ( - 1980) * 512 +  * 32 + 
                  =  * 2048 +  * 32 +  / 2

   Cpe poe.

   Meo oca    a  c  cooae  paeo oa aa
ooe o a oceeo oca  a,  o e pe. Koa
FCB opaec e 0FH pepa 21H, o aoec xaoe
oe a  epeeo opae.  o oe  pacooeo    FCB  co
ceee 14H.
   C po  copo,  oc    a  c  oo  ecpopa  aa
ooe  a  o,  a    cao  a   pe oceeo
oca  a.   57H pepa 21H oe ce oepa-  .
 cao pee  a oece oep aa  BX,   0  AL. 
oe a  pee ao oec  AL 1.  B oox  cax  aa
coepc  DX,  a pe  CX.  aee o coa- ae c e,  o
ocao  ae.  B execo pooce o MS  DOS  epaec,
o ae a opa axoc  CH  DH,   aoopo. Ha cao
ee  o  e  a.  p  ooe  o  caaaec   a
epeoca, a  AX opaaec 1, ec  AL aao epaoe co 
6,  ec oxo ecpop aa. B cee pepe opeeec ac,
 oop  oce oc  a:

;--- ceee ax
PATH   DB   'B:NEWDATA.BAK',0
;---opae a
   LEA  DX,PATH         ;aae a cpo 
   MOV  AH,3DH          ; op aa
   MOV  AL,0            ;opae  e
   INT  21H             ;opae a
   JC   OPEN_ERROR      ;epexo a opao o
;---oae a  pe oca  a
   MOV  BX,AX           ;oeae oep aa  BX
   MOV  AL,0            ;o  e pee
   MOV  AH,57H          ;oep 
   INT  21H             ;oae pe oca
   JC   TIME_ERROR      ;epexo a opao oo
;---cae , oocec  aca,  aao CH
   MOV  CL,3            ;oo c
   SHR  CH,CL           ;eep CH coep ac oca

             Cpae  aee o ac a.

   DOS coe   ec  pax  apo  ao,  oope  a
ao a opeee cac.  a oe e ecoo   x
apo  oopeeo  (o  e  ce).  Ap  caaac 12-
ao  32-aoo  eea  aaoa.  Mae  ec  o   e
aee, a ocae o  pa .  ae:

   ec  5 = 1,   o a  ee co pee ocee
                     apxa
            4 = 1,   o a ec oaaoo

                                     - 11 -
            3 = 1,   o o ee ec e ao, a eo
                     oa
            2 = 1,   o a ec "cce"
            1 = 1,   o a cpa p oce o aao
            0 = 1,   o a oe oo  e

 5 o apx , coe popaa BACKUP  RESTORE
DOS. o  cpacaec  0 oce apxa  caaaec,
oa c ao coa paoa. p cee apxa eee-
e a o  oape  pooppoa.

   Cpe poe.

    43H  pepa  21H  oe  a  axo,  a   e
ap aa,  o oo  ec  a    op  c  oo  eoa
ecpopa ao, a e c oo eoa paeo oa aa. He
aaoo   FCB.  a apo oe  caoe  p
coa  aa [5.3.2],  co pacpe pa o aa.
Ho ec B oceoaeo opoee FCB, ee cao apo 
ae apoee a, o  eo ocac epoaae ap. Xo,
oeo,  B oee e-  ap a- oxo e, o
aoo  poe  c- ooa ,  co eo ecpopa
ao.
   o cooa  43H,  oece 1  AL, o pc- o
a a apo,  coepac  CX (a cao ee  CL, oco
CH pae 0).  Moo aoopo oec  AL 0, o  CX  opae
e a apo aa. B oox cax DS:DX o aa a
cpo,  a     a.  Koe cpo oeaec ao ASCII 0
(oop e xo  co 63-x coo).  B pepe  cac  "hidden"
(cpa) pcaaec a OVERDUE:

;--- ceee ax
PATH   DB   'A:ACCOUNTS',0

;---ae pa cpaoo aa
   MOV  AH,43H          ;oep 
   MOV  AL,0            ;ae a apo
   LEA  DX,PATH         ;DS:DX aa a 
   INT  21H             ;a apo  CX
   JC   ERROR_ROUTINE   ;opaoa oo
   OR   CL,10B          ;ae  1
   MOV  AH,43H          ;oep 
   MOV  AL,1            ;aee a apo
   INT  21H             ;eep a ca cpa

a epeoca caaaec p ooe o. B o cae 
AX opaaec 2 - ec a e ae,  3 - ec e ae   5 -
p px oax (e oca).

                   ee/eee e oa.

   Mea oa  ce - o ee aaoa, e ce- a
ap.  Mea aae epe 11 ao  eea,  oo-  cec  
e    pacpe  aa.  a  apo  o  cee 11 coep
aee 8 ( 3  =  1).  o  pee    a  aoc  o
opao.  O    coc  oo  apa  ec o,  o a
ee e oc o oae DIR.
   Mea oe aa  o  aaoe.  Oa ec epeopo
cex ao apo,  oa e e aeo aee 8. o cepe

                                     - 12 -
e  ao poco oec E5  ep a cooeceo eea
- ca a  apo  oo  e  e.  o  e  e  ao
aca  oe  11 coo (ocao ao ao poea).  o
pco e oa c, oop e e ee, ao a coe eco
  aaoe    aca  a e  cooec ap,  eo
oe e peec.

   H poe.

   B epeeo  pepe  peoaaec,  o  B  coa  ep
ax  paepo 3584 a,   xpae cex ce ceopo aa- oa
ce eoc 360K.  ep aaec  DIR_AREA.  B  epo  pepe
ea oa ec  oc,  ,  ec oa e aea, o oc
cooee o ee occ.   oca oac epa    ceopo
ooc  ceee ax;  e oec a  aa,  a ae
ocoo ee.

;--- ceee ax
VOL_STRING   DB    'The volume label is $'
NO_LABEL     DB    'There is no volume label $'
DIR_AREA     DB    3584 DUP(?)

;---ae 7 ceopo aaoa
         MOV  AX,SEG DIR_AREA         ;cee epa
         MOV  ES,AX                   ;
         MOV  BX,OFFSET DIR_AREA      ;ceee epa
         MOV  DL,0                    ;oep aoe
         MOV  DH,0                    ;oep oo
         MOV  CH,0                    ;oep opo
         MOV  CL,6                    ;capo ceop
         MOV  AL,7                    ;co ceopo aaoa
         MOV  AH,2                    ;oep  e
         INT  13H                     ;ae aao  a
;---e e oa, cpaa a apo c 8
         MOV  CX,112                  ;co eeo
         ADD  BX,11                   ;ceee  apo
TRY_AGAIN:   MOV  AL,[BX]             ;epe 1- ee
         CMP  AL,8                    ;o ea oa?
         JE   GOT_IT                  ;ec a, o xo
         ADD  BX,32                   ;ae a ce. ee
         LOOP TRY_AGAIN               ;
;---o cooee o occ e oa
         MOV  AH,9                    ; oa cpo
         LEA  DX,NO_LABEL             ;aae a cpo
         INT  21H                     ;o ee
         JMP  SHORT CONTINUE          ;a oe
;---o cpo, a e oa
GOT_IT:  MOV  AH,9                    ; oa cpo
         LEA  DX,VOL_STRING           ;aae a cpo
         INT  21H                     ;o ee
         SUB  BX,11                   ;aae a e
         MOV  CX,11                   ;e 11 coo
         MOV  AH,2                    ; oa coo
NEXT_CHAR:   MOV  DL,[BX]             ;co  DL
         INT  21H                     ;o co
         INC  BX                      ;epexo  cee
         LOOP NEXT_CHAR               ;
CONTINUE:


                                     - 13 -
o cepe e oece ce o  GOT_IT:

GOT_IT:   MOV  AL,0E5H     ;o oe coo eea
          SUB  BX,11       ;aae a aao eea
          MOV  [BX],AL     ;ee ep a

o e e oa,  ao eco  oo  cooa    GOT_IT
ce  o.  peoaaec,  o  B ooo e-o 11-a
cpo NEW_LABEL.

GOT_IT:   LEA  SI,NEW_LABEL  ;SI oe aa a cpo
          SUB  BX,11         ;BX aae a aao e
          MOV  DI,BX         ;oeae aae  DI
          MOV  CX,11         ;epeca 11 coo
REP       MOVSB              ;epecae cpo

   o coa e oo cooa o e  ca  o,  o  ao
ae  cao  a  apo  pa 8 (B oee poco oa
ASCII 8  cpoe,  coepae  o  e,  a  a  a  apo
eocpeceo cee a cao eo).
   , aoe,  o cex cax ee aaoa, eoxoo aca
aao opao a c. O p o epoce.

;---ac eex ceopo aa a c
   MOV  AX,SEG DIR_AREA        ;pecp a  p e
   MOV  ES,AX                  ;
   MOV  BX,OFFSET DIR_AREA     ;
   MOV  DL,0                   ;
   MOV  DH,0                   ;
   MOV  CH,0                   ;
   MOV  CL,6                   ;
   MOV  AL,7                   ;
   MOV  AH,3                   ;oep  ac ceopo
   INT  13H                    ;


               ee/ac opeeex ceopo.

   ee  ac opeeex ceopo ca  ocoo  c-  o-
ec  p  oce    aaoa  ca   eo ae paee- 
ao,  ceopa  oopx cea pacooe  oo  o e ece.
B o pe a ee ceopo ocaoo eoo, ac acooo
ceopa pee  o  o    aeo  poe-  pe  epe  ep
cooae.  Oa  oe  cea  aao  a paee
ao eae, o aeo pape-  cex ax a ce.
   Ka DOS  a    BIOS  peoca      e   ac
opeeex ceopo. Oao o aa ceopa o-pao.  IBM
PC, XT  PCjr poepa BIOS pee opa o oepe copo (0 
1),  oepe opo (0-39)  oepe ceopa  (1-8).  -a  opae
acaoo   oepa   ceopa   paoo  8  o  eo  paec
ecoee  x a.  Oao  AT oep ceopa oe  ec
o 8,  9  15,  a co opoe oe ec o 39  79.  
DOS aa ceop o oe-  po,  oop  aaec  oec
oepo   ceopa.   Haa   c   apoo   ooa   ca,  ceopa
pcaac oceoaeo opacae  oepa.  o  eo  oe
 cooa  co poooo paepa  a.
   Oce ocex ceopo aaec co copo 0 opo 0  ceopa
1    pooaec  a  copoe 1 c opo 0,  oce eo epexo a
copo 0 opo 1  ..  (Ha ox  cpoax  cax  caaa

                                     - 14 -
poxoc  ec  e  p.)  B  acoc  o  oo  a 
opapoa c,  p epexoe a ce opo oec  oep
ceopa  eaec  a  opeee e.   ce eoc
360K aa opoa (c eo oex  copo)  oae    oeco
oep  18.  Oao  ce  eoo  coc  e,  o oce
aaec c .  Ta opao ep ceop a opoe 3 copo  2
oe  e  oep  pa  3*18  opoe 0-2 c 9  copo 0
opo 3 c ea,  aaa a ep ceop opo 3 copo
1.  a  ca  paa  64.  oec  oep ceopa a 1 ee oo
ca. Ha pc. 5-4 cpaaec eo aa ceopa DOS  BIOS.

   Cpe poe.

   BIOS coe  2 pepa 13H  e ceopo  -
  3  pepa  13H  ac ceopo.  B oox cax DL oe
coepa oep aoe o 0 o 3,  e 0 = A,  1 = B  ..,  DH  -
oep oo (copo), 0-1. CH oe coepa oep opo o 0 o
39, a CL - oep ceopa o 0 o 8. AL coep co ceopo, oopoe
eoxoo ca.  ocaec cpa a e oee oc ceopo,
o oee e ocaoo  oca ee.  ES:BX o aa
a aao epa  a,  a  oeac ae  oa o
 pac.  p opae AL e coepa co  poax  
acax  ceopo.  Ec  oepa  cea,  o a epeoca e
pae .  Ec o pae  1,  o  AH  e  coepa  a  caca
coo oepa.

;--- ceee ax
BUFFER     DB   4000 DUP(?)  ;coae ep

;---ae ceopa
   MOV  AX,SEG BUFFER       ;ES:BX o aa a ep
   MOV  ES,AX               ;
   MOV  BX,OFFSET BUFFER    ;
   MOV  DL,0                ;oep aoe
   MOV  DH,0                ;oep oo
   MOV  CH,0                ;oep opo
   MOV  CL,1                ;oep ceopa
   MOV  AL,1                ;co ceopo  e
   MOV  AH,2                ;oep  e
   INT  13H                 ;

   pepa DOS 25H  26H a  aca  acoe  ceo-  pa
ca,  cooeceo.  Hao  oec  oec oep capo- oo
ceopa  DX,  a DS:BX o aa a  ep.  CX  coep  co
ceopo  e  ac, a AL - oep aoe, e 0 = A, 1 =
B  ..  poep op ce pecp, poe ceex. p opae
pecp  ao  ocaec  a  cee,  oca ce epoe.  He
ae o o aee  co  cea  cpa  oce  opaa  (
pepe o aee aaec  CX).

;--- ceee ax
BUFFER      DB  DUP 5000(?)   ;coae ep

;---ae ceopa
   PUSH DS                 ;coxpae pecp
   MOV  AX,SEG BUFFER      ;DS:BX o aa a ep
   MOV  DS,AX              ;
   MOV  BX,OFFSET BUFFER   ;
   MOV  DX,63              ;oec oep ceopa

                                     - 15 -
   MOV  CX,9               ;ae c opo
   MOV  AL,0               ;aoe A
   INT  25H                ; e ceopo
   POP  CX                 ;aae co cea a
   POP  DS                 ;occaaae pecp
   JNC  NO_ERROR           ;ec e o, o a pooee
   CMP  AH,3               ;poepa oox oo
    .
    .
NO_ERROR:                  ;pooee popa

   Ec p  opae  a  epeoca pae 1,  o pooa oa  
o cae AH  AL coepa a oex aa caca  o.  Ec
AH = 4,  o aa ceop e ae,  a ec AH = 2, o c eepo
oopapoa.  Ec AH =  3,  o  a  oa  ac  a  ce,
ae o ac. Bce ocae ae AH oo- p o aapao
oe.
[ | | ]










helloworld.ru © 2001-2018
Rambler's Top100 TopList