Class TNpsPortB (unit NpsPort) |
TComponent
*************** Freeware Freeware Freeware ******************************** * Name: NpsPort.PAS * * Description: Port Component and functuons (Byte and Word) * * Platform: Delphi 2.0/3.0 * * Files: NpsPort.dcr - component resource file * * NpsPort.pas - component source * * Author: Anatoly Podgoretsky * * Vahe 4-31, Johvi, Estonia, EE2045 * * kvk@estpak.ee * * Installation: Copy all files into source directory (NpsPort) * * Then install on palette, component installed on AddOn tab.* * If this tab not good for you simple change tab in * * register procedure, look comment in code * * Editor: Tabs step = 2, Courier New * * Started: 23.08.97 - v.1.0 Initial release * * Properties Address and Value * * Modivied: 20.12.97 - v.1.01 now as in old Delphi time - Port array * * Property Port (Indexed), other removed * * 26.12.97 - v.1.02 Port and PortW now default property * *************************************************************************** * Copyright: (ñ) NPS, 1997 * *************************************************************************** * This programm fully free and may use and distribute as you want, except * * Copyright notice, this must stay unchanged. Of couse if you modify * * programm you may add yours Portion Copyright statement below us. Also * * state our names in a credits section of your program and use it as you * * like. For your own risk of course as you go in uncontrolled territory * * Also this can not work under NT because NT do not allow direct access * * to hardware. May be future version of Windows also desable it too * * For example construction like: * * while (Port[$1F7] and $80) <> 0 do; * * work under DOS but not under Windos95 * *************************************************************************** * Remarks and Exampes * * Put TNpsPortB or TNpsPortW component on form and get descriptive name, * * for examole ComPort * * In code use next syntax: * * Value := ComPort.Port[$3F8); for reading byte from Com1 port * * ComPort.Port[$3F8) := Value; for writing byte into port * * use appriciated Byte or Word component. Thats all * * if you assign name as Port or PortW then above example may look like * * Value := Port[$3F8); for reading byte from Com1 port * * Port[$3F8) := Value; for writing byte into port * * Value := PortW[Adr); for word port * * PortW[Adr) := Value; for writing word into port * * If You still remember old Pascal style, do you see difference? * *************************************************************************** * For high speed needs you may use non component function and procedures * * functions PortReadByte, PortReadWord, PortReadWordLS * * procedures PortWriteByte, PortWriteWord, PortWriteWordLS * * PortXxxLS applicable for old computers if problem with word operations * ***************************************************************************
Constructors |
Functions |
Properties |
Events |
Variables |
Constructors |
****************** * Create component *
Functions |
Create {************** * Get Value *
************ * Set Value *
Properties |
Events |
Variables |