accessing to parallel port
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Rings.
look at this topic:
viewtopic.php?t=2549
there was handling with hardwareports.....
Its a long way to the top if you wanna .....CodeGuru
look at this topic:
viewtopic.php?t=2549
there was handling with hardwareports.....
Its a long way to the top if you wanna .....CodeGuru
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by stefhan.
Thanks for your reponse
But under linux, using dll will be hardest !
I need parallel port access via windows and linux(robot).
Doesn't try demo of pure basic under linux, but if inline asm
supported may be a direct access should be done:
* write on datas port:
MOV DX,378h
MOV AX, My_Value
OUT DX,AX
* Read on state port:
MOV DX,379h
IN DX
MOV My_Value,AX
I'm going to try...
Thanks for your reponse
But under linux, using dll will be hardest !
I need parallel port access via windows and linux(robot).
Doesn't try demo of pure basic under linux, but if inline asm
supported may be a direct access should be done:
* write on datas port:
MOV DX,378h
MOV AX, My_Value
OUT DX,AX
* Read on state port:
MOV DX,379h
IN DX
MOV My_Value,AX
I'm going to try...
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by El_Choni.
Try:
Bye,
PS: about inline Asm in PureBasic, it uses Nasm's syntax, but from what I've read lately, it will use Fasm in the next version.
Try:
Code: Select all
my_value.w
mov dx, 889
in ax, dx
mov my_value, ax
PS: about inline Asm in PureBasic, it uses Nasm's syntax, but from what I've read lately, it will use Fasm in the next version.
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by freak.
Why don't you use the dll for windows, and the inline Asm stuff only on Linux?
Like this:
Now, if compiled for Linux, the Asm stuff is used, and if compiled for Windows, the dll is used.
Timo
Why don't you use the dll for windows, and the inline Asm stuff only on Linux?
Like this:
Code: Select all
CompilerIf #OS = #Linux
;
; inline Asm Method
;
CompilerElse
;
; Dll Method
;
CompilerEndIf
Timo
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Berikco.
Direct hardware access not possible under NT-2K-XP
The OS does not allow this.
You need a device driver to do this, because this is running in another layer then normal apps.
Regards,
Berikco
http://www.benny.zeb.be
Direct hardware access not possible under NT-2K-XP
The OS does not allow this.
You need a device driver to do this, because this is running in another layer then normal apps.
Regards,
Berikco
http://www.benny.zeb.be
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by El_Choni.
I think there's a WINIO.DLL somewhere to do this under WinXP. Saw some info on how to use it in the Win32asm message board:
http://board.win32asmcommunity.net
Bye,
El_Choni
I think there's a WINIO.DLL somewhere to do this under WinXP. Saw some info on how to use it in the Win32asm message board:
http://board.win32asmcommunity.net
Bye,
El_Choni
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by freak.
Yes, and in the Link, Rings posted above, there's a link to
a DLL import from Danilo. It's http://home.t-online.de/home/ExpressTrack/PB_WinIO.zip
Timo
Yes, and in the Link, Rings posted above, there's a link to
a DLL import from Danilo. It's http://home.t-online.de/home/ExpressTrack/PB_WinIO.zip
Timo