--- roger.asm ---
.386
;* ** Segment de code ***
code segment use16
assume cs:code, ds:data, ss:pile
;* ** Fichiers inclus ***
include moteur.txt
;* ** Programme principal ***
prog:
mov ax, data
mov ds, ax
mov ax, 0A000h
mov es, ax
xor ax, ax
mov al, 13h
int 10h
mov bx, offset chemin
mov cx, 10
mov dx, 10
mov di, 0
call dessin
xor ax, ax
int 16h
erreur:
mov ah, 4Ch
int 21h
code ends
;* ** Segment de données ***
data segment use16
defaut dw 0
compteur dw 0
chemin db "test.inc", 0
buffer db 3 DUP (?)
data ends
;* ** Segment de pile ***
pile segment stack use16
db 256 DUP (?)
pile ends
end prog
--- moteur.asm ---
;* ** Générateur de graphismes ***
dessin proc near
mov cs:[longueur], cx
push dx
mov ax, 3D00h
mov dx, bx
int 21h
;c mp ax, 02h
jc erreur
mov cs:[handle], ax
pop dx
start:
push cx
push dx
mov ah, 42h
mov al, 0
mov bx, cs:[handle]
mov cx, 0
mov dx, cs:[position]
int 21h
mov ah, 3Fh
mov al, 0
mov bx, cs:[handle]
mov cx, 3
mov dx, offset buffer
int 21h
mov bx, offset buffer
xor si, si
mov dh, [bx+si]
shr cl, 2
inc si
mov ch, [bx+si]
shr ch, 2
inc si
mov cl, [bx+si]
shr dh, 2
cmp dh, 63
jne suite_moteur
cmp ch, 63
jne suite_moteur
cmp cl, 63
jne suite_moteur
pop dx
pop cx
jmp blanc
suite_moteur:
mov ax, 1010h
mov bh, 0
mov bl, cs:[tempo]
inc cs:[tempo]
int 10h
pop dx
pop cx
mov es:[di], bl
blanc:
add cs:[position], 3
inc di
dec cx
cmp cx, 0
jne start
mov cx, cs:[longueur]
add di, 320
sub di, cs:[longueur]
dec dx
cmp dx, 0
jne start
mov ah, 3Eh
mov bx, cs:[handle]
int 21h
mov cs:[position], 74
ret
tempo db 1
longueur dw 0
handle dw 0
position dw 74
dessin endp
------
Alors, c´est quoi l´erreur ? 