
;Demo de Windoze 98 Kaid/ACiX

.model tiny
.code
.386
org 100h
start:

;******************* TransfŠre le segment de la m‚moire texte ***************
        mov ax,0B800h
        mov es,ax

;*********************************** Efface l'‚cran ************************
        mov ax,3
        int 10h

;*************************** Met l'‚cran en bleu ***************************
        mov al,' '
        mov ah,31
        mov cx,4000
        xor di,di
        Rep Stosw

;*********************************** Emet en beep **************************
        mov ah,2
        mov dl,7
        int 21h
        

;*************************** Affiche la 1ø phrase  *************************
        mov x,25
        mov y,6
        mov couleur,31
        lea si,ph0
        call aff_str
        
;************************ Affiche les phrases 2/3/4/5  **********************
        mov x,15
        mov y,9
        lea si,ph1
        mov cx,4
Aff:
        call aff_str
        inc si
        inc y
        loop Aff


;*************************** Affiche la 6ø phrase  *************************
        mov x,7
        mov y,15
        lea si,ph5
        call aff_str

;*************************** Affiche la 7ø phrase  *************************
        mov y,16
        lea si,ph6
        call aff_str


;********************* Attend la pression sur une touche *******************
        xor ax,ax
        int 16h

;*********************************** Efface l'‚cran ************************
        mov ax,3
        int 10h

;*************************************** Quitte ****************************
        int 20h

Aff_Str:
        mov ax,80               ;On calcule l'offset du caractŠre
        mul y                   ;pr avoir AX=2(80*Y+X)
        add ax,x
        shl ax,1                ;Equivaut … AX*2
        mov di,ax
        mov ah,couleur          ;On met la couleur ds AH

Aff_Chr:
        mov al,byte ptr ds:[si]
        cmp al,'$'
        je sortie

        Stosw
        inc si
        jmp Aff_Chr
sortie:
        ret

x       dw ?
y       dw ?
couleur db ?
ph0     db 'Windoze 98: Erreur Interne$'
ph1     db '0000:31 FC 85 F8 45 12 7C BA DC 8C D9 88 77$'
ph2     db '0000:95 AB 41 B1 9C AA F4 55 7C 8A 9A 7B BB$'
ph3     db '0000:NT DB AA F1 DD CD C1 14 54 81 71 85 7A$'
ph4     db '0000:98 C1 22 9F CF 36 48 C5 14 74 D1 C5 5D$'
ph5     db 'Le systŠme est devenu instable, ce programme va donc se terminer.$'
ph6     db 'Appuyez sur une touche pour quitter.$'

end start


