Ensamblador - Mostrar array de letras, en pantalla TASM

 
Vista:
sin imagen de perfil
Val: 2
Ha disminuido su posición en 9 puestos en Ensamblador (en relación al último mes)
Gráfica de Ensamblador

Mostrar array de letras, en pantalla TASM

Publicado por Estuardo (2 intervenciones) el 23/11/2017 00:35:42
Buenas tardes, estoy intentando mostrar en pantalla un array de letras con GUI Turbo Asembler TASM, el problema que no logro mostrar las letras como tal, sino que muestra cuadros en pantalla. Si alguien puede ayudarme a mostrar correctamente las letras en pantalla y moverme por ese array muy agradecido-

Donde no se como mostrar las letras es en :

;print symbol
mov ah, 02h
mov dl, 0feh
int 21h

El código es el siguiente.

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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
.MODEL small
 
.STACK  100h ; reserves 256 bytes of uninitialized storage
 
.DATA
startX equ 35
startY equ 8
y db ?
x db ?
t1 db ?
t2 db ?
t3 db ?
 
zSprite db'M','M','L','E','E','N','A','E','V','E',
        db'E','R','H','O','N','G','O','S','T','R',
        db'X','X','O','T','I','R','R','A','C','A',
        db'I','S','A','P','P','O','T','A','P','S',
        db'C','C','M','L','A','A','I','Z','O','T',
        db'O','A','A','U','A','N','U','L','P','U',
        db'S','O','M','B','R','E','R','O','M','P',
        db'C','N','E','A','R','R','I','I','O','O',
        db'W','O','J','E','N','O','C','P','Z','E',
        db'A','A','Z','A','A','L','N','Y','T','D'
 
 
.386 ;enabled assembly of non privileged 80386 instructions
.CODE
start:
;set DS to point to the data segment
mov ax,@data
mov ds,ax
 
mov di,offset zSprite
 
mov y,0
 
l5:
cmp y,10
jl  l0
jmp l1
 
l0:
mov x,0
 
l4:
cmp x,10
jl  l2
jmp l3
 
l2:
mov al,startX
add al,x
mov t1,al
 
mov al,startY
add al,y
mov t2,al
 
; set cursor position at (x,y)
mov ah,02h ;set cursor position service
mov bh,00h ;page number
mov dh,t2 ;row
mov dl,t1 ;column
int 10h ;bios interrupt
 
mov ax,0 ;reset ax
mov al,y ;ax = y
mov bx,10
mul bx   ;ax = ax * 10
mov bx,0 ;reset bx
mov bl,x ;bx = x
add ax,bx ;ax = ax + x
mov bx,ax
 
; set color
mov ah,09h ;service
mov al,0feh ;character
mov bh,00h ;page number
mov bl,[bx+di] ;color
mov cx,01h ;number of times to print character
int 10h
 
;print symbol
mov ah, 02h
mov dl, 0feh
int 21h
 
inc x
jmp l4
 
l3:
inc y
jmp l5
 
l1:
nop
 
exit:
;DOS: terminate the program
mov ah,4ch ; mov ax, 4c00h
mov al,0h
int 21h
 
delay PROC
pop bx
 
mov ax,1000d
mov dx,ax
 
delay1:
mov cx,ax
 
delay2:
dec cx
jnz delay2
dec dx
jnz delay1
 
push bx
 
ret
delay ENDP
 
END start
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder