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

What is java awt, An AWT stands for Abstract Window Toolkit. AWT handles pr...

An AWT stands for Abstract Window Toolkit. AWT handles programmers to develop Java applications with GUI components, like windows, and buttons. The Java Virtual Machine (JVM) is re

Give explanation of common channel signalling, Explain Common channel signa...

Explain Common channel signalling. Common channel signalling: Signaling systems connection the variety of transmission systems, switching systems and subscriber equipments, i

What are base tables of an aggregate object, What are base tables of an agg...

What are base tables of an aggregate object? The tables making up an aggregate object (primary and secondary) are known as aggregate object.

Determine about the the difference engine - pascaline, THE DIFFERENCE ENGIN...

THE DIFFERENCE ENGINE - Pascaline The difference enigne was based on the mathematical principle of finite differences and was used to solve calculations based on large numbers

Define various classes of interrupts, Q. Define Various classes of Interrup...

Q. Define Various classes of Interrupts? Figure below gives list of some common interrupts and events which causes occurrence of those interrupts. Figure: Various clas

#title.sequential circuit, design modulo 12 up synchronous counter using t ...

design modulo 12 up synchronous counter using t flip flop

Reprographic technologies, Reprography: Reprography, as a term, has ga...

Reprography: Reprography, as a term, has gained international recognition in 1963. It includes "photocopying , microcopying, duplicating and in-plant printing and is character

Interactive computer graphics.., graphical adapters and input methods in co...

graphical adapters and input methods in computer graphics

Will case infer priority register if yes how give an example, Will case inf...

Will case infer priority register if yes how give an example? Yes case can infer priority register depending on coding style reg r; // Priority encoded mux, always @

What is called checking CRC in cyclic redundancy, In cyclic redundancy chec...

In cyclic redundancy checking CRC is the? Checking CRC, in cyclic redundancy is the remainder. Normal 0 false false false EN-IN X-NONE X-NONE

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