8086 ALP: Display STRING in the CENTRE of the screen

PRNT MACRO MSG
    MOV AH,09h
    LEA DX,MSG
    INT 21H
ENDM

DATA SEGMENT
    MSG1 DB "ABC PQR XYZ$"
DATA ENDS

CODE SEGMENT 
    ASSUME CS:CODE,DS:DATA
    START: 
    MOV AX,DATA
    MOV DS,AX
    MOV AX,0600H
    MOV BH,71H
    MOV CX,0000H ;UPPER LEFT ROW,COLUMN
    MOV DX,0184H ;LOWER RIGHT ROW,COLUMN
    INT 10H
    MOV AH,02H
    MOV BH,00H
    MOV DH,0CH
    MOV DL,23H
    INT 10H
    PRNT MSG1
    MOV AH,4CH
    INT 21H
CODE ENDS
    END START

OUTPUT:

No comments:

Post a Comment