home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
c_news
/
05
/
listings
/
f_ctrlcc.asm
< prev
next >
Wrap
Assembly Source File
|
1988-03-03
|
3KB
|
89 lines
PAGE 55,132
NAME f_ctrlcc
TITLE FOSSIL Interface Routines for Microsoft C and Turbo C
SUBTTL Copyright 1988 Marshall Presnell; All Rights Reserved
;************************************************************************;
;* *;
;* Assembled with Microsoft Macro Assembler version 5 *;
;* using MIXED.MAC mixed language macro package. *;
;* *;
;************************************************************************;
;========================================================================;
;=----------------------------------------------------------------------=;
;=- -=;
;=- THIS MODULE HAS BEEN RELEASED FOR USE IN C NEWS -=;
;=- -=;
;=- ANY QUESTIONS, COMMENTS, OR PROBLEMS SHOULD BE ADDRESSED TO -=;
;=- -=;
;=- MARSHALL PRESNELL -=;
;=- 13652 LYNN STREET -=;
;=- WOODBRIDGE, VA 22191 -=;
;=- -=;
;=- FIDONET ADDRESS 109/639.106 -=;
;=- -=;
;=----------------------------------------------------------------------=;
;========================================================================;
.8086
INCLUDE MIXED.MAC
SETMODEL
.CODE
;==========================================================================;
; ;
; SYSTEM EQUATES FOR FOSSIL VERSION 5 INTERFACE ;
; ;
;==========================================================================;
SETBAUD EQU 00H
TXCHAR EQU 01H
RXCHAR EQU 02H
STATUS EQU 03H
INIT EQU 04H
DEINIT EQU 05H
DTR EQU 06H
TTICK EQU 07H
OUTFLUSH EQU 08H
OUTPURGE EQU 09H
INPURGE EQU 0AH
TXNOWAIT EQU 0BH
PEEK EQU 0CH
KEYREADNOWAIT EQU 0DH
KEYREAD EQU 0EH
FLOWCONTROL EQU 0FH
CONTROL_C_CHECK EQU 10H
SETCURS EQU 11H
GETCURS EQU 12H
WRANSI EQU 13H
WATCHDOG EQU 14H
WRBIOS EQU 15H
TTICK_FUNCTION EQU 16H
REBOOT EQU 17H
READBLOCK EQU 18H
WRITEBLOCK EQU 19H
BREAK EQU 1AH
DATASTRUCTURE EQU 1BH
INSTALLAPI EQU 7EH
REMOVEAPI EQU 7FH
;===========================================================================
;
; unsigned int f_ctrlcchk(int port, int bitmask)
;
HPROC <f_ctrlcchk>,<USES DX>,PORT:WORD,BITMASK:WORD
MOV DX, PORT ;Load port address to DX
MOV AX, BITMASK ;Load Bitmask to AX
MOV AH, CONTROL_C_CHECK ;Overwrite AH with function code
INT 14H ;Call FOSSIL
HRET ;Return AX to caller
HENDP f_ctrlcchk
END