⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 screen.def

📁 Welcome to PMOS. PMOS is a set of modules, mostly written in Modula-2, to support multitasking. PMO
💻 DEF
字号:
DEFINITION MODULE Screen;

	(********************************************************)
	(*							*)
	(*		Low-level screen functions		*)
	(*							*)
	(*  Programmer:		P. Moylan			*)
	(*  Last edited:	8 January 1992			*)
	(*  Status:		Working				*)
	(*	Not yet clear what is the best division of	*)
	(*	functions into modules.				*)
	(*							*)
	(********************************************************)

(************************************************************************)
(*									*)
(*		WARNING		WARNING		WARNING			*)
(*									*)
(*  The operations performed by this module are among the rare examples	*)
(*  where a programming error can cause physical damage to the		*)
(*  hardware.  Do NOT attempt to modify anything in this module unless	*)
(*  you have a detailed understanding of how the video adaptors work.	*)
(*  In particular, beware of putting inappropriate values into the	*)
(*  registers of the 6845 video controller.				*)
(*									*)
(*  It is normal for the screen picture to "bloom" or "bounce" after	*)
(*  a mode change (e.g. changing from a text mode to a graphics mode).	*)
(*  Some monitors are worse than others for this, but all should	*)
(*  regain synchronism after a second or so.  A bright dot at the	*)
(*  centre of the screen or a "tearing" effect are NOT normal; if the	*)
(*  screen display goes crazy you should turn off the monitor and/or	*)
(*  reset the computer immediately, since it probably means that the	*)
(*  software is not compatible with your hardware.			*)
(*									*)
(*  The procedures in this module are for the use of other library	*)
(*  modules such as Graphics and Windows.  They should not normally	*)
(*  be called directly from applications programs.			*)
(*									*)
(*  DISCLAIMER: This software is supplied "as is" with no warranty as	*)
(*  to its compatibility with your hardware.  It has been tested on a	*)
(*  small sample of computers, but because of the wide variety of	*)
(*  video adaptors on the market it is impossible to be certain that	*)
(*  it will work correctly on all hardware configurations.		*)
(*									*)
(************************************************************************)

TYPE
    VideoAdaptorType = (MDA, CGA, EGA, Hercules);

(************************************************************************)

PROCEDURE VideoKind (VAR (*OUT*) ScreenSegment, IObase: CARDINAL)
							: VideoAdaptorType;

    (* Returns the display adaptor type.  This is a best guess, and it	*)
    (* is possible that some adaptor types will be misclassified.	*)
    (* In the present version, VGA adaptors will be reported as EGA,	*)
    (* and no distinction is drawn between the "ordinary" Hercules	*)
    (* adaptor and the Hercules Plus or Hercules InColor.		*)
    (* Also returns the segment of the screen memory, and the port	*)
    (* number of the video controller.					*)

PROCEDURE SetVideoMode (newmode: CARDINAL);

    (* Sets the video mode.  The mode numbers are as defined in the	*)
    (* BIOS, plus 128+7 to denote the Hercules graphics mode.		*)

PROCEDURE RestoreOriginalMode;

    (* Sets the video mode back to what it was before this program ran.	*)

END Screen.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -