Write an assembly function which hides the cursor, Computer Engineering

Assignment Help:

Q. Write an assembly function which hides the cursor?

Write an assembly function which hides the cursor. Call it from a C program.

            . PUBLIC CUROFF

            . MODEL small, C

            . CODE

CUROFF PROC

MOV                        AH, 3                 ; get the current cursor position

XOR                         BX, BX             ; empty BX register

INT                           10h                     ; use int 10hto do above  

OR                            CH, 20h             ; force to OFF condition

MOV                        AH, 01               ; set the new cursor values

INT                           10h  

RET   

CUROFF ENDP

END 

The C program to test this routine is as follows:

# include < stdio.h 

void curoff(void);

void main()

 {

printf("%s\n, "The cursor is now turning off);

curoff();

 }

You can write another procedure in assembly language program to put cursor on. This can be done by replacing OR CH, 20h instruction by AND CH, 1Fh. You can call this new function from C program to put cursor on after curoff.


Related Discussions:- Write an assembly function which hides the cursor

Hlt instruction is implemented in processor, What happens when HLT instruct...

What happens when HLT instruction is implemented in processor? Ans) The Micro Processor go into the Halt-State and the buses are tri-stated.

Stencil duplicating, Stencil Duplicating Equipment Required Stenci...

Stencil Duplicating Equipment Required Stencil Duplicator Thermal copier (optional) Electronic stencil cutter Materials Stencil COPY paper Ink Clean

Define various system, Define various system? Single job system: Only...

Define various system? Single job system: Only one program may be run at a time, and therefore only one person might be work on a machine at one time.  Multi job system:

What is downcasting in programming, Downcasting concept is the casting from...

Downcasting concept is the casting from a general to a more particular type, i.e. casting down the hierarchy in programming

Explain about iframe, Q. Explain about IFRAME? is an HTML 4.0 addition...

Q. Explain about IFRAME? is an HTML 4.0 addition to frames toolbox. Presently only MSIE supports . Unlike frames created employing and

Write a program which collects in data samples, Write a program which colle...

Write a program which collects in data samples from a port at 1 ms interval. The upper 4 bits collected data same as mastered and stored in an array in successive locations. ; R

What is looping, What is looping Loop is a control structure used to do...

What is looping Loop is a control structure used to do repetitive operation. Some programs include repeating a set of instruction either a particular number of times or until a

Make an instruction execution feasible, Q. Make an instruction execution fe...

Q. Make an instruction execution feasible? What are the functions that a control unit performs to make an instruction execution feasible? Instruction execution is achieved by e

What is microcomputers, Q. What is Microcomputers? Microcomputers have ...

Q. What is Microcomputers? Microcomputers have become a common part of everyday life. The cost ranging from a few hundred to about ten thousand dollars, today's 16- and 32-bi

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd