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

How to use data validation function in vba, Data validation is a significan...

Data validation is a significant concept in VBA. Application process and a custom dialog box can be used to accurate input errors. You can assign an application process to the fram

Register-to-register architecture, Register-to-Register Architecture : In t...

Register-to-Register Architecture : In this organization, results and operands are accessed not directly from the main memory by the scalar or vector registers. The vectors which a

What are models and meta models, Model: It is a entire explanation of s...

Model: It is a entire explanation of something (i.e. system). Meta model: It shows the model elements, syntax and semantics of the notation that permits their manipulatio

Determine frequency of a dtmf phone, In a DTMF phone a dialling of 8 genera...

In a DTMF phone a dialling of 8 generates (A) 1336 Hz- 770 Hz                      (B)  1209 Hz - 1477 Hz (C)  1209 Hz- 941 Hz                     (D)  1336 Hz-852 Hz

Facsimile , FACSIMILE : This is often known as 'fax' and it represents the...

FACSIMILE : This is often known as 'fax' and it represents the interface between reprographic and computer technology. By using fax, the contents of a sheet of paper (text or illu

Explain how a critical section avoids race condition, Explain how a critica...

Explain how a critical section avoids Race condition. To prevent Race Condition, concurrent processes should be synchronized. Data consistency needs that only one process m

Show the connection between different networks, Q. Show the Connection betw...

Q. Show the Connection between different networks? The connection between different stages is made in following manner:  all outputs of 1 st crossbar switch of first stage a

Explain the term instruction cycle, Instruction Cycle The instruction c...

Instruction Cycle The instruction cycle consists of a series of steps required for the execution of an Instruction in a program. A distinctive instruction in a program is compo

Illustrate what is a centrifugal force, Q. Illustrate what is a Centrifugal...

Q. Illustrate what is a Centrifugal Force? Answer:- Centrifugal force is the force that is equivalent in magnitude but opposite in direction to the centripetal force which

What are the features of cisc processors, What are the Features of CISC Pro...

What are the Features of CISC Processors The standard features of CISC processors are listed below:  CISC chips have a large amount of dissimilar and complex instructions.

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