You are on page 1of 1

CS401 - Assignment 2 idea Sol 2018-19-

code is written by Mr. Farhad Ali

; coded by Alifarhad
; Roll No: XXXXX

[org 0x0100] ;start


jmp start

msg: db 'XXXX' ;replace X with the message

wait_for_key: ;wait for keypress


mov ah, 0
int 16h

cmp ah, 21h ;scancode for the Key of the first letter of your name (currently 21h = F)
jne wait_for_key ;jmp if not key pressed

mov ah, 0x13 ; service 13 - print string


mov al, 1 ; subservice 01 – update cursor
mov bh, 0 ; output on page 0
mov bl, 7 ; normal attrib
mov dx, 0x0000 ; row 0 column 0
mov cx, 4 ; length of string change according to your msg
push cs
pop es ; segment of string
mov bp, msg ; offset of string
int 0x10 ; call BIOS video service

mov ax, 0x4c00 ; terminate


int 0x21 ;exit :)

start:
jmp wait_for_key ;check for keys

You might also like