DLL

VS2017动态链接库(.dll)的生成与使用

https://blog.csdn.net/m0_37170593/article/details/76445972

利用winIO3.0进行windows10 64bit端口读取

https://blog.csdn.net/greless/article/details/72821876

Win32Forth 叫用  winio.DLL

\ 先將 winio.vxd winio.dll winio.sys winio.bas COPY 到 win32forth 執行路徑下

\ 再 fload winio.f 

\

\ 鍵入 print_on  燈亮

\

\ 鍵入 print_off 燈滅

\

create I/O_Prot$ 256 allot

\  Vc++:    void Fun( a1,a2,a3);

\  forth:   a3 a2 a1 call Fun

WinLibrary WinIo.dll   


: WinPC! ( data I/O_PortNumber ---  )

call InitializeWinIo drop

1  rot rot   Call            SetPortVal drop

call ShutdownWinIo drop

;


: WinPC@ ( I/O_PortNumber --- data  )

call InitializeWinIo drop

1 I/O_Prot$ rel>abs rot  Call GetPortVal drop

call ShutdownWinIo drop

I/O_Prot$ c@ 

;



\ 範例


: print_on     

0xff 0x378 WinPC!

;

: print_off

0x00 0x378 WinPC!

;