Write a subroutine in c for toggling the cursor, Computer Engineering

Assignment Help:

Write a subroutine in C for toggling the cursor using old directives.

;

; use small memory model for C - near code segment

_DATA SEGMENT WORD   'DATA'

  CURVAL EQU   [BP+4]   ; parameters

_DATA   ENDS

_TEXT                     SEGMENT        BYTE              PUBLIC         'CODE'

DGROUP                GROUP _DATA

                                 ASSUME CS:_TEXT,  DS:DGROUP,  SS:DGROUP

                                 PUBLIC _CURSW

_CURSW PROC    NEAR

                                 PUSH    BP    ; BP register of caller is saved

                                 MOV    BP, SP    ; BP is pointing to stack now

                                 MOV   AX, CURVAL

                                 CMP   AX, 0H

                                 JZ    CUROFF; Execute code for cursor off

                                 CMP   AX, 01H  

                                 JZ    CURON; Execute code for cursor on

                                 JMP    OVER    ; Error in parameter, do nothing 

CUROFF:      ; write code for curoff

:

 :

                                  JMP   OVER

CURON:      ; write code for curon

:

 :

OVER:                        POP BP

                                    RET

_CURSW                    ENDP

_TEXT                        ENDS

  END

Why the parameter is found in [BP+4]? Please look into the following stack for answer.

1448_Write a subroutine in C for toggling the cursor.png


Related Discussions:- Write a subroutine in c for toggling the cursor

Running time - metrics for performance evaluation, Running Time - Metrics f...

Running Time - Metrics for performance evaluation: Running time is amount of time consumed in execution of an algorithm for a provided input on N-processor based parallel comp

State the optimal route of node, State the optimal route of node Consid...

State the optimal route of node Consider the node i which has path length K+1, with the directly preceding node on the path being j. The distance to node i is w(j, i) plus the

Circles in the visualization, To sktech the circles in the visualization, y...

To sktech the circles in the visualization, you need to use the paramteric equation of a circle (x = r cos (Θ), y = r sin(Θ). A circle can be shown as a polygon where the points of

Which process is used for page reference, Locality of reference implies tha...

Locality of reference implies that the page reference being made by a process is Ans. Locality of reference means that the page reference being made through a process is proba

Persuasive communication , 1)   Discuss various types of persuasive communi...

1)   Discuss various types of persuasive communication you might be needed to write or present in your professional and personal life. 2)    Describe two ways to organize a resume

Where arq is transmitted, ARQ is transmitted in the event of: (A)  Los...

ARQ is transmitted in the event of: (A)  Loss of signal                          (B) Error in received data (C)  Improve reliability                  (D) During time out

What is a snooping cache, DNS cache snooping is not a term the author just ...

DNS cache snooping is not a term the author just made up, it is called and discussed by some notable DNS execution developers, and a few interested DNS administrators have prob

Java, mine sweeper algorithm.

mine sweeper algorithm.

How can a shift register be used as a counter, What is a shift register? Ca...

What is a shift register? Can a shift register be used as a counter? If yes, explain how?     Ans: Shift Register: A register wherein data gets shifted towards left or right

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