home *** CD-ROM | disk | FTP | other *** search
-
- ;.286 for use with the 286 lib
- .radix 16
- CSEG SEGMENT PARA PUBLIC 'CODE'
- CGROUP GROUP CSEG
- DGROUP GROUP DSEG,IDATA,SSEG,ZZMSEG
- EGROUP GROUP ESEG
- PUBLIC INKEY
- ASSUME CS:CGROUP,DS:DGROUP,ES:EGROUP,SS:DGROUP
- ;This is the inkey routine to replace the function key
- ;strobe. The Calling procedure is
- ;***************************************
- ;CALL INKEY USING CHARECTER
- ;***************************************
- ;SEE EXAMPLE IN LIB0001A.COB
- ;
- ;
-
- INKEY PROC FAR ;this is a far proc
- PUSH BP ;lets save the base ptr
- MOV BP,SP ;and give it the new xfer area
- mov ax,[bp+06] ;get the address of the xfer area
- push ax ;save it
- MOV AH,0 ;tell the bios
- INT 16H ;that we want to poll the keyboard
- exit: pop bx ;place the address of the var
- cmp al,0 ;in the bx. See if the al is 0
- je rotate ;yes it is so move it around
- jmp exit2 ;clean up the stack area
- rotate: mov al,ah ;good data so set up for exit
- mov ah,0 ;
- mov [bx],ax ;place the data back in the right
- exit2: pop bp ;address
- RET 2 ;clean up the stack and return
- INKEY ENDP ; 2 AS WE PASSED A CHAR
-
-
- CSEG ENDS
-
- OVERLAY_AREA SEGMENT PARA PUBLIC 'CODE'
- OVERLAY_AREA ENDS
- DSEG SEGMENT PARA PUBLIC 'DATA'
- DSEG ENDS
- IDATA SEGMENT COMMON PARA 'DATA'
- IDATA ENDS
- SSEG SEGMENT STACK PARA 'STACK'
- SSEG ENDS
- ZZMSEG SEGMENT MEMORY word 'MEMORY'
- ZZMSEG ENDS
- ESEG SEGMENT COMMON BYTE 'CCODE'
- ESEG ENDS
- END
-
-
-
-