Last active
June 30, 2022 13:53
-
-
Save Yousif-FJ/8964969db7d31effb00fbfbe3da00c09 to your computer and use it in GitHub Desktop.
Q\Write an 8086 program to draw a horizontal line starts at the position 60,60 with the length of 100 pixel and with Magenta color
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
org 100h | |
;set display mode to 320x200 for drawing | |
MOV AX,0013H | |
INT 10H | |
;set up drawing | |
MOV CX,60 ; x coordinate | |
MOV DX,60 ; y coordinate | |
MOV AL,5 ; set colour magenta | |
MOV AH,0CH ; draw pixel | |
MOV BH,0 ;page 0 | |
;draw pixel each time | |
repeat: | |
INT 10H | |
INC CX ;move along x axis | |
CMP CX,160 ; 100(length)+60(starting position) = 160 | |
JNE repeat | |
ret |
Author
Yousif-FJ
commented
Jul 14, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment