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

Programming for arithmetic and string operations, Advanced aspects of assem...

Advanced aspects of assembly language programming in this section. A number of these aspects give assembly an edge over high level language programming as far as efficiency is conc

Concept of temporal parallelism, Concept of Temporal Parallelism In ord...

Concept of Temporal Parallelism In order to describe what is meant by parallelism inherent in the answer of a problem, let us talk about an example of submission of electricity

Logical representations in artificial intelligence, Logical Representations...

Logical Representations: If every human being spoke the same kind of language, there would be several less misunderstanding in the world. The problem with software engineering

Difference between the real mode and the protected mode, Problem (a) ...

Problem (a) Explain the difference between the real mode and the protected mode in the 80x86 family of processors. (b) The 32-bit physical address 047C:0048 is to be conv

What is Video Card Interfaces, Q. What is Video Card Interfaces? A video i...

Q. What is Video Card Interfaces? A video interface is the link of video system to rest of the PC. To improve video performance there is required to be an intimate connection betw

Versions of small computer systems interface, Q. Versions of small computer...

Q. Versions of small computer systems interface? SCSI-1 calls for a cable with 8 data wires plus one for parity. SCSI-2 allows use of multiple cables to support 16- or

State the protected mode interrupt, State the Protected mode interrupt ...

State the Protected mode interrupt In protected mode, interrupts have exactly same assignments just like in real mode though the interrupt vector table is different.  Instead

Display data in a repeater control, Which template must you provide, in ord...

Which template must you provide, in order to display data in a Repeater control? ItemTemplate.To display data in the ItemTemplate, declare one or more Web server controls and s

Representation scheme in ai, Representation scheme in AI: • It's fairl...

Representation scheme in AI: • It's fairly trouble-free to represent knowledge in this way. It allows us to be expressive enough to represent largely knowledge, while being co

Example of unification, Example of Unification: Let now here, assume i...

Example of Unification: Let now here, assume instead that we had these two sentences as:  knows(john,X) → hates(john, X)  knows(jack, mary)  Thus here the predicate n

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