-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshow2.asm
More file actions
50 lines (42 loc) · 1.25 KB
/
show2.asm
File metadata and controls
50 lines (42 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
;-----------------------------------------------------------------------
; Ecrire un message à l'écran
;-----------------------------------------------------------------------
; titre
TITLE DISPLAY - programme prototype
.286
;-----------------------------------------------------------------------STACK segment
SSEG SEGMENT STACK
DB 32 DUP("STACK---")
SSEG ENDS
;-----------------------------------------------------------------------DATA segment
DSEG SEGMENT
MESSAGE DB "Bonjour, voici un message !",0DH,0AH
L_MESSAGE EQU $-MESSAGE
DSEG ENDS
;-----------------------------------------------------------------------CODE segment
CSEG SEGMENT 'CODE'
ASSUME CS:CSEG, SS:SSEG, DS:DSEG
;-----------------------------------------------------------------------
;procedure MAIN
MAIN PROC FAR
;sauver l'adresse de retour
PUSH DS
PUSH 0
;registre
MOV AX,DSEG
MOV DS,AX
;message
MOV BX,0001H
LEA DX,MESSAGE
MOV CX,L_MESSAGE
MOV AH,40H
INT 21H
;retour
RET
;fin de la procédure MAIN
MAIN ENDP
;fin du code du segment
CSEG ENDS
;fin du programme
END MAIN
;-----------------------------------------------------------------------fin de programme