PROGRAMAS EXHIBICION

Anuncio
TITLE Exhibiciòn de video
.model small
.stack 1000h
VIDSEG SEGMENT AT 0BA00H
VIDAREA DB 1000H DUP(?)
VIDSEG ENDS
.data
PROMPT DB "PRESIOna"
.CODE
BEGIN PROC FAR
MOV AX,@DATA
MOV DS,AX
MOV AX,VIDSEG
MOV ES,AX
ASSUME ES:VIDSEG
MOV AH,0FH
INT 10H
PUSH AX
PUSH BX
MOV AH,00H
MOV AL,03
INT 10H
MOV AH,05H
MOV AL,02H
INT 10H
CALL C10PROC
CALL D10PROMPT
CALL E10INPT
MOV AH,05H
POP BX
MOV AL,BH
INT 10H
POP AX
MOV AH,00H
INT 10H
MOV AX,4C00H
INT 21H
BEGIN ENDP
C10PROC PROC NEAR
MOV AL,41H
MOV AH,01H
MOV DI,660
C30:
MOV CX,60
C40:
STOSW
LOOP C40
INC AH
INC AL
ADD DI,40
CMP AL,51H
JNE C30
RET
C10PROC ENDP
D10PROMPT PROC NEAR
MOV CX,16
LEA SI,PROMPT
MOV DI,3840
MOV AH,03H
D20:
LODSB
STOSW
LOOP D20
RET
D10PROMPT ENDP
E10INPT PROC NEAR
MOV AH,10H
INT 16H
RET
E10INPT ENDP
END
TITLE J USTIFICADO DE NOMBRES DERECHA
.MODEL SMALL
.STACK 64
.DATA
NAMEPAR LABEL BYTE
MAXNLEN DB 31
ACTNLEN DB ?
NAMEFLD DB 31 DUP(' ')
PROMPT DB 'NAME?', '$'
NAMEDSP DB 31 DUP(' '), 13, 10, '$'
ROW DB 00
.CODE
BEGIN PROC FAR
MOV AX,@DATA
MOV DS,AX
MOV ES,AX
MOV AX,0600H
MOV BH,17H
MOV CX,0000
MOV DX,183FH
INT 10H
CALL Q20CURS
A10LOOP:
CALL B10INPT
TEST ACTNLEN,0FFH
JZ A90
CALL D10SCAS
CMP AL,'*'
JE A10LOOP
CALL E10RGHT
CALL F10CLNM
JMP A10LOOP
A90:
MOV AX,4C00H
INT 21H
BEGIN ENDP
B10INPT PROC NEAR
MOV AH,09H
LEA DX,PROMPT
INT 21H
MOV AH,0AH
LEA DX,NAMEPAR
INT 21H
RET
B10INPT ENDP
D10SCAS PROC NEAR
CLD
MOV AL,'*'
MOV CX,30
LEA DI,NAMEFLD
REPNE SCASB
JE D20
MOV AL,20H
D20:
RET
D10SCAS ENDP
E10RGHT PROC NEAR
STD
MOV CH,00
MOV CL,ACTNLEN
LEA SI,NAMEFLD
ADD SI,CX
DEC SI
LEA DI,NAMEDSP+30
;NAME
REP MOVSB
;LEFT
MOV DH,ROW
MOV DL,48
CALL Q20CURS
MOV AH,09H
LEA DX,NAMEDSP
INT 21H
CMP ROW,20
JAE E20
INC ROW
JMP E90
E20:
MOV AX,0601H
CALL Q10SCR
MOV DH,ROW
MOV DL,00
CALL Q20CURS
E90: RET
E10RGHT ENDP
F10CLNM PROC NEAR
CLD
MOV AX,2020H
MOV CX,15
LEA DI,NAMEDSP
REP STOSW
RET
F10CLNM ENDP
Q10SCR PROC NEAR
MOV BH,30
MOV CX,00
MOV DX,184FH
INT 10H
RET
Q10SCR ENDP
Q20CURS PROC NEAR
MOV AH,02H
SUB BH,BH
INT 10H
RET
Q20CURS ENDP
END
Descargar