title MSDOS 2.00 Function Library for Lattice C
name break
include mc.ash
.model small
.code
;;
;;FUNCTION:	Get and set control-C trapping
;;
;;
;;CALL:		_break(code,flag);
;;	int code;	1 == set, 0 == get
;;	int flag;	1 == on, 0 == off
;;
;;
;;RETURN:	Current state of BREAK (0,1)
;;
;;
;;DESCRIPTION:	Passes the error code to DOS
;;		via function 4ch.
;;
;;
;;EXAMPLE:
;;
;;
;;CAUTIONS:	Works only for DOS 2.xx.
;;
;;
;;ASSUMPTIONS:
;;
;;LONG	32 bits (4 bytes)
;;INT	16 bits (2 bytes)
;;CHAR	 8 bits (1 byte)
;;
page

func __break 
	mov	al,arg0
	and	al,1
	mov	dl,arg1
	and	dl,1
	mov	ah,33h
	int	21h
	mov	al,dl
	mov	ah,0
endf __break

	end

