Assembly Language using Irvine 32 library, Must be assembly, not c/c++/java Ask
ID: 3574755 • Letter: A
Question
Assembly Language using Irvine 32 library, Must be assembly, not c/c++/java
Ask the user for a string input and then use that string to create a text based screensaver. The text should start in the upper left corner and move towards the right. When the string gets to the end of the screen, it should move back to the left side but moved down one line. This should repeat until the text hits the bottom of the screen at which point it returns to the top of the screen and repeats its previous actions(moving to the right and then down one line once reaching the end of the screen). The speed is up to you. The program continues until a key is pressed. Use macros from the Macros.inc library
Explanation / Answer
Hi there ,this may help you out .
ScreenSaver problem in Assembly Language
.MODEL SMALL
.STACK 100H
.DATA
MSG DB 09H,09H,09H,09H," http://bscssindhuni.blogspot.com/ $"
MSG1 DB 0DH,0AH,09H,09H,09H,09H," http://bscssindhuni.blogspot.com/ $"
MSG2 DB 0DH,0AH,09H,09H,09H,09H,09H,09H," http://bscssindhuni.blogspot.com/ $"
.CODE
MAIN PROC
MOV AX,@DATA ; INITIALIZE DATA SEGMENT
MOV DS,AX
MOV AH,0
MOV AL,3
INT 10H
PRINT_LOOP: ; PRINT LABEL
MOV AH,0FH ; GET VIDEO FUNCTION
INT 10H ; GET VIDEO
MOV AL,BH ; MOVE TO AL
XOR AL,1 ; COMPLEMENT OF BIT 0
MOV AH,5 ; GET NEW PAGE
INT 10H ; SELECT NEW PAGE
LEA DX, MSG ; LOAD EFECT ADRESS FOR MSG
MOV AH,9 ; FUNCTION FOR STRING
INT 21H ; DISPLAY STRING MSG
LEA DX, MSG1 ; LOAD EFECT ADRESS FOR MSG
MOV AH,9 ; FUNCTION FOR STRING
INT 21H ; DISPLAY STRING MSG
LEA DX, MSG2 ; LOAD EFECT ADRESS FOR MSG
MOV AH,9 ; FUNCTION FOR STRING
INT 21H ; DISPLAY STRING MSG
MOV AH,6 ; SCROOLL UP FUNCTION
MOV CX,0000H ; UPER LEFT CORNER
MOV DX,1A77H ; LOWER RIGHT CORNER
MOV BH,03H ; PAGE BACKGROUND COLOUR
MOV AL,0 ; SCROOLL ALL LINES
INT 10H ; CLEAR WINDOW
MOV AH,3 ; CURSOR LOCATION (ROWS ND COLOUMBS)
MOV BH,0
INT 10H ; GET CURSOR POSITION
MOV AH,2 ; MOVE CURSOR LOCATION ON SCREEN
DEC DH ; DECREMENT DH
INT 10H ; MOVE CURSOR
JMP PRINT_LOOP ; JUMP TO PRINT LABEL
MOV AH,4CH
INT 21H ; TERMINATE THE PROGRAMME
MAIN ENDP
END MAIN
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.